FDA

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

AreaFeatures
AuthPhone+PIN login, registration with PIN verification, forgot PIN
Rolesadmin, instructor, user with middleware and server-side checks
CoursesCourses → Modules → Chapters; categories; draft/published/archived
BlogsBlog posts and blog categories
EnrollmentsEnrollments, progress tracking, chapter completion
PaymentsRazorpay checkout, orders, invoices (manual + auto), accounting
ChatLive chat (admin–user, admin–instructor, instructor–student) via SSE
MediaFile 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-password
  • src/app/api/ – REST API (auth, courses, chat, payments, public, etc.)
  • src/lib/ – DB client, auth actions, roles, middleware, marketing adapter
  • supabase/ – SQL schema and migrations (used with any PostgreSQL, not only Supabase)
Previous
Installation