Production-oriented LMS monorepo with:
client/(React + Vite + Redux Toolkit + Tailwind)server/(Node.js + Express + MongoDB + JWT access/refresh auth)
config/database + env configcontrollers/request handlersmodels/mongoose schemasroutes/API route modulesmiddlewares/auth, validation, security, error handlingutils/token helpers, API response helpers, mailer, miscvalidators/request validators
components/shared/admin/lms UIfeatures/Redux slices by domainhooks/reusable hookspages/route-level viewsroutes/route guards + app routingservices/axios API client layerapp/Redux store
- Access + refresh JWT auth flow (
/api/auth/login,/api/auth/refresh,/api/auth/logout) - Role-based guards (
admin,instructor,student) - Request validation middleware + validators
- Security middleware:
- in-memory rate limiting
- request sanitization against Mongo operator injection keys
- secure default headers
- Centralized success/error response utilities
- Public browse APIs for courses/blogs
- Course search/filter + pagination metadata
- Enrollment ownership checks + student progress update endpoint
- Analytics APIs with real data:
GET /api/analytics/adminGET /api/analytics/instructorGET /api/analytics/student
- Frontend axios interceptor with token refresh retry
- Dashboard pages wired to real analytics API data
- Student learning room wired to backend lessons + enrollment progress persistence
cd server
npm install
cp .env.example .env
# update .env values
npm run devcd client
npm install
cp .env.example .env
# update .env values
npm run dev- Frontend:
http://localhost:5173 - Backend:
http://localhost:5000
Use server/.env.example as reference.
Required:
DB_CONFIGURATIONACCESS_TOKEN_SECRETREFRESH_TOKEN_SECRETCLIENT_URLBASE_URL
Use client/.env.example as reference.
Required:
VITE_BASE_URL