- Overview
- Features
- Tech Stack
- Quick Start
- Project Structure
- Architecture
- Documentation
- Environment Setup
- Development
- API Reference
- Deployment
- Contributing
- License
LearnDash is a modern, AI-powered learning management system built with Next.js 15 and TypeScript. It features a beautiful glassmorphism design with a cosmic theme, comprehensive quiz management, AI-integrated timetable generation, and real-time progress tracking.
The platform is designed to provide an engaging learning experience with features such as:
- AI-generated quizzes with detailed explanations
- Dynamic timetable creation using Google's Gemini AI
- Comprehensive performance analytics
- Beautiful, responsive design with glassmorphism effects
- Full-stack authentication with Supabase
- Authentication System: Complete user authentication with Supabase
- AI-Powered Quizzer: Generate quizzes with multiple subjects and difficulties
- Smart Timetable: AI-generated timetables based on user preferences
- Interactive Dashboard: Track progress, view stats, and manage learning
- Performance Analytics: Detailed insights into learning progress
- Mistake Review: Review incorrect answers with explanations
- Glassmorphism UI: Modern glass-like design elements
- Cosmic Theme: Dark theme with purple/magenta accents
- Responsive Design: Mobile-first, works on all devices
- Smooth Animations: 60fps animations with GPU acceleration
- Component Library: Reusable shadcn/ui components
- Type Safety: Full TypeScript implementation
- Server-Side Rendering: Next.js App Router with SSR
- Database: PostgreSQL with Supabase
- API Integration: RESTful APIs with proper error handling
- State Management: React hooks and context
- Security: Row-level security and JWT authentication
- Framework: Next.js 15.5.4 (App Router)
- Language: TypeScript 5.0
- Styling: Tailwind CSS v4
- UI Components: shadcn/ui
- Icons: Lucide React
- Forms: React Hook Form + Zod validation
- Database: PostgreSQL (via Supabase)
- Authentication: Supabase Auth
- API: Next.js API Routes
- ORM: Supabase JavaScript Client
- Real-time: Supabase Realtime (planned)
- AI Model: Google Gemini 2.0 Flash
- Quiz Generation: Custom prompt engineering
- Timetable AI: Conversational AI interface
- Package Manager: npm
- Linting: ESLint + Prettier
- Type Checking: TypeScript compiler
- Git Hooks: Husky (planned)
- Node.js 18.0 or higher
- npm or yarn
- Git
- Supabase account
- Google Gemini API key
-
Clone the repository
git clone <repository-url> cd learning-app
-
Install dependencies
npm install
-
Set up environment variables
cp .env.example .env.local
Configure your environment variables (see Environment Setup)
-
Set up the database
- Create a new Supabase project
- Run the migration scripts from
supabase/migrations/ - Configure auth settings
-
Start the development server
npm run dev
-
Open your browser Navigate to http://localhost:3001
learning-app/
βββ src/ # Source code
β βββ app/ # Next.js App Router pages
β β βββ (marketing)/ # Marketing routes group
β β βββ api/ # API routes
β β β βββ ai/ # AI integration endpoints
β β β βββ quiz/ # Quiz system endpoints
β β βββ auth/ # Authentication page
β β βββ dashboard/ # Dashboard page
β β βββ quiz/ # Quiz taking page
β β βββ quizzer/ # Quiz configuration page
β β βββ timetable/ # Timetable page with AI
β β βββ globals.css # Global styles
β β βββ layout.tsx # Root layout
β β βββ page.tsx # Home page
β βββ components/ # React components
β β βββ auth/ # Authentication components
β β βββ layout/ # Layout components
β β βββ ui/ # Reusable UI components
β βββ lib/ # Utility libraries
β β βββ supabase/ # Supabase client configuration
β β βββ theme.ts # Theme system
β βββ services/ # Business logic services
β β βββ quizSessionService.ts
β βββ types/ # TypeScript type definitions
βββ docs/ # Documentation (this guide)
βββ supabase/ # Database migrations
β βββ migrations/ # SQL migration files
βββ todotasks/ # Project documentation
βββ public/ # Static assets
βββββββββββββββββββ βββββββββββββββββββ βββββββββββββββββββ
β Frontend β β Backend β β External β
β (Next.js) βββββΊβ (API Routes) βββββΊβ Services β
β β β β β β
β β’ Pages β β β’ Quiz API β β β’ Supabase β
β β’ Components β β β’ Auth API β β β’ Gemini AI β
β β’ Hooks β β β’ AI API β β β
βββββββββββββββββββ βββββββββββββββββββ βββββββββββββββββββ
β β β
βββββββββββββββββββββββββΌββββββββββββββββββββββββ
β
βββββββββββββββββββ
β Database β
β (Supabase) β
β β
β β’ Users β
β β’ Quiz Data β
β β’ Sessions β
βββββββββββββββββββ
- App Router over Pages Router: Leverages Next.js 15's latest features
- Server Components: Improved performance and SEO
- Supabase for Backend: Rapid development with built-in auth
- Modular Theme System: Easy customization without hardcoded values
- TypeScript Everywhere: Type safety across the stack
Our documentation is organized to help you find exactly what you need:
Create a .env.local file in the root directory:
# Supabase Configuration
NEXT_PUBLIC_SUPABASE_URL=your_supabase_project_url
NEXT_PUBLIC_SUPABASE_ANON_KEY=your_supabase_anon_key
SUPABASE_SERVICE_ROLE_KEY=your_service_role_key
# Google Gemini AI
GEMINI_API_KEY=your_gemini_api_key
# App Configuration
NEXT_PUBLIC_APP_URL=http://localhost:3001
NODE_ENV=development- Create a new project at supabase.com
- Get your credentials from Settings > API
- Configure Authentication:
- Enable Email/Password authentication
- Add your site URL to redirects
- Run migrations from the
supabase/migrations/folder
- Get API key from Google AI Studio
- Enable Gemini API in your Google Cloud Console
- Add the key to your environment variables
# Start development server
npm run dev
# Build for production
npm run build
# Start production server
npm start
# Run linter
npm run lint
# Type checking
npm run type-check-
Create a feature branch
git checkout -b feature/your-feature-name
-
Make your changes
- Follow the code style guidelines
- Add TypeScript types
- Import colors from theme system
-
Test your changes
- Run the linter
- Check for TypeScript errors
- Test in the browser
-
Commit your changes
git add . git commit -m "feat: add your feature"
-
Push and create a pull request
- TypeScript: Use strict mode, provide types for all variables
- Tailwind: Use theme colors, no hardcoded values
- Components: Follow atomic design principles
- Files: Use PascalCase for components, camelCase for utilities
| Method | Endpoint | Description |
|---|---|---|
| POST | /api/auth/signin |
Sign in user |
| POST | /api/auth/signup |
Register new user |
| POST | /api/auth/signout |
Sign out user |
| Method | Endpoint | Description |
|---|---|---|
| POST | /api/quiz/session |
Create quiz session |
| GET | /api/quiz/session/[id] |
Get session details |
| POST | /api/quiz/questions |
Save quiz questions |
| POST | /api/quiz/answers |
Save user answers |
| GET | /api/quiz/history |
Get quiz history |
| GET | /api/quiz/stats |
Get performance stats |
| Method | Endpoint | Description |
|---|---|---|
| POST | /api/ai/quiz |
Generate quiz questions |
| POST | /api/ai/timetable |
Generate timetable |
For detailed API documentation, see API Overview.
-
Environment Variables
- Set all required environment variables
- Use production URLs
- Secure your API keys
-
Database Setup
- Run all migrations
- Configure Row Level Security
- Set up connection pooling
-
Build Process
- Run
npm run build - Check for build errors
- Test production build locally
- Run
-
Deploy
- Choose your hosting platform
- Configure custom domains
- Set up SSL certificates
- Vercel: Seamless Next.js deployment
- Netlify: Simple static hosting
- AWS: Full control and scalability
- DigitalOcean: Affordable VPS hosting
We welcome contributions! Please follow these steps:
- Read the contributing guide (Contributing Guide)
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Update documentation
- Submit a pull request
- π Bug fixes
- β¨ New features
- π Documentation improvements
- π¨ UI/UX enhancements
- β‘ Performance optimizations
- π§ͺ Test coverage
- Documentation: Read the docs
- Issues: Create an issue
- Discussions: Join the discussion
- Email: support@learndash.com
This project is licensed under the MIT License. See the LICENSE file for details.
- Next.js - The React framework
- Supabase - Backend as a service
- Tailwind CSS - CSS framework
- shadcn/ui - Component library
- Google Gemini - AI model
- Lucide - Icon library