A Modern Full-Stack LMS for Software Engineering Department
- Overview
- Features
- Tech Stack
- Project Structure
- Installation
- Configuration
- Running the Application
- API Documentation
- User Credentials
- License
The COMSATS Learning Management System (LMS) is a comprehensive web-based platform designed to streamline academic activities within the Software Engineering Department at COMSATS University Islamabad. This system facilitates seamless interaction between administrators, department heads, teachers, and students.
- 🎨 Modern UI/UX - Clean, professional dark theme with responsive design
- 🔐 Role-Based Access - Four distinct user roles with specific permissions
- 📊 Analytics Dashboard - Visual charts and statistics for all users
- 📱 Fully Responsive - Works seamlessly on desktop, tablet, and mobile
- ⚡ Real-time Updates - Instant feedback on all operations
| Feature | Description |
|---|---|
| Dashboard | System-wide statistics and user activity overview |
| Teacher Management | Add, edit, delete, and view all teachers |
| Student Management | Complete student CRUD operations |
| Class Management | Create and manage course classes |
| User Analytics | Visual charts showing user distribution |
| Feature | Description |
|---|---|
| Department Overview | Complete department statistics |
| Class Monitoring | View all classes and their progress |
| Results Analysis | Comprehensive grade analytics with charts |
| Performance Trends | Track student performance over time |
| Export Reports | Download results as CSV files |
| Feature | Description |
|---|---|
| My Classes | View and manage assigned classes |
| Quiz Management | Create, edit, and manage quizzes |
| Assignment Management | Create and track assignments |
| Learning Materials | Upload and organize course materials |
| Grade Management | Enter and manage student marks |
| Student Progress | Track individual student performance |
| Feature | Description |
|---|---|
| My Dashboard | Personal progress overview |
| Enrolled Classes | View all enrolled courses |
| Quizzes | Attempt available quizzes |
| Assignments | View and submit assignments |
| Results | Check grades and performance |
| Learning Materials | Access course materials |
| Technology | Purpose |
|---|---|
| React 18.2 | UI Library |
| Vite 5.0 | Build Tool |
| Tailwind CSS 3.3 | Styling |
| React Router 6 | Navigation |
| Recharts | Data Visualization |
| React Hot Toast | Notifications |
| React Icons | Icon Library |
| Axios | HTTP Client |
| Technology | Purpose |
|---|---|
| Node.js 18+ | Runtime Environment |
| Express 4.18 | Web Framework |
| MongoDB 6.0 | Database |
| Mongoose 8.0 | ODM |
| JWT | Authentication |
| Bcrypt | Password Hashing |
| CORS | Cross-Origin Support |
| Dotenv | Environment Variables |
CUI-ISB-SP23-BSE-6/
├── 📂 backend/
│ ├── 📂 config/
│ │ └── db.js # MongoDB connection
│ ├── 📂 controllers/
│ │ ├── authController.js # Authentication logic
│ │ ├── adminController.js # Admin operations
│ │ ├── teacherController.js # Teacher operations
│ │ ├── studentController.js # Student operations
│ │ └── headController.js # HOD operations
│ ├── 📂 middleware/
│ │ └── authMiddleware.js # JWT verification
│ ├── 📂 models/
│ │ ├── User.js # User schema
│ │ ├── Class.js # Class schema
│ │ ├── Quiz.js # Quiz schema
│ │ ├── Assignment.js # Assignment schema
│ │ ├── Material.js # Material schema
│ │ └── Marks.js # Marks schema
│ ├── 📂 routes/
│ │ ├── authRoutes.js # Auth endpoints
│ │ ├── adminRoutes.js # Admin endpoints
│ │ ├── teacherRoutes.js # Teacher endpoints
│ │ ├── studentRoutes.js # Student endpoints
│ │ └── headRoutes.js # HOD endpoints
│ ├── 📂 scripts/
│ │ └── seedDatabase.js # Database seeder
│ ├── server.js # Entry point
│ ├── package.json
│ └── .env.example
│
├── 📂 frontend/
│ ├── 📂 src/
│ │ ├── 📂 components/
│ │ │ ├── Layout.jsx # Main layout with sidebar
│ │ │ ├── StatCard.jsx # Statistics card component
│ │ │ ├── DataTable.jsx # Reusable data table
│ │ │ └── Modal.jsx # Modal component
│ │ ├── 📂 context/
│ │ │ └── AuthContext.jsx # Authentication context
│ │ ├── 📂 pages/
│ │ │ ├── Login.jsx # Login page
│ │ │ ├── 📂 admin/
│ │ │ │ ├── Dashboard.jsx
│ │ │ │ ├── Teachers.jsx
│ │ │ │ ├── Students.jsx
│ │ │ │ └── Classes.jsx
│ │ │ ├── 📂 teacher/
│ │ │ │ ├── Dashboard.jsx
│ │ │ │ ├── Classes.jsx
│ │ │ │ ├── Quizzes.jsx
│ │ │ │ ├── Assignments.jsx
│ │ │ │ ├── Materials.jsx
│ │ │ │ └── Marks.jsx
│ │ │ ├── 📂 student/
│ │ │ │ ├── Dashboard.jsx
│ │ │ │ ├── Classes.jsx
│ │ │ │ ├── Quizzes.jsx
│ │ │ │ ├── Assignments.jsx
│ │ │ │ └── Results.jsx
│ │ │ └── 📂 head/
│ │ │ ├── Dashboard.jsx
│ │ │ ├── Classes.jsx
│ │ │ └── Results.jsx
│ │ ├── 📂 services/
│ │ │ └── api.js # Axios instance
│ │ ├── App.jsx # Main App component
│ │ ├── main.jsx # React entry point
│ │ └── index.css # Global styles
│ ├── index.html
│ ├── package.json
│ ├── vite.config.js
│ └── tailwind.config.js
│
├── .gitignore
└── README.md
Ensure you have the following installed:
git clone https://github.com/chumarhassan/CUI-ISB-SP23-BSE-6.git
cd CUI-ISB-SP23-BSE-6cd backend
npm installcd ../frontend
npm installCreate a .env file in the backend directory:
# Server Configuration
PORT=5000
# MongoDB Connection
MONGODB_URI=mongodb://localhost:27017/lms_database
# JWT Configuration
JWT_SECRET=your_super_secret_jwt_key_here
JWT_EXPIRE=7d
# Environment
NODE_ENV=developmentThe frontend is pre-configured to connect to http://localhost:5000/api. If you change the backend port, update frontend/src/services/api.js.
Terminal 1 - Start MongoDB:
# Windows
net start MongoDB
# macOS/Linux
sudo systemctl start mongodTerminal 2 - Start Backend:
cd backend
npm run devBackend runs on: http://localhost:5000
Terminal 3 - Start Frontend:
cd frontend
npm run devFrontend runs on: http://localhost:3000
To populate the database with sample data (43 students, 5 teachers, etc.):
cd backend
node scripts/seedDatabase.js| Method | Endpoint | Description |
|---|---|---|
| POST | /api/auth/login |
User login |
| POST | /api/auth/register |
User registration |
| GET | /api/auth/me |
Get current user |
| POST | /api/auth/logout |
User logout |
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/admin/dashboard |
Get dashboard stats |
| GET | /api/admin/teachers |
Get all teachers |
| POST | /api/admin/teachers |
Add new teacher |
| PUT | /api/admin/teachers/:id |
Update teacher |
| DELETE | /api/admin/teachers/:id |
Delete teacher |
| GET | /api/admin/students |
Get all students |
| POST | /api/admin/students |
Add new student |
| PUT | /api/admin/students/:id |
Update student |
| DELETE | /api/admin/students/:id |
Delete student |
| GET | /api/admin/classes |
Get all classes |
| POST | /api/admin/classes |
Create class |
| PUT | /api/admin/classes/:id |
Update class |
| DELETE | /api/admin/classes/:id |
Delete class |
| POST | /api/admin/classes/:id/assign |
Assign teacher to class |
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/teacher/dashboard |
Get teacher dashboard |
| GET | /api/teacher/classes |
Get assigned classes |
| GET | /api/teacher/quizzes |
Get all quizzes |
| POST | /api/teacher/quizzes |
Create quiz |
| PUT | /api/teacher/quizzes/:id |
Update quiz |
| DELETE | /api/teacher/quizzes/:id |
Delete quiz |
| GET | /api/teacher/assignments |
Get all assignments |
| POST | /api/teacher/assignments |
Create assignment |
| GET | /api/teacher/materials |
Get all materials |
| POST | /api/teacher/materials |
Upload material |
| GET | /api/teacher/marks |
Get marks |
| POST | /api/teacher/marks |
Add marks |
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/student/dashboard |
Get student dashboard |
| GET | /api/student/classes |
Get enrolled classes |
| GET | /api/student/quizzes |
Get available quizzes |
| GET | /api/student/assignments |
Get assignments |
| GET | /api/student/results |
Get results |
| GET | /api/student/materials |
Get materials |
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/head/dashboard |
Get HOD dashboard |
| GET | /api/head/classes |
Get all classes |
| GET | /api/head/results |
Get all results |
| GET | /api/head/materials |
Get all materials |
After running the database seeder, use these credentials to log in:
| Password | |
|---|---|
| admin@lms.com | admin123 |
| Password | |
|---|---|
| head@lms.com | head1234 |
| Name | Password | |
|---|---|---|
| Rashid Mukhtar | rashid.mukhtar@lms.com | teacher123 |
| Dr. Farhan Ahmed | farhan.ahmed@lms.com | teacher123 |
| Prof. Ayesha Khan | ayesha.khan@lms.com | teacher123 |
| Dr. Bilal Hussain | bilal.hussain@lms.com | teacher123 |
| Prof. Sana Malik | sana.malik@lms.com | teacher123 |
All students use password: student123
This project is developed for educational purposes as part of the Software Engineering course at COMSATS University Islamabad.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
For any queries or issues, please contact:
- Semester: Spring 2023 - BSE 6th Semester
Made with ❤️ by SP23-BSE-6 Students