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-lms

Step 2: Install dependencies

npm install

Step 3: Set up environment

cp .env.example .env
# Edit .env with your credentials

Step 4: Set up database

npm run db:push
npm run db:seed

Step 5: Start development server

npm run dev

Demo Accounts

After seeding the database, you can log in with these accounts to explore different roles.

RoleEmailPassword
Superadmin
admin@learnhub.comadmin123
Trainer
trainer@learnhub.comadmin123
Learner
learner@learnhub.comadmin123

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

Next Steps