Project 1 - Admin Panel
Admin Panel - Overview
The Admin Panel (admin-panel-user-panel-instructor-panel-nextjs-reactjs) is a full-stack Next.js application that powers the FDA (Flagship Design Academy) learning platform. It provides separate experiences for admins, instructors, and users (students) with role-based access control.
What This Project Does
- Admin: Manage users, roles, courses, categories, blogs, events, invoices, orders, accounting, media, and chat.
- Instructor: Create and manage courses (modules, chapters), view enrolled students, and chat with students.
- User (Student): Browse and enroll in courses, watch content, track progress, view orders/invoices, and chat with support.
Tech Stack
- Framework: Next.js 16+ (App Router)
- UI: React 19, Tailwind CSS 4, Headless UI, Heroicons, Motion
- Database: PostgreSQL (via
pg) - Auth: JWT (HTTP-only cookies), phone number + 4-digit PIN
- Payments: Razorpay (with dummy mode for development)
- Other: bcryptjs, jsonwebtoken, uuid, nodemailer, Recharts, jspdf, Vercel Blob
Key Features
| Area | Features |
|---|---|
| Auth | Phone+PIN login, registration with PIN verification, forgot PIN |
| Roles | admin, instructor, user with middleware and server-side checks |
| Courses | Courses → Modules → Chapters; categories; draft/published/archived |
| Blogs | Blog posts and blog categories |
| Enrollments | Enrollments, progress tracking, chapter completion |
| Payments | Razorpay checkout, orders, invoices (manual + auto), accounting |
| Chat | Live chat (admin–user, admin–instructor, instructor–student) via SSE |
| Media | File uploads (e.g. Vercel Blob) |
| Public API | /api/public/courses, /api/public/categories, /api/public/blogs for marketing site |
Project Structure (High Level)
src/app/(app)/– Authenticated app routes (dashboard, courses, manage-courses, chat, invoices, etc.)src/app/(auth)/– Login, register, forgot-passwordsrc/app/api/– REST API (auth, courses, chat, payments, public, etc.)src/lib/– DB client, auth actions, roles, middleware, marketing adaptersupabase/– SQL schema and migrations (used with any PostgreSQL, not only Supabase)
Related Documentation
- Installation & Quick Start – Install deps, env, run dev
- Database Setup – PostgreSQL and schema
- Backend & Auth – API routes, JWT, server actions
- Login & Credentials – How to log in and test accounts
- Roles & Permissions – user / instructor / admin
- Features (Courses, Blogs, etc.) – Course hierarchy, blogs, enrollments
- Payments & Razorpay – Checkout, invoices, accounting
- Chat System – Live chat and SSE
- Marketing API – Public API for the marketing homepage