A comprehensive full-stack learning management system with separate admin and trainee portals, built with Next.js, MongoDB, and TypeScript.
- Modern, responsive design
- Portal selection (Admin/Trainee)
- Feature showcase
- Authentication integration
- Dashboard with analytics
- Student management with search & filter
- Course creation and management
- Department-wise progress tracking
- File upload system
- Student profile views with progress tracking
- Personal dashboard
- Course enrollment and tracking
- Assignment tracker with due dates
- Coding challenges system
- Certificate and badge management
- AI Mentor for technical assistance
- Goal tracking and progress monitoring
- Frontend: Next.js 14, React, TypeScript, Tailwind CSS
- Backend: Next.js API Routes, Node.js
- Database: MongoDB with Mongoose
- Authentication: Custom JWT-based auth
- UI Components: shadcn/ui, Radix UI
- Icons: Lucide React
- Node.js 18+
- MongoDB (local or cloud instance)
- npm or yarn
-
Install MongoDB locally:
- Windows: Download from MongoDB Community Server
- macOS:
brew install mongodb-community - Linux: Follow MongoDB installation guide
-
Start MongoDB service: ```bash
brew services start mongodb-community
sudo systemctl start mongod
```
-
Verify MongoDB is running: ```bash mongosh
```
-
Use this environment variable: ```env MONGODB_URI=mongodb://localhost:27017/lms ```
If you prefer using MongoDB Atlas (cloud database):
- Create account at MongoDB Atlas
- Create a new cluster
- Get your connection string
- Update
.env.local: ```env MONGODB_URI=mongodb+srv://username:password@cluster.mongodb.net/lms?retryWrites=true&w=majority ```
-
Install MongoDB locally (see above)
-
Clone and setup project: ```bash git clone cd learning-management-system npm install ```
-
Create
.env.local: ```env MONGODB_URI=mongodb://localhost:27017/lms NEXTAUTH_SECRET=your-secret-key-here NEXTAUTH_URL=http://localhost:3000 ``` -
Start MongoDB (if not already running): ```bash
brew services start mongodb-community
sudo systemctl start mongod
```
-
Seed the database: ```bash npm run seed ```
-
Start the application: ```bash npm run dev ```
-
Access the application:
- Open http://localhost:3000
- Use the default credentials provided below
After seeding the database, you can use these credentials:
Admin:
- Email: admin@learnhub.com
- Password: admin123
Trainee:
- Email: john@learnhub.com
- Password: trainee123
``` ├── app/ │ ├── admin/ # Admin portal pages │ ├── trainee/ # Trainee portal pages │ ├── auth/ # Authentication pages │ ├── api/ # API routes │ └── page.tsx # Landing page ├── components/ │ └── ui/ # Reusable UI components ├── lib/ │ └── mongodb.ts # Database connection ├── models/ # Mongoose schemas ├── scripts/ │ └── seed-database.js # Database seeding script └── types/ # TypeScript type definitions ```
POST /api/auth/login- User loginPOST /api/auth/register- User registration
GET /api/admin/stats- Dashboard statisticsGET /api/admin/students- Student list with filtersPOST /api/admin/courses- Create new course
GET /api/trainee/dashboard- Dashboard dataGET /api/trainee/courses- Enrolled coursesPOST /api/trainee/assignments- Submit assignment
POST /api/ai-mentor- Chat with AI mentor
- Dashboard: Overview of students, courses, and progress
- Student Management: Search, filter, and manage trainees
- Course Management: Create, edit, and manage courses
- Analytics: Department-wise progress tracking
- Upload System: Upload course materials and assignments
- Dashboard: Personal progress overview
- Courses: Browse and enroll in courses
- Assignments: Track due dates and submissions
- Challenges: Coding challenges with different difficulty levels
- Certificates: View earned certificates and badges
- AI Mentor: Get technical help and learning guidance
- Profile: Manage personal information and achievements
- Personal information (name, email, department)
- Role-based access (admin/trainee)
- Progress tracking
- Skills and achievements
- Course details and materials
- Assignments and deadlines
- Enrolled students
- Progress tracking
- Coding challenges with test cases
- Difficulty levels
- Student submissions and scores
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
This project is licensed under the MIT License.