A role-based learning management system built for students, mentors, and administrators. The application supports course creation, enrollment, lesson tracking, assessments, batch management, and admin moderation in a single platform.
This project contains a full-stack LMS split into:
- Frontend: React + Vite + Tailwind CSS
- Backend: Node.js + Express + MongoDB + Mongoose
- Authentication: JWT access tokens and refresh tokens with role-based access control
- Architecture: role-aware portal flows for students, mentors, and admins
- Register and login as a student
- View dashboard and enrolled courses
- Enroll in approved courses
- Access sections, lessons, assignments, and quizzes
- Track lesson completion and course progress
- Review quiz results and attempt history
- Create and update courses
- Manage sections, lessons, assignments, and quizzes
- Review student enrollments
- Monitor course analytics and mentor dashboard metrics
- Submit course content for admin approval
- Manage all users and account status
- Approve or reject mentor role requests
- Review and approve pending courses
- Create and manage batches
- Add or remove students from batches
- View admin dashboard overview
- React 19
- Vite
- Tailwind CSS
- React Router
- Axios
- Radix UI components
- Node.js
- Express 5
- MongoDB with Mongoose
- JWT authentication
- Cookie-based refresh flow
- CORS support
lms/
├── client/ # React frontend
│ ├── src/
│ ├── package.json
│ └── vite.config.js
├── server/ # Express backend
│ ├── src/
│ ├── package.json
│ └── .env.example (if added locally)
├── package.json # Root scripts for running both apps
├── README.md # Project documentation
└── .gitignore
Before running the project locally, make sure you have:
- Node.js 18+ installed
- MongoDB running locally or a reachable MongoDB URI
- A package manager such as npm
Create a .env file inside the server folder with values similar to:
PORT=8000
MONGODB_URI=mongodb://127.0.0.1:27017
DB_NAME=lms
ACCESS_TOKEN_SECRET=your_access_token_secret
REFRESH_TOKEN_SECRET=your_refresh_token_secret
CORS_ORIGIN=http://localhost:5173Create a .env file inside the client folder with:
VITE_PORT=http://localhost:8000
VITE_VERSION=/api/v1These values are used by the frontend to call the backend API endpoints.
From the project root, install dependencies for both app folders:
cd client && npm install
cd ../server && npm install
cd ..If you want to run the root scripts, you may also install the root dependencies:
npm installFrom the root folder:
npm run appThis uses the root script defined in package.json to launch both apps concurrently.
Terminal 1:
cd server && npm run devTerminal 2:
cd client && npm run devThe frontend typically runs on:
The backend API typically runs on:
The app is organized around the following portals:
- Student:
/student/login - Mentor:
/mentor/login - Admin:
/admin/login - Admin staff/role-selection landing page:
/
- Users log in through a shared user authentication flow.
- The login request accepts a
loginAsrole value to validate that the user is logging in through the correct portal. - Access to protected routes is enforced by JWT verification and role checks.
# Start backend
cd server && npm run dev
# Start frontend
cd client && npm run dev
# Build frontend for production
cd client && npm run buildThis project is a full-stack LMS prototype with a role-based structure and multiple portal views. The backend routes and frontend navigation are organized around the user role, so the same user account can be used across different domain-specific experiences depending on permissions.
This project is currently licensed under the ISC license.