How raghava-183/vfstr-course-dashboard works
This is a Next.js course dashboard for faculty-managed teaching videos and student learning materials. Students register or sign in, browse subjects and units, watch recordings, review topics and activities, and track videos watched. Faculty manage video links, topic lists, and student accounts. The graph includes the documented seeded syllabus and Postgres persistence; unsampled implementation details are represented only where the README or source index supports them.
Main entry points: db.ts Course and user queries · auth.ts Auth actions · UnitVideos.tsx Video player and topics · page.tsx Admin console
Components 19
Access and identity
- Login form
app/(auth)/login/LoginForm.tsx - Registration form
app/(auth)/register/RegisterForm.tsx - Auth actions
app/actions/auth.ts - Session service
lib/auth.ts
Course learning
- Subject dashboard
app/(app)/dashboard/page.tsx - Subject units
app/(app)/subject/[slug]/page.tsx - Unit learning page
app/(app)/subject/[slug]/unit/[number]/page.tsx - Video player and topics
components/UnitVideos.tsx - Video link resolver
lib/video.ts - Watch progress action
app/actions/progress.ts - Seeded syllabus
scripts/seed-data.mjs
Faculty management
- Admin console
app/(app)/admin/page.tsx - Video and topic editor
components/VideoEditor.tsx - Admin actions
app/actions/admin.ts
Application data
- Course and user queries
lib/db.ts - Postgres query layer
lib/sql.ts - Postgres
Other components
- Student
- Faculty admin
Connections 21
- Student → Login form: signs in
README.md - Student → Registration form: registers
README.md - Faculty admin → Admin console: manages course
README.md - Login form → Auth actions: submits credentials
app/(auth)/login/LoginForm.tsx - Registration form → Auth actions: submits details
app/(auth)/register/RegisterForm.tsx - Auth actions → Course and user queries: checks or creates user
app/actions/auth.ts - Auth actions → Session service: creates session
app/actions/auth.ts - Subject dashboard → Course and user queries: loads subjects and units
app/(app)/dashboard/page.tsx - Subject units → Course and user queries: loads subject units
app/(app)/subject/[slug]/page.tsx - Unit learning page → Course and user queries: loads unit content
app/(app)/subject/[slug]/unit/[number]/page.tsx - Unit learning page → Video player and topics: renders videos
app/(app)/subject/[slug]/unit/[number]/page.tsx - Video player and topics → Video link resolver: resolves video link
components/UnitVideos.tsx - Video player and topics → Watch progress action: marks watched
components/UnitVideos.tsx - Watch progress action → Course and user queries: updates watch state
app/actions/progress.ts - Admin console → Course and user queries: loads course and students
app/(app)/admin/page.tsx - Admin console → Video and topic editor: renders editors
app/(app)/admin/page.tsx - Video and topic editor → Admin actions: saves or deletes video
components/VideoEditor.tsx - Admin actions → Course and user queries: mutates course data
app/actions/admin.ts - Course and user queries → Postgres query layer: executes queries
lib/db.ts - Postgres query layer → Postgres: reads and writes
README.md - Seeded syllabus → Postgres: seeds course content
README.md