Project Structure
Last updated on 2026-09-13
Directory Overview
lms-fullstack-kit-code/
├── app/
│ ├── (auth)/
│ │ ├── login/page.tsx
│ │ ├── register/page.tsx
│ │ ├── forgot-password/page.tsx
│ │ └── auth/
│ │ ├── callback/route.ts
│ │ └── confirm/route.ts
│ ├── (student)/
│ │ ├── layout.tsx # Student shell with sidebar
│ │ ├── dashboard/page.tsx
│ │ ├── courses/
│ │ │ ├── page.tsx # Course catalog
│ │ │ └── [slug]/page.tsx # Course detail
│ │ ├── my-learning/page.tsx
│ │ ├── lessons/[id]/page.tsx
│ │ ├── quiz/
│ │ │ ├── [id]/page.tsx
│ │ │ └── [id]/results/page.tsx
│ │ ├── assignments/page.tsx
│ │ ├── discussions/
│ │ │ ├── page.tsx
│ │ │ └── [id]/page.tsx
│ │ ├── achievements/page.tsx
│ │ ├── certificates/page.tsx
│ │ ├── progress/page.tsx
│ │ ├── leaderboard/page.tsx
│ │ ├── study-groups/page.tsx
│ │ ├── bookmarks/page.tsx
│ │ ├── notes/page.tsx
│ │ ├── messages/page.tsx
│ │ ├── notifications/page.tsx
│ │ ├── live-sessions/page.tsx
│ │ ├── calendar/page.tsx
│ │ ├── billing/page.tsx
│ │ ├── profile/page.tsx
│ │ └── settings/page.tsx
│ ├── (instructor)/
│ │ ├── layout.tsx # Instructor shell
│ │ └── instructor/
│ │ ├── dashboard/page.tsx
│ │ ├── courses/
│ │ │ ├── page.tsx
│ │ │ └── [id]/curriculum/page.tsx
│ │ ├── students/page.tsx
│ │ ├── assignments/page.tsx
│ │ ├── analytics/page.tsx
│ │ ├── revenue/page.tsx
│ │ ├── reviews/page.tsx
│ │ ├── qa/page.tsx
│ │ ├── live-sessions/page.tsx
│ │ └── profile/page.tsx
│ ├── (admin)/
│ │ ├── layout.tsx # Admin shell
│ │ └── admin/
│ │ ├── dashboard/page.tsx
│ │ ├── users/page.tsx
│ │ ├── courses/page.tsx
│ │ ├── categories/page.tsx
│ │ ├── approvals/page.tsx
│ │ ├── coupons/page.tsx
│ │ ├── revenue/page.tsx
│ │ ├── announcements/page.tsx
│ │ ├── reports/page.tsx
│ │ ├── tickets/page.tsx
│ │ ├── audit-log/page.tsx
│ │ └── settings/page.tsx
│ ├── (public)/
│ │ ├── pricing/page.tsx
│ │ ├── privacy/page.tsx
│ │ └── terms/page.tsx
│ ├── layout.tsx # Root layout with providers
│ ├── page.tsx # Landing page
│ ├── error.tsx # Error boundary
│ └── not-found.tsx # 404 page
├── components/
│ ├── ui/ # shadcn/ui primitives (32)
│ ├── dashboard/ # Student dashboard composites
│ ├── course/ # Course card, filters
│ ├── layout/ # App sidebar, header, theme toggle
│ └── shared/ # Empty state, status badge, page header
├── lib/
│ ├── actions/ # 17 server action files
│ │ ├── auth.ts
│ │ ├── courses.ts
│ │ ├── lessons.ts
│ │ ├── modules.ts
│ │ ├── enrollments.ts
│ │ ├── quizzes.ts
│ │ ├── assignments.ts
│ │ ├── reviews.ts
│ │ ├── gamification.ts
│ │ ├── discussions.ts
│ │ ├── community.ts
│ │ ├── messages.ts
│ │ ├── student.ts
│ │ ├── admin.ts
│ │ ├── tickets.ts
│ │ ├── analytics.ts
│ │ └── settings.ts
│ ├── supabase/
│ │ ├── client.ts # Browser client
│ │ ├── server.ts # Server client with cookies
│ │ ├── admin.ts # Admin client (service role)
│ │ └── middleware.ts # Auth middleware
│ └── queries.ts # Mapper functions
├── supabase/
│ ├── migrations/
│ │ ├── 001_schema.sql # 38 tables
│ │ ├── 002_rls.sql # Row-level security
│ │ ├── 003_triggers.sql # Database triggers
│ │ └── 004_storage.sql # Storage buckets
│ ├── seed.sql # Demo data
│ └── config.toml # Supabase config
├── data/
│ └── static-analytics.ts # Static analytics data
├── middleware.ts # Next.js middleware
├── .env.example # Environment variables template
├── .env.local # Local environment variables
└── package.json
Key Directories
app/ -- Routes
Routes are organized by portal using Next.js route groups:
(auth)/-- Login, register, forgot password, OAuth callbacks(student)/-- Student portal with sidebar layout (23 routes)(instructor)/-- Instructor portal with sidebar layout (11 routes)(admin)/-- Admin portal with sidebar layout (12 routes)(public)/-- Public pages without auth
Each portal has its own layout.tsx with a role-specific sidebar navigation.
lib/actions/ -- Server Actions
17 server action files covering every CRUD operation. Each file is marked with "use server" and exports functions that use the Supabase client for database operations.
lib/supabase/ -- Supabase Clients
Three Supabase client configurations:
| Client | File | Usage |
|---|---|---|
| Browser | client.ts |
Client components (rare) |
| Server | server.ts |
Server components, auth checks |
| Admin | admin.ts |
All mutations (bypasses RLS) |
supabase/ -- Database
SQL migration files and seed data. Run in order: schema → RLS → triggers → storage → seed.
components/ -- UI Components
51 components organized by the 3-tier hierarchy:
- Primitives (
ui/) -- 32 shadcn/ui components - Composites (
dashboard/,course/,shared/) -- domain-specific components - Layouts (
layout/) -- sidebar, header, theme toggle