A comprehensive, modern e-learning platform built with Next.js, Node.js, PostgreSQL, and AI-powered features.
- User Authentication - Secure JWT-based auth with role management (Student, Instructor, Admin)
- Course Management - Create, edit, and manage courses with modular structure
- Video Learning - HD video player with playback controls, bookmarks, and progress tracking
- Interactive Assessments - Quizzes, assignments, and instant feedback
- Progress Tracking - Comprehensive analytics and learning dashboards
- Discussion Forums - Course-specific Q&A and community features
- Gamification - Badges, achievements, and learning streaks
- AI Recommendations - Personalized course suggestions
- Payment Integration - Stripe integration for course purchases
- Mobile Responsive - Works seamlessly on all devices
- Framework: Next.js 14 (React 18)
- Styling: TailwindCSS + shadcn/ui
- State Management: Zustand
- Forms: React Hook Form + Zod
- API Client: Axios
- Video Player: Video.js
- Icons: Lucide React
- Runtime: Node.js 20+
- Framework: Express.js
- Database: PostgreSQL 15+
- ORM: Prisma
- Authentication: JWT + bcrypt
- File Storage: AWS S3 / Local storage
- Payment: Stripe
- Email: Nodemailer
- Containerization: Docker + Docker Compose
- CI/CD: GitHub Actions
- Hosting: Vercel (Frontend) + Railway/Render (Backend)
elearning-platform/
βββ backend/ # Node.js/Express API
β βββ src/
β β βββ config/ # Configuration files
β β βββ controllers/ # Route controllers
β β βββ middleware/ # Custom middleware
β β βββ models/ # Prisma models
β β βββ routes/ # API routes
β β βββ services/ # Business logic
β β βββ utils/ # Utility functions
β β βββ server.js # Entry point
β βββ prisma/ # Database schema & migrations
β βββ tests/ # API tests
β βββ package.json
β
βββ frontend/ # Next.js application
β βββ src/
β β βββ app/ # Next.js 14 app directory
β β βββ components/ # React components
β β βββ hooks/ # Custom hooks
β β βββ lib/ # Utilities & helpers
β β βββ store/ # Zustand stores
β β βββ styles/ # Global styles
β βββ public/ # Static assets
β βββ package.json
β
βββ docs/ # Documentation
βββ docker-compose.yml # Docker setup
βββ README.md
- Node.js 20+ and npm/yarn
- PostgreSQL 15+
- Docker (optional)
git clone <repository-url>
cd elearning-platformcd backend
npm install
# Create .env file
cp .env.example .env
# Update .env with your configuration
# DATABASE_URL, JWT_SECRET, STRIPE_SECRET_KEY, etc.
# Run database migrations
npx prisma migrate dev
# Seed database (optional)
npx prisma db seed
# Start backend server
npm run devBackend runs on http://localhost:5000
cd frontend
npm install
# Create .env.local file
cp .env.example .env.local
# Update with backend API URL
# NEXT_PUBLIC_API_URL=http://localhost:5000
# Start frontend
npm run devFrontend runs on http://localhost:3000
# Start all services
docker-compose up -d
# Run migrations
docker-compose exec backend npx prisma migrate dev
# View logs
docker-compose logs -f# Database
DATABASE_URL="postgresql://user:password@localhost:5432/elearning"
# JWT
JWT_SECRET="your-super-secret-jwt-key"
JWT_EXPIRES_IN="7d"
# Server
PORT=5000
NODE_ENV="development"
# AWS S3 (for file uploads)
AWS_ACCESS_KEY_ID="your-access-key"
AWS_SECRET_ACCESS_KEY="your-secret-key"
AWS_REGION="us-east-1"
AWS_S3_BUCKET="elearning-uploads"
# Stripe
STRIPE_SECRET_KEY="sk_test_..."
STRIPE_WEBHOOK_SECRET="whsec_..."
# Email
SMTP_HOST="smtp.gmail.com"
SMTP_PORT=587
SMTP_USER="your-email@gmail.com"
SMTP_PASS="your-app-password"
# Frontend URL
FRONTEND_URL="http://localhost:3000"NEXT_PUBLIC_API_URL="http://localhost:5000"
NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY="pk_test_..."POST /api/auth/register- Register new userPOST /api/auth/login- Login userPOST /api/auth/logout- Logout userGET /api/auth/me- Get current userPOST /api/auth/forgot-password- Request password resetPOST /api/auth/reset-password- Reset password
GET /api/users/:id- Get user profilePUT /api/users/:id- Update user profileGET /api/users/:id/courses- Get user's enrolled courses
GET /api/courses- Get all courses (with filters)GET /api/courses/:id- Get course detailsPOST /api/courses- Create course (instructor only)PUT /api/courses/:id- Update courseDELETE /api/courses/:id- Delete coursePOST /api/courses/:id/enroll- Enroll in courseGET /api/courses/:id/lessons- Get course lessons
GET /api/lessons/:id- Get lesson detailsPOST /api/lessons- Create lessonPUT /api/lessons/:id- Update lessonPOST /api/lessons/:id/complete- Mark lesson complete
GET /api/quizzes/:id- Get quizPOST /api/quizzes/:id/submit- Submit quiz answersGET /api/quizzes/:id/results- Get quiz results
GET /api/progress/courses/:courseId- Get course progressGET /api/progress/dashboard- Get user dashboard data
POST /api/payments/create-checkout- Create Stripe checkoutPOST /api/payments/webhook- Stripe webhook handler
cd backend
npm test # Run all tests
npm run test:watch # Watch mode
npm run test:coverage # Coverage reportcd frontend
npm test # Run all tests
npm run test:e2e # E2E tests with Playwrightcd frontend
vercel deploy --prod- Connect your GitHub repository
- Set environment variables
- Deploy automatically on push
- Create PostgreSQL database
- Update DATABASE_URL in backend .env
- Run migrations:
npx prisma migrate deploy
- Sign Up - Create account with email
- Browse Courses - Explore course catalog
- Enroll - Purchase or enroll in free courses
- Learn - Watch videos, complete quizzes
- Track Progress - Monitor your learning journey
- Earn Certificates - Complete courses for certificates
- Apply - Request instructor access
- Create Course - Build course with lessons
- Upload Content - Add videos, materials, quizzes
- Publish - Make course available to students
- Monitor - Track student progress and engagement
- Earn - Receive revenue share from enrollments
- Dashboard - View platform analytics
- Manage Users - Approve instructors, moderate content
- Monitor - Track platform health and metrics
- Configure - Adjust platform settings
- Fork the repository
- Create feature branch (
git checkout -b feature/AmazingFeature) - Commit changes (
git commit -m 'Add AmazingFeature') - Push to branch (
git push origin feature/AmazingFeature) - Open Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Product Manager
- Lead Developer
- UI/UX Designer
- Backend Developer
- Frontend Developer
- Email: support@elearning-platform.com
- Documentation: docs.elearning-platform.com
- Issues: GitHub Issues
- User authentication
- Course management
- Video player
- Basic quizzes
- Payment integration
- Live sessions
- Advanced analytics
- Mobile apps
- AI recommendations
- Discussion forums
- Multi-language support
- Advanced gamification
- Corporate features
- API marketplace
- AR/VR experiences
- Lighthouse Score: 95+
- First Contentful Paint: < 1.5s
- Time to Interactive: < 3.5s
- API Response Time: < 500ms
- HTTPS encryption
- JWT authentication
- SQL injection protection
- XSS prevention
- CSRF protection
- Rate limiting
- Data encryption at rest
Built with β€οΈ by the E-Learning Platform Team