A complete full-stack web application that generates personalized learning roadmaps using AI. Users can learn any topic through structured lessons, quizzes, and progress tracking.
- AI-Generated Roadmaps: Generate end-to-end learning paths (beginner β senior) with prerequisites, XP rewards, and quizzes.
- Guided Graph UI: Roadmaps render as a Duolingo-style path using
react-force-graph-2dwith locked progression, tooltips, and click-to-learn interactions. - Verified Materials: Each node includes real-world YouTube videos, official documentation, and trusted articles (no fabricated links).
- Universal Navigation: Consistent navigation across all pages (Home, Dashboard, Explain, Roadmaps) with responsive design and language selection.
- 3-Level Explanations: βExplain like Iβm 5 / student / specialistβ output for any topic.
- Interactive Lessons: Materials, quizzes, and a βcomplete lessonβ flow that awards XP/streaks/achievements.
- Profile Dashboard: New profile-first dashboard with avatar hover state, XP bar, streak/XP/achievements cards, completed-lesson showcase, settings modal (updates email/username/password via backend), and logout confirmation dialog.
- Progress Tracking: XP, streaks, achievements, recent progress feed, and completed-node tracking for graph locking.
- Roadmaps List with Progress: Dedicated
/roadmapspage that lists every roadmap and shows green progress bars based on completed lessons. - AI Quiz Feedback: Automatic grading plus AI-generated encouragement and review tips.
- FastAPI - Modern Python web framework
- PostgreSQL - Relational database
- SQLAlchemy - ORM for database operations
- JWT - Authentication
- Google Gemini API - Free AI-powered content generation
- Next.js 14 - React framework with App Router
- TypeScript - Type-safe JavaScript
- Tailwind CSS - Utility-first CSS framework
- Zustand - State management
- shadcn/ui - UI component library
- flag-icons - High-resolution, accurate SVG country flags for cross-platform support
- Python 3.10+ (Python 3.11+ recommended for better package compatibility)
- Node.js 18+
- PostgreSQL 12+
- Google Gemini API key (free from https://makersuite.google.com/app/apikey)
- Rust & Cargo (required for Python 3.14+ or if packages need to be compiled from source)
-
Navigate to backend directory:
cd backend -
Create a virtual environment:
python -m venv venv
-
Activate virtual environment:
- Windows:
venv\Scripts\activate
- Linux/Mac:
source venv/bin/activate
- Windows:
-
Install Rust (if needed):
Some Python packages (like
pydantic-core) may require Rust to compile from source. This is especially needed if using Python 3.14+.Install Rust:
- Visit https://rustup.rs/
- Download and run the installer
- Or use:
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh(Linux/Mac)
Add Rust to PATH (Windows):
- Open System Properties β Environment Variables
- Edit the "Path" variable under User variables
- Add:
%USERPROFILE%\.cargo\bin - Restart your terminal/PowerShell
Verify installation:
cargo --version rustc --version
Note: If you encounter build errors during
pip install, ensure Rust is properly installed and added to PATH. -
Install dependencies:
pip install -r requirements.txt
-
Set up environment variables: Create a
.envfile in thebackenddirectory:DATABASE_URL=postgresql://postgres:postgres@localhost:5432/temirqazyq SECRET_KEY=your-secret-key-here-change-in-production GEMINI_API_KEY=your-gemini-api-key-here GEMINI_MODEL=gemini-flash-latest CORS_ORIGINS=["http://localhost:3000"]
To get a free Gemini API key:
- Go to https://makersuite.google.com/app/apikey
- Sign in with your Google account
- Click "Create API Key"
- Copy the key and paste it in your
.envfile
-
Create PostgreSQL database:
CREATE DATABASE temirqazyq;
-
Run the backend:
uvicorn app.main:app --reload --port 8000
The API will be available at
http://localhost:8000API documentation athttp://localhost:8000/docs
-
Navigate to frontend directory:
cd frontend -
Install dependencies:
npm install
-
Set up environment variables (optional): Create a
.env.localfile in thefrontenddirectory:NEXT_PUBLIC_API_URL=http://localhost:8000
-
Run the development server:
npm run dev
The frontend will be available at
http://localhost:3000
Temirqazyq/
βββ backend/
β βββ app/
β β βββ api/
β β β βββ v1/
β β β βββ routes/
β β β βββ auth.py
β β β βββ roadmap.py
β β β βββ explain.py
β β β βββ progress.py
β β β βββ quiz.py
β β βββ core/
β β β βββ config.py
β β β βββ database.py
β β β βββ security.py
β β βββ models/
β β β βββ user.py
β β β βββ roadmap.py
β β β βββ lesson.py
β β β βββ progress.py
β β βββ schemas/
β β β βββ auth.py
β β β βββ roadmap.py
β β β βββ explain.py
β β β βββ quiz.py
β β β βββ progress.py
β β βββ services/
β β β βββ roadmap_generator.py
β β β βββ explanation_generator.py
β β β βββ level_evaluator.py
β β β βββ material_fetcher.py
β β βββ utils/
β β β βββ openai_client.py
β β βββ main.py
β βββ requirements.txt
β
βββ frontend/
βββ app/
β βββ page.tsx
β βββ dashboard/
β βββ roadmap/
β βββ lesson/
β βββ explain/
β βββ auth/
βββ components/
β βββ ui/
β βββ roadmap/
β β βββ roadmap-graph.tsx
β β βββ roadmap-page.tsx
β βββ roadmap-tree.tsx
β βββ quiz-card.tsx
β βββ xp-bar.tsx
βββ lib/
β βββ api.ts
β βββ auth.ts
βββ store/
β βββ user.ts
β βββ progress.ts
βββ package.json
For a deep dive into every capability, architecture decisions, and the external resources leveraged, see FEATURES.md.
- Register/Login β create an account or sign in.
- Generate a Roadmap β enter a topic and (optionally) choose the
Max nodesslider to control roadmap size. - Explore the Graph β the guided ForceGraph displays every node; pan/zoom to inspect later lessons and hover for tooltips.
- Open a Lesson β click an unlocked node to jump to
/learn/[node-id], review materials, and take quizzes. - Complete Lessons β mark lessons done to gain XP/streaks; newly unlocked nodes turn blue/green in the graph.
- Track Progress β dashboard shows XP, streak, achievements, recent actions, and completed nodes.
- Ask for Explanations β use the Explain page for child/student/specialist summaries of any topic.
POST /auth/register- Register new userPOST /auth/login- Login and get token
POST /roadmap/generate- Generate new roadmap (body supports{"topic": "React", "max_nodes": 12})GET /roadmap/- Get all user roadmapsGET /roadmap/{id}- Get specific roadmap
POST /explain/- Get 3-level explanations
GET /progress/stats- Get user statisticsGET /progress/completed-nodes- Return IDs of completed lessons (used to lock/unlock roadmap nodes)POST /progress/complete-lesson/{node_id}- Complete a lesson
POST /quiz/evaluate- Evaluate quiz answers
cd backend
pytest # If you add testscd frontend
npm run lint- Gemini API Key: Get a free API key from https://makersuite.google.com/app/apikey and set it in the backend
.envfile - Database: Ensure PostgreSQL is running and the database is created
- CORS: Update CORS origins in
backend/app/core/config.pyfor production - Security: Change the
SECRET_KEYin production - Environment Variables: Never commit
.envfiles to version control
- Database connection error: Check PostgreSQL is running and DATABASE_URL is correct
- Gemini API error: Verify API key is set correctly (get free key from https://makersuite.google.com/app/apikey)
- Import errors: Ensure virtual environment is activated
- Rust/Cargo build errors:
- If you see errors about missing
cargoorrustcwhen installing packages:- Install Rust from https://rustup.rs/
- Add Rust to PATH:
%USERPROFILE%\.cargo\bin(Windows) or~/.cargo/bin(Linux/Mac) - Restart your terminal and try again
- For Python 3.14+: Some packages may not have pre-built wheels yet. Consider using Python 3.11 or 3.13 for better compatibility
- If you see errors about missing
- API connection error: Check backend is running on port 8000
- Build errors: Delete
node_modulesand.next, then reinstall - CORS errors: Verify CORS_ORIGINS includes frontend URL
npm auditglob advisory:npm auditcurrently reports a high-severity issue inglobpulled in byeslint-config-next@14.2.5. This dependency is used only for local linting (devDependencies). Because upgrading to a patched version requires jumping to the Next 15 / ESLint 9 toolchain, the project intentionally stays on the 14.x stack for compatibility. Itβs safe to ignore this warning during local development; do not runnpm audit fix --forceunless you plan to upgrade the entire linting toolchain.
This project is open source and available under the MIT License.
Contributions are welcome! Please feel free to submit a Pull Request.
For issues and questions, please open an issue on the repository.
Built with β€οΈ using FastAPI, Next.js, and OpenAI