DocsStudent & Parent

Student dashboard, progress, and parent portal

Student & Parent Features

Student Portal

Students access their own subset of the platform through dedicated routes under /student/*.

Student Dashboard

Route: /student/dashboard

An overview of the student's coaching activity:

  • Upcoming lessons
  • Recent sessions with AI analysis
  • Assigned drills and their completion status
  • Achievement badges earned
  • Messages from coach

Session Viewing

Route: /student/sessions/[id]

Students can view sessions they've been linked to (via the session_surfers table). They see:

  • Video playback with coach annotations
  • AI analysis results
  • Ride scores given by their coach
  • Coach notes and feedback

Progress Tracking

Route: /student/progress

A read-only view of the student's progression:

  • Skill Tree -- Visual map of assessed skills with current levels
  • Ride Score History -- Chart of ride scores over time
  • Achievement Badges -- All earned achievements with dates
  • Goals -- Active goals with progress indicators
  • Journal Entries -- Personal session journal with mood/energy/confidence trends

Messaging

Route: /student/messages

Students can exchange messages with their coach through the same messaging system, scoped to their coach-student relationship.

Parent Portal

Route: /parent/dashboard

Parents are linked to students via the parent_links table and receive view-only access. The parent dashboard shows:

  • Student's upcoming lessons
  • Recent session summaries
  • Progress overview (skill levels, ride scores)
  • Attendance and session frequency

Parent access is controlled by the permissions_json column on the parent_links table:

{
  "view_sessions": true,
  "view_progress": true,
  "view_lessons": true
}

Student Invites

Coaches invite students through the platform. The flow:

  1. Coach creates a student record with name and email
  2. An invite is generated with a unique token (via /api/invite)
  3. An email is sent to the student via Resend (or the coach shares the URL manually)
  4. The student visits /invite/[token] to accept and create their account
  5. Their students row is updated with invite_accepted = true and linked to their auth.users record

Achievement System

The achievement engine (/api/achievements/check) evaluates 20+ rules when triggered:

  • Session milestones -- First session, 10 sessions, 50 sessions, etc.
  • Skill mastery -- First skill mastered, complete category mastery
  • Streaks -- Consecutive weekly sessions
  • Journal entries -- Consistent journaling
  • Ride scores -- Score thresholds (first 8+, first 9+, etc.)
  • Drills -- Drill completion milestones

Achievement definitions are seeded via /api/achievements/seed and stored in the achievements table. Earned badges are tracked in student_achievements.