Documentation
Getting Started
Welcome to LearnHub, an AI-powered Learning Management System built with modern technologies for scalable, engaging online education.
Modern Stack
Built with Next.js 14, TypeScript, Tailwind CSS, and Prisma ORM
Role-Based Access
Learner, Trainer, Admin, and Superadmin roles with granular permissions
Gamification
XP points, badges, levels, and learning streaks to engage learners
AI-Powered
Context-aware chatbot for personalized learning assistance
Quick Start
Get LearnHub running locally in just a few steps.
Step 1: Clone the repository
git clone https://github.com/alfredang/ai-lms.git
cd ai-lmsStep 2: Install dependencies
npm installStep 3: Set up environment
cp .env.example .env
# Edit .env with your credentialsStep 4: Set up database
npm run db:push
npm run db:seedStep 5: Start development server
npm run devDemo Accounts
After seeding the database, you can log in with these accounts to explore different roles.
| Role | Password | |
|---|---|---|
Superadmin | admin@learnhub.com | admin123 |
Trainer | trainer@learnhub.com | admin123 |
Learner | learner@learnhub.com | admin123 |
Tech Stack
Next.js 14
React framework with App Router
TypeScript
Type-safe development
Tailwind CSS
Utility-first styling
Prisma ORM
Type-safe database access
PostgreSQL
Reliable relational database
NextAuth v5
Secure authentication
OpenAI API
AI-powered features
Vercel
Edge deployment
Neon
Serverless PostgreSQL