An intelligent full-stack EdTech system that detects knowledge gaps and delivers personalized, adaptive learning experiences powered by AI, Machine Learning, and Real-time Analytics.
Version: 2.1 (Production Ready) | Last Updated: April 27, 2026
- π― Problem Statement
- β¨ Key Features
- ποΈ Architecture
- π οΈ Tech Stack
- π Project Structure
- π Getting Started
- π API Endpoints
- π Database Schema
- π§ͺ Testing
- π± Usage Guide
- π¨ UI/UX Design
- π Security Features
- π Performance
- π Deployment
- π Future Roadmap
- π₯ Team & Support
- β Comprehensive logging system for debugging
- β Enhanced database connection pooling
- β Improved error handling in authentication
- β Admin authorization security enhancements
- β Caching optimization for user endpoints
- β Expanded quiz bank with explanations and difficulty levels
Traditional educational platforms use a one-size-fits-all approach and fail to:
- β Identify concept-level knowledge gaps
- β Adapt to individual learning pace
- β Provide intelligent recommendations
- β Track misconceptions dynamically
- β Offer real-time, personalized guidance
β Our Solution: An AI-powered platform that:
- Analyzes student performance in real-time
- Detects knowledge gaps automatically
- Recommends personalized learning paths
- Adapts difficulty based on performance
- Provides instant feedback and guidance via AI Tutor
- β Analyzes quiz performance per topic
- β Identifies weak areas automatically
- β Tracks learning progress in real-time
- β Provides actionable recommendations
- β Dynamically generated questions based on topic
- β Difficulty adjusts based on user performance
- β If score < 60%: Easy questions recommended
- β If score β₯ 80%: Advanced challenges offered
- β One question at a time with immediate feedback
- β Timer for each quiz session
- β Result analysis with weak area identification
- β Interactive chatbot for concept explanation
- β Ask questions on: Fractions, Algebra, Loops, Variables, Functions
- β Get step-by-step explanations
- β Real-time examples and tips
- β Context-aware responses
- β Real-time statistics (Quizzes, Accuracy, Weak Areas)
- β Subject explorer with 5 core subjects
- β Knowledge gap alerts
- β Learning progress tracking
- β Personalized recommendations
- β JWT-based authentication
- β Password hashing with bcrypt
- β Input validation with Pydantic
- β CORS middleware enabled
- β Demo user mode for testing
- β RESTful APIs for all features
- β Real-time data synchronization
- β Error handling and loading states
- β Demo data fallback for testing
mini-project/
βββ backend/
β βββ main.py # FastAPI app entry point
β βββ auth.py # JWT authentication & password hashing
β βββ database.py # Database configuration (SQLite/PostgreSQL)
β βββ models.py # SQLAlchemy ORM models
β βββ schemas.py # Pydantic request/response schemas
β βββ quiz.py # Quiz generation & submission APIs
β βββ progress.py # Knowledge gap detection & tracking
β βββ students.py # AI Tutor chatbot backend
β βββ recommendations.py # ML-based recommendations
β βββ machine_learning/
β β βββ __init__.py
β β βββ ml_model.py # ML model for gap detection
β βββ requirements.txt # Python dependencies
β
βββ frontend/
β βββ app/
β β βββ page.tsx # Landing page
β β βββ login/page.tsx # Login page
β β βββ register/page.tsx # Registration page
β β βββ dashboard/page.tsx # Main dashboard (API integrated)
β β βββ quiz/page.tsx # Adaptive quiz page (API integrated)
β β βββ subjects/page.tsx # Subject explorer
β β βββ profile/page.tsx # User profile
β β βββ layout.tsx # Root layout
β β
β βββ components/
β β βββ login-form.tsx # Login form with API
β β βββ tutor-chat.tsx # AI Tutor chatbot UI (API integrated)
β β βββ dashboard-navbar.tsx
β β βββ ui/ # Reusable UI components
β β
β βββ lib/
β β βββ utils.ts # Utility functions
β β
β βββ package.json
β βββ tsconfig.json
β βββ next.config.mjs
β
βββ README.md # This file
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β FRONTEND (Next.js + React) β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β Login | Dashboard | Quiz | Tutor Chat | Subjects β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β REST APIs (Axios/Fetch) with JWT Auth β
βββββββββββββββ¬ββββββββββββββββββββββββββββββββββββββββββββ
β HTTP/REST
β
βββββββββββββββΌββββββββββββββββββββββββββββββββββββββββββββ
β BACKEND (FastAPI + Python) β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β Authentication | Quiz Generation | Knowledge Gap β
β Detection | AI Tutor | Recommendations β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β SQLAlchemy ORM | SQL Database Layer β
βββββββββββββββ¬ββββββββββββββββββββββββββββββββββββββββββββ
β SQL Queries
β
βββββββββββββββΌββββββββββββββββββββββββββββββββββββββββββββ
β DATABASE (SQLite or PostgreSQL) β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β Users | QuizResults | LearningProgress | WeakAreas β
β Subjects | Topics | Questions β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
- Framework: FastAPI 0.104.1
- Database: SQLite (dev) / PostgreSQL (prod)
- ORM: SQLAlchemy 2.0
- Authentication: JWT + bcrypt
- Validation: Pydantic v2
- Server: Uvicorn
- Framework: Next.js 16.1
- UI Library: React 19
- Styling: Tailwind CSS v4
- Components: Radix UI
- HTTP Client: Fetch API
- Language: TypeScript
- id (PK)
- email (unique)
- hashed_password
- name
- role (student/teacher/admin)
- created_at- id (PK)
- student_id (FK β User)
- topic_id (FK β Topic)
- question_id (FK β Question)
- selected_option
- is_correct (boolean)
- time_taken (seconds)
- created_at- id (PK)
- student_id (FK β User)
- subject_id (FK β Subject)
- concept
- mastery_score (0-1)
- sessions_completed
- correct_answers
- total_questions_attempted
- last_updated- id (PK)
- student_id (FK β User)
- topic_id (FK β Topic)
- mastery_score (< 0.6 = weak)
- total_attempts
- correct_attempts
- last_testedStandard educational content models
POST /api/auth/register- Register new userPOST /api/auth/login- Login userGET /api/auth/me- Get current user
GET /api/quiz/generate/{subject}/{topic}- Generate adaptive quizPOST /api/quiz/submit-answer- Submit quiz answerGET /api/quiz/stats- Get user quiz statistics
GET /api/knowledge-gap/detect- Detect knowledge gapsGET /api/knowledge-gap/progress/{topic}- Get topic progressGET /api/knowledge-gap/dashboard-summary- Get dashboard dataPOST /api/knowledge-gap/mark-mastered/{topic}- Mark topic mastered
POST /api/tutor/ask- Ask tutor a questionGET /api/tutor/topics- Get available topicsGET /api/tutor/explain/{topic}- Get topic explanationPOST /api/tutor/practice-hint/{topic}- Get practice hint
GET /api/recommendations/analyze/{concept}- Analyze performanceGET /api/recommendations/personalized/{user_id}- Get recommendations
GET /- API health checkGET /api/health- Health statusGET /api/subjects- Get all subjects
- Python 3.9+
- Node.js 18+
- Git
- Install dependencies:
cd backend
pip install -r requirements.txt- Create
.envfile (optional):
DATABASE_URL=sqlite:///./learning_platform.db
SECRET_KEY=your-secret-key-here- Run the backend:
python main.py
# OR
uvicorn main:app --reload --host 0.0.0.0 --port 8000Backend runs on: http://192.168.0.131:8001
API Docs: http://192.168.0.131:8001/api/docs (Swagger UI)
- Install dependencies:
cd frontend
pnpm install
# OR
npm install- Create
.env.localfile:
NEXT_PUBLIC_API_URL=http://192.168.0.131:8001- Run development server:
pnpm dev
# OR
npm run devFrontend runs on: http://localhost:3000
cd backend
pytest test_api.py -v# Register
curl -X POST http://192.168.0.131:8001/api/auth/register \
-H "Content-Type: application/json" \
-d '{"email":"test@test.com","password":"pass123","name":"Test User"}'
# Login
curl -X POST http://192.168.0.131:8001/api/auth/login \
-H "Content-Type: application/json" \
-d '{"email":"test@test.com","password":"pass123"}'
# Generate Quiz
curl -X GET "http://192.168.0.131:8001/api/quiz/generate/Math/Fractions?count=5" \
-H "Authorization: Bearer YOUR_TOKEN"-
Register/Login
- Go to
/loginor/register - Use demo button for instant access
- Go to
-
View Dashboard
- See your learning stats
- View weak areas (if any)
- Check study recommendations
-
Take a Quiz
- Click subject card or "Start a Quiz"
- Answer questions one by one
- Get instant feedback and score
-
Use AI Tutor
- Open tutor chat on dashboard
- Ask about: "Fractions", "Algebra", "Loops", etc.
- Get explanations and examples
-
Track Progress
- Check accuracy percentage
- Review weak areas
- Practice recommended topics
- Primary: Blue (#2563EB)
- Secondary: Purple (#9333EA)
- Background: Dark (#0B0F1A)
- Accents: Cyan, Neon Blue, Purple gradients
- Glassmorphism cards with transparency
- Neon glow effects on interactive elements
- Smooth hover animations
- Responsive grid layouts
- Dark theme with high contrast
- Login Page - Clean authentication form
- Dashboard - Stats, weak areas, subject grid
- Quiz Page - Question-by-question with timer
- Subjects Page - Browse all topics
- Profile Page - User settings
β Password Security
- Bcrypt hashing with salt
- Minimum 8 characters recommended
- Never stored in plain text
- Secure password reset workflow
β Authentication & Authorization
- JWT tokens with 30-day expiration
- HTTP-only cookie support
- Bearer token validation
- Role-based access control (Student/Teacher/Admin)
β Data Validation & Protection
- Pydantic schemas on all endpoints
- Email format validation
- Type checking and serialization
- XSS and CSRF protection ready
β API Security
- CORS middleware properly configured
- SQL Injection prevention via SQLAlchemy ORM
- Rate limiting infrastructure (ready to enable)
- Input sanitization on all endpoints
- Secure headers configuration
- Client-side Caching: localStorage for user preferences and tokens
- Code Splitting: Dynamic imports for route-based code splitting
- Image Optimization: Next.js Image component for auto-optimization
- CSS Optimization: Tailwind CSS with tree-shaking
- Lazy Loading: Components load on-demand
- Database Indexing: Optimized queries on frequently accessed fields
- Response Pagination: Ready for large datasets
- Async Processing: FastAPI async/await for I/O operations
- Caching Strategy: Redis-ready (can be integrated)
- Query Optimization: SQLAlchemy relationship loading strategies
- Structured logging for debugging
- Error tracking and reporting
- Performance metrics collection
- User activity audit logs
POST /api/auth/register- Register new userPOST /api/auth/login- User login with JWTGET /api/auth/me- Retrieve current user profilePOST /api/auth/logout- Clear sessionPOST /api/auth/refresh- Refresh JWT token
GET /api/quiz/generate/{subject}/{topic}- Generate adaptive quizPOST /api/quiz/submit-answer- Submit quiz answerGET /api/quiz/stats- Retrieve user statisticsGET /api/quiz/history- Get quiz attempt history
GET /api/knowledge-gap/detect- Detect weak areasGET /api/knowledge-gap/progress/{topic}- Topic-specific progressGET /api/knowledge-gap/dashboard-summary- Dashboard statisticsPOST /api/knowledge-gap/mark-mastered/{topic}- Mark topic completeGET /api/knowledge-gap/weak-areas- List all weak areas
POST /api/tutor/ask- Ask tutor a questionGET /api/tutor/topics- Available topics listGET /api/tutor/explain/{topic}- Topic explanationPOST /api/tutor/practice-hint/{topic}- Get practice hints
GET /api/recommendations/analyze/{concept}- Performance analysisGET /api/recommendations/personalized/{user_id}- Custom recommendationsGET /api/recommendations/next-topics- Suggested topics
GET /- API health checkGET /api/health- Detailed health statusGET /api/subjects- All available subjects
Total: 24+ REST API Endpoints
Option 1: Heroku
# Install Heroku CLI
heroku login
heroku create your-app-name
git push heroku mainOption 2: Railway / Render
# Connect GitHub repository
# Configure environment variables
# Deploy with one clickOption 3: Docker
docker build -t learning-platform-api .
docker run -p 8001:8001 learning-platform-apiOption 1: Vercel (Recommended for Next.js)
npm install -g vercel
vercel deployOption 2: Netlify
npm run build
netlify deploy --prod --dir=.nextOption 3: Docker
docker build -t learning-platform-web .
docker run -p 3000:3000 learning-platform-webBackend (.env)
DATABASE_URL=postgresql://user:password@host/dbname
SECRET_KEY=your-production-secret-key-min-32-chars
ENVIRONMENT=production
DEBUG=false
ALLOWED_HOSTS=yourdomain.com,api.yourdomain.comFrontend (.env.production)
NEXT_PUBLIC_API_URL=https://api.yourdomain.com
NEXT_PUBLIC_APP_NAME=Learning Platform- All tests passing
- Environment variables configured
- Database migrations run
- API documentation updated
- Security headers configured
- SSL/TLS certificates installed
- Monitoring and logging setup
- Backup strategy in place
- β Core platform with quiz and gap detection
- β AI Tutor chatbot
- β Dashboard with analytics
- β User authentication
- Advanced ML model with improved accuracy
- Video content for topics
- Real-time collaboration features
- Student progress export (PDF/CSV)
- Mobile-responsive optimizations
- Gamification (badges, leaderboards, XP system)
- Live instructor support
- Integration with LMS (Moodle, Canvas, Blackboard)
- Blockchain-based certificates
- Advanced analytics for teachers
- Speech-to-text tutor interaction
- Predictive success analytics
- React Native mobile app
- Multi-language support
- AI-generated video explanations
- Community learning forum
- Peer tutoring system
- Parent dashboard
- Integration with textbook publishers
- Course: B.Tech AIML Mini Project
- University: GLA University
- Academic Year: 2024-2025
- Team Size: 3-4 students
- Duration: One Semester
- Mentor: Faculty Guide
- β Feature Completeness (25%)
- β Code Quality & Architecture (20%)
- β UI/UX Design (15%)
- β API Integration (15%)
- β Security Implementation (10%)
- β Documentation (10%)
- β Performance Optimization (5%)
| Resource | Link |
|---|---|
| API Documentation | http://localhost:8001/api/docs (Swagger UI) |
| Alternative API Docs | http://localhost:8001/api/redoc (ReDoc) |
| GitHub Issues | Create an issue |
| Documentation | See QUICK_START.md |
| API Reference | See API_REFERENCE.md |
# Backend
cd backend && python main.py # Start backend
python -m pytest test_api.py -v # Run tests
pip install -r requirements.txt # Install dependencies
# Frontend
cd frontend && npm run dev # Start dev server
npm run build # Production build
npm run lint # Check code styleLicense: MIT License
See LICENSE file for full details
This project uses:
- FastAPI (BSD)
- Next.js (MIT)
- Tailwind CSS (MIT)
- SQLAlchemy (MIT)
- And other open-source libraries (see requirements.txt)
| Feature | Benefit |
|---|---|
| Real AI Integration | Not mockups - actual ML-powered gap detection |
| Fully Integrated | Seamless backend-frontend integration |
| Production-Ready | Security, error handling, best practices |
| Scalable Architecture | Support for millions of students |
| Beautiful UI | Modern glassmorphism design |
| Adaptive Learning | Difficulty adjusts based on performance |
| Real-time Feedback | Instant results and personalized recommendations |
- 24+ REST API Endpoints
- 8 Core Database Models
- 5 Main Frontend Pages
- 3+ User Roles (Student, Teacher, Admin)
- 8 Learning Subjects
- 50+ Default Quiz Questions
- 100% TypeScript + Async Backend
- 0 Third-party quiz services
By completing this project, students have learned:
- Full-stack web development (frontend & backend)
- REST API design and implementation
- Database modeling and SQL optimization
- Authentication and security best practices
- Machine learning integration
- UI/UX design principles
- DevOps and deployment strategies
- Testing and debugging
- Project management and documentation
Made with β€οΈ by the GLA University AIML Team
Last Updated: April 26, 2026
Version: 2.0 | Status: Production Ready β
- Text-based AI assistant
- Concept explanations
- Learning path guidance
- AI-generated personalized notes
- Concept flow summaries
- Microlearning approach
- Spaced repetition scheduling (1β3β7 day cycle)
| Layer | Technology |
|---|---|
| Frontend | React.js, Tailwind CSS |
| Backend | Flask / FastAPI (Python) |
| Machine Learning | Scikit-learn, NumPy |
| NLP | GPT / BERT |
| Database | PostgreSQL / MongoDB |
| Knowledge Graph | Neo4j |
| Authentication | JWT + Google OAuth 2.0 |
git clone https://github.com/your-username/ai-personalized-learning.git
cd ai-personalized-learning
cd backend
pip install -r requirements.txt
python app.py
cd frontend
npm install
npm start