A full-stack Learning Management System built using Next.js, MongoDB, TypeScript, and Tailwind CSS.
This LMS platform enables students to register, enroll in courses, access lessons, and track their progress. Administrators can manage content, users, and monitor platform analytics.
-
Authentication & Authorization
- Secure user authentication with NextAuth.js
- Role-based access control (Student, Instructor, Admin)
- Social login support (Google, GitHub)
-
Course Management
- Create and edit courses with rich content
- Video lessons and downloadable resources
- Course categories and difficulty levels
- Student enrollment tracking
-
Student Dashboard
- Progress tracking and analytics
- Course enrollment management
- Lesson completion status
- Achievement badges
-
Instructor Dashboard
- Course creation and management
- Student progress monitoring
- Content upload and organization
-
Admin Panel
- User management and role assignment
- Platform analytics and reporting
- Content moderation
-
UI/UX Features
- Responsive design for all devices
- Modern and intuitive interface
- Dark/light mode support
- Accessibility compliant
- Framework: Next.js 15.5.4 (App Router)
- Language: TypeScript
- Styling: Tailwind CSS 4.0
- UI Components: Custom reusable components
- Icons: Heroicons / Lucide React
- API: Next.js API Routes
- Database: MongoDB
- ODM: Mongoose
- Authentication: NextAuth.js
- Version Control: Git
- Package Manager: npm
- Linting: ESLint
- Type Checking: TypeScript
lms-project/
βββ app/
β βββ api/
β β βββ auth/ # NextAuth API routes
β βββ components/ # Reusable UI components
β β βββ Navbar.tsx
β β βββ CourseCard.tsx
β βββ dashboard/ # Dashboard pages
β βββ login/ # Authentication pages
β βββ models/ # MongoDB models
β βββ types/ # TypeScript type definitions
β βββ utils/ # Utility functions
β βββ globals.css # Global styles
β βββ layout.tsx # Root layout
β βββ page.tsx # Home page
βββ public/ # Static assets
βββ .env.local # Environment variables
βββ next.config.ts # Next.js configuration
βββ package.json # Dependencies
βββ tailwind.config.js # Tailwind configuration
βββ tsconfig.json # TypeScript configuration
- Node.js 18.x or later
- npm or yarn
- MongoDB database (local or cloud)
- Git
-
Clone the repository
git clone https://github.com/yourusername/lms-project.git cd lms-project -
Install dependencies
npm install
-
Environment Setup
Create a
.env.localfile in the root directory:# MongoDB Configuration MONGODB_URI=mongodb+srv://username:password@cluster0.mongodb.net/lms-database # NextAuth Configuration NEXTAUTH_URL=http://localhost:3000 NEXTAUTH_SECRET=your-super-secret-key-here # Optional: OAuth Providers GOOGLE_CLIENT_ID=your-google-client-id GOOGLE_CLIENT_SECRET=your-google-client-secret
-
Database Setup
- Create a MongoDB database
- Update the
MONGODB_URIin your.env.localfile - The app will automatically create required collections
-
Run the development server
npm run dev
-
Open your browser
Navigate to http://localhost:3000
npm run dev- Start development server with Turbopacknpm run build- Build for productionnpm run start- Start production servernpm run lint- Run ESLint
- Navbar - Navigation component with user authentication status
- CourseCard - Reusable card component for displaying course information
- Dashboard - User-specific dashboard layouts
- LoginForm - Authentication form component
The project uses Tailwind CSS for styling with:
- Custom color scheme
- Responsive design patterns
- Component-based styling
- Dark mode support
NextAuth.js handles authentication with support for:
- Credentials-based login
- OAuth providers (Google, GitHub)
- JWT tokens
- Session management
- Role-based access control
interface User {
id: string;
name: string;
email: string;
role: 'student' | 'instructor' | 'admin';
avatar?: string;
createdAt: Date;
updatedAt: Date;
}interface Course {
id: string;
title: string;
description: string;
instructor: User;
thumbnail?: string;
duration: number;
level: 'beginner' | 'intermediate' | 'advanced';
price: number;
rating: number;
studentsEnrolled: number;
lessons: Lesson[];
createdAt: Date;
updatedAt: Date;
}- Students: Browse courses, enroll, track progress
- Instructors: Create courses, manage content, view analytics
- Admins: Full platform management, user oversight
- Lesson completion status
- Course progress percentage
- Achievement system
- Learning analytics
- Push code to GitHub
- Connect repository to Vercel
- Add environment variables
- Deploy automatically
- Railway
- Netlify
- AWS
- DigitalOcean
# Run tests (when implemented)
npm run test
# Run type checking
npm run type-check- 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
This project is licensed under the MIT License - see the LICENSE file for details.
- Developer: [Your Name]
- Project Type: Full-Stack Web Application
- Development Period: October 2025
For support, email your-email@example.com or join our Slack channel.
Built with β€οΈ using Next.js, TypeScript, and Tailwind CSS