AIT Learning Management System
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.
Overview
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
Main Features
Student Portal
- 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
Mentor Portal
- 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
Admin Portal
- 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
Tech Stack
Frontend
- React 19
- Vite
- Tailwind CSS
- React Router
- Axios
- Radix UI components
Backend
- Node.js
- Express 5
- MongoDB with Mongoose
- JWT authentication
- Cookie-based refresh flow
- CORS support
Project Structure
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
Prerequisites
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
Environment Setup
Server environment
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:5173
Client environment
Create a .env file inside the client folder with:
VITE_PORT=http://localhost:8000
VITE_VERSION=/api/v1
These values are used by the frontend to call the backend API endpoints.
Installation
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 install
Run the Application
Option 1: Run both frontend and backend together
From the root folder:
npm run app
This uses the root script defined in package.json to launch both apps concurrently.
Option 2: Run them separately
Terminal 1:
cd server && npm run dev
Terminal 2:
cd client && npm run dev
The frontend typically runs on:
The backend API typically runs on:
Default Role-Based Access
The app is organized around the following portals:
- Student:
/student/login - Mentor:
/mentor/login - Admin:
/admin/login - Admin staff/role-selection landing page:
/
Authentication Notes
- 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.
Common Development Commands
# Start backend
cd server && npm run dev
# Start frontend
cd client && npm run dev
# Build frontend for production
cd client && npm run build
Notes
This 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.
License
This project is currently licensed under the ISC license.