Page: Student-Teacher Profile
Code: STPR Route:
/teachers/[handle] Access: Public Priority: P0 Test Script: scripts/page-tests/test-STPR.sh Components: src/components/teachers/STProfile.tsx Purpose
Display Student-Teacher's credentials, teaching availability, courses they're certified to teach, and enable session booking.
Connections
Incoming (users arrive from)
| Source | Trigger | Notes |
|---|---|---|
| STDR | ST card click | From ST directory |
| CDET | ST name in course's ST list | From course detail |
| SBOK | ST info link | While booking |
| SDSH | "Your Teacher" link | Student viewing assigned ST |
| TDSH | Own profile link | ST viewing their public profile |
| (External) | Direct URL | `/@sarah` |
Outgoing (users navigate to)
Data Requirements
| Entity | Fields Used | Purpose |
|---|---|---|
| users | id, name, handle, avatar, title, bio, privacy_public | Profile info |
| student_teachers | course_id, students_taught, certified_date | ST credentials |
| certificates | type, issued_at | Completion/mastery certs |
| courses | id, title, slug, thumbnail | Courses they teach |
| availability | day_of_week, start_time, end_time, timezone | Availability calendar |
| user_stats | average_rating, total_reviews | Teaching stats |
| sessions | count | Sessions conducted |
Sections
Profile Header
- • Avatar (with ST badge overlay)
- • Name
- • Handle: @handle
- • Title/bio
- • **Teaching Badge:** Visual indicator of ST status
- • Stats row: X students taught, Y sessions, Z rating
Availability Section
- • **"Available to Help" indicator** (green/gray)
- • Weekly availability grid:
- • Timezone display
- • "Book a Session" CTA → SBOK
Courses I Teach
- • Cards for each course they're certified to teach
- • For each:
Certifications
- • List of earned certificates:
- • Issue dates
Reviews/Testimonials (if available)
- • Recent reviews from students they've taught
- • Average rating
Bio/About
- • Extended bio text
- • Teaching philosophy (if set)
User Stories Fulfilled
- • US-G009: View ST profile as visitor
- • US-T003: ST has public profile showing credentials
- • US-T004: ST displays availability
- • US-T020: ST can toggle public visibility
- • US-T021: ST shows courses certified to teach
- • US-T022: ST shows students taught count
States & Variations
| State | Description |
|---|---|
| Visitor | View only, booking prompts signup |
| Logged In (Not Enrolled) | "Enroll first" for booking |
| Logged In (Enrolled in matching course) | "Book Session" active |
| Own Profile (ST viewing self) | "Edit Profile" link, no booking CTA |
| Private Profile | "This profile is private" (if privacy_public = false) |
Mobile Considerations
- • Header stacks vertically
- • Availability becomes scrollable horizontal calendar
- • Course cards single column
- • Sticky "Book Session" button
Error Handling
| Error | Display |
|---|---|
| Profile not found | 404 page |
| Profile private | "This profile is private" |
| No availability | "No available slots. Check back later." |
Analytics Events
| Event | Trigger | Data |
|---|---|---|
`page_view` | Page load | st_id, source |
`book_click` | Book session clicked | st_id, course_id |
`course_click` | Course card clicked | course_id |
`availability_viewed` | Availability section viewed/expanded | st_id |
Planned API Calls
| Endpoint | When | Purpose |
|---|---|---|
`GET /api/users/:handle` | Page load | Profile data |
`GET /api/users/:handle/st-info` | Page load (if ST) | ST-specific data |
`GET /api/users/:handle/availability` | Page load | Availability calendar |
`GET /api/users/:handle/reviews` | Page load | Teaching reviews |
`GET /api/users/me/enrollments` | Page load (auth) | Check if can book |
Notes
- • ST profile is an extension of regular user profile (PROF)
- • Badge/indicator distinguishes ST from regular student
- • CD-018: Student profile system ($14K-19K estimate includes this)
- • Consider merging with PROF using role-aware sections
Test Coverage
Component ✓
Page ○
SSR ○
API 0/0
✓ Ready
Script:
scripts/page-tests/test-STPR.sh Page Test:
tests/pages/teachers/[handle].test.tsx ○ Component Test:
tests/pages/teachers/STProfile.test.tsx ✓ Student-Teacher
Marcus Thompson
Available@marcus-t
Entrepreneur & Automation Specialist
15
Students Taught
0
Sessions
4.8
12 Reviews
About
Serial entrepreneur who automated his business operations using n8n.
Teaching Approach
"Business owners need practical solutions, not theory."
Courses I Teach
Certifications
Course Completion
Intro to n8n
Issued Jul 2024
Course Completion
Intro to n8n
Issued Jun 2024
Course Completion
AI Tools Overview
Issued May 2024
Course Completion
AI Tools Overview
Issued Apr 2024
Availability
America/ChicagoSun—
Mon—
Tue
10:00 AM - 6:00 PM
Wed
10:00 AM - 6:00 PM
Thu
10:00 AM - 6:00 PM
Fri
10:00 AM - 4:00 PM
Sat
9:00 AM - 2:00 PM
Expertise
n8nBusiness AutomationAI Tools
At a Glance
- Students Taught
- 15
- Sessions Conducted
- 0
- Courses Teaching
- 2
- Average Rating
- 4.8 ★