Skip to content

Aarush-Rajesh/School-Project

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

7 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

LearnDash - Learning Management System

Next.js TypeScript Tailwind CSS Supabase Gemini AI

πŸ“– Table of Contents

🌟 Overview

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

✨ Features

🎯 Core Features

  • 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

🎨 Design Features

  • 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

πŸ”§ Technical Features

  • 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

πŸ› οΈ Tech Stack

Frontend

  • 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

Backend & Database

  • Database: PostgreSQL (via Supabase)
  • Authentication: Supabase Auth
  • API: Next.js API Routes
  • ORM: Supabase JavaScript Client
  • Real-time: Supabase Realtime (planned)

AI & External Services

  • AI Model: Google Gemini 2.0 Flash
  • Quiz Generation: Custom prompt engineering
  • Timetable AI: Conversational AI interface

Development Tools

  • Package Manager: npm
  • Linting: ESLint + Prettier
  • Type Checking: TypeScript compiler
  • Git Hooks: Husky (planned)

πŸš€ Quick Start

Prerequisites

  • Node.js 18.0 or higher
  • npm or yarn
  • Git
  • Supabase account
  • Google Gemini API key

Installation

  1. Clone the repository

    git clone <repository-url>
    cd learning-app
  2. Install dependencies

    npm install
  3. Set up environment variables

    cp .env.example .env.local

    Configure your environment variables (see Environment Setup)

  4. Set up the database

    • Create a new Supabase project
    • Run the migration scripts from supabase/migrations/
    • Configure auth settings
  5. Start the development server

    npm run dev
  6. Open your browser Navigate to http://localhost:3001

πŸ“ Project Structure

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

πŸ—οΈ Architecture

High-Level Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚   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      β”‚
                    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Key Architectural Decisions

  1. App Router over Pages Router: Leverages Next.js 15's latest features
  2. Server Components: Improved performance and SEO
  3. Supabase for Backend: Rapid development with built-in auth
  4. Modular Theme System: Easy customization without hardcoded values
  5. TypeScript Everywhere: Type safety across the stack

πŸ“š Documentation

Our documentation is organized to help you find exactly what you need:

For New Developers

Understanding the System

Feature Documentation

API Documentation

Deployment

βš™οΈ Environment Setup

Required Environment Variables

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

Supabase Setup

  1. Create a new project at supabase.com
  2. Get your credentials from Settings > API
  3. Configure Authentication:
    • Enable Email/Password authentication
    • Add your site URL to redirects
  4. Run migrations from the supabase/migrations/ folder

Gemini API Setup

  1. Get API key from Google AI Studio
  2. Enable Gemini API in your Google Cloud Console
  3. Add the key to your environment variables

πŸ’» Development

Available Scripts

# 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

Development Workflow

  1. Create a feature branch

    git checkout -b feature/your-feature-name
  2. Make your changes

    • Follow the code style guidelines
    • Add TypeScript types
    • Import colors from theme system
  3. Test your changes

    • Run the linter
    • Check for TypeScript errors
    • Test in the browser
  4. Commit your changes

    git add .
    git commit -m "feat: add your feature"
  5. Push and create a pull request

Code Style Guidelines

  • 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

πŸ”Œ API Reference

Authentication Endpoints

Method Endpoint Description
POST /api/auth/signin Sign in user
POST /api/auth/signup Register new user
POST /api/auth/signout Sign out user

Quiz Endpoints

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

AI Endpoints

Method Endpoint Description
POST /api/ai/quiz Generate quiz questions
POST /api/ai/timetable Generate timetable

For detailed API documentation, see API Overview.

πŸš€ Deployment

Production Deployment Checklist

  1. Environment Variables

    • Set all required environment variables
    • Use production URLs
    • Secure your API keys
  2. Database Setup

    • Run all migrations
    • Configure Row Level Security
    • Set up connection pooling
  3. Build Process

    • Run npm run build
    • Check for build errors
    • Test production build locally
  4. Deploy

    • Choose your hosting platform
    • Configure custom domains
    • Set up SSL certificates

Recommended Platforms

  • Vercel: Seamless Next.js deployment
  • Netlify: Simple static hosting
  • AWS: Full control and scalability
  • DigitalOcean: Affordable VPS hosting

🀝 Contributing

We welcome contributions! Please follow these steps:

  1. Read the contributing guide (Contributing Guide)
  2. Fork the repository
  3. Create a feature branch
  4. Make your changes
  5. Add tests if applicable
  6. Update documentation
  7. Submit a pull request

Contribution Areas

  • πŸ› Bug fixes
  • ✨ New features
  • πŸ“ Documentation improvements
  • 🎨 UI/UX enhancements
  • ⚑ Performance optimizations
  • πŸ§ͺ Test coverage

πŸ“ž Support

πŸ“„ License

This project is licensed under the MIT License. See the LICENSE file for details.

πŸ™ Acknowledgments


Made with ❀️ by the LearnDash team

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors