AI-Powered Learning Roadmap Generator β Describe your goal, and AI builds a personalized, interactive learning path complete with resources, quizzes, and an AI tutor.
- Describe your learning goal in natural language
- AI generates a structured, multi-node learning path with branching topics
- Dual AI providers: OpenAI GPT-4o-mini (primary) with Google Gemini fallback
- Automatic retry with validation to ensure quality output
- Powered by React Flow (xyflow) β a node-based visual canvas
- Drag, zoom, pan, and reorganize your learning path
- Auto-layout with custom edge styles and node components
- Custom node types: topic nodes, milestone nodes
- Auto-enriched nodes with YouTube videos, Dev.to articles, and documentation links
- In-memory caching for fast resource lookup
- YouTube Data API v3 integration for video thumbnails and metadata
- Context-aware chat per node β click any topic to dive deeper
- Full-screen and side-panel chat modes
- Streaming responses (SSE) with markdown rendering and syntax highlighting
- Persistent chat history stored in database
- AI-generated 5-question quizzes per topic
- Auto-grading with 90% pass threshold
- Full-screen distraction-free quiz mode with timer
- Passing a quiz auto-marks the node as completed
- XP & Leveling β earn XP for completing quizzes and activities
- Daily Streaks β consecutive day tracking with longest streak record
- Learning Time β automatic time tracking per session
- Completion Stats β visual progress bar per roadmap
- Email/password registration with email verification
- OAuth 2.0 β Google and GitHub social login
- JWT-based session management with auto-refresh
- Helmet.js security headers
- Rate limiting on auth and AI endpoints
- Role-based access (USER, ADMIN, MODERATOR)
- Full English and Bahasa Indonesia support
- Language selection persisted across sessions
- Dark/Light mode with smooth transitions
- Responsive design (mobile, tablet, desktop)
- Animated landing page with scroll reveals, typewriter effects, and 3D tilt cards
- Toast notifications via Sonner
- Error boundary with graceful fallback UI
- Loading skeleton components
| Tool | Version | Required |
|---|---|---|
| Node.js | v18+ | β |
| PostgreSQL | v14+ | β |
| OpenAI API Key | β | β |
| Google Gemini API Key | β | Optional (fallback) |
| YouTube Data API Key | β | Optional (for video resources) |
# 1. Clone repository
git clone https://github.com/yourusername/SkillBridge.git
cd SkillBridge
# 2. Install all dependencies
npm install
cd server && npm install && cd ..
# 3. Setup environment variables
cp server/.env.example server/.env
# Edit server/.env with your credentials (see section below)
# 4. Setup database
npm run db:push # Push schema to database
npm run db:generate # Generate Prisma client
# 5. Start development server (frontend + backend concurrently)
npm run devOpen http://localhost:5173 π
The frontend runs on port 5173 (Vite) and the backend API on port 3001 (Express).
| Technology | Purpose |
|---|---|
| React 19 + TypeScript | UI framework |
| Vite | Build tool & dev server |
| TailwindCSS | Utility-first styling |
| shadcn/ui + Radix UI | Accessible component library |
| React Flow (xyflow) | Interactive node-based flowchart canvas |
| Zustand | Lightweight state management |
| React Markdown + Prism.js | Markdown rendering with syntax highlighting |
| Sonner | Toast notifications |
| Lucide React | Icon library |
| Technology | Purpose |
|---|---|
| Express + TypeScript | REST API server |
| Prisma ORM | Type-safe database access |
| PostgreSQL | Relational database |
| OpenAI SDK | GPT-4o-mini for roadmap/quiz/chat generation |
| Google Generative AI | Gemini fallback provider |
| JWT (jsonwebtoken) | Authentication tokens |
| bcryptjs | Password hashing |
| Helmet | HTTP security headers |
| express-rate-limit | API rate limiting |
| Pino + pino-pretty | Structured JSON logging |
| Nodemailer | Email verification & password reset |
| Zod | Runtime validation for AI output |
| Vitest | Unit testing framework |
| Technology | Purpose |
|---|---|
| Railway | Backend hosting & PostgreSQL |
| Vercel | Frontend hosting |
| GitHub Actions | CI pipeline (type check + tests) |
SkillBridge/
βββ public/
β βββ screenshots/ # App screenshots for README
β
βββ src/ # ββ Frontend (React + Vite) ββ
β βββ components/
β β βββ canvas/ # FlowCanvas, node interaction
β β βββ chat/ # ChatPanel, MarkdownRenderer
β β βββ edges/ # Custom React Flow edge types
β β βββ landing/ # Landing page sub-components
β β βββ layout/ # AppLayout, Sidebar, Header
β β βββ nodes/ # Custom React Flow node types
β β βββ quiz/ # QuizFullScreen, QuizPanel
β β βββ roadmap/ # RoadmapSettings, ShareDialog
β β βββ ui/ # Button, Input, Skeleton, Logo...
β β βββ ErrorBoundary.tsx # Global error fallback UI
β β βββ ProtectedRoute.tsx # Auth guard wrapper
β β
β βββ contexts/ # React contexts (Language)
β βββ hooks/ # Custom hooks (useLearningTimeTracker)
β βββ lib/
β β βββ api.ts # REST API client (authFetch, CRUD)
β β βββ translations.ts # i18n translation loader
β β βββ appTranslations.ts # EN/ID translation strings
β β βββ utils.ts # Utility functions
β β
β βββ pages/ # Route-level page components
β β βββ LandingPage.tsx # Public marketing page
β β βββ LoginPage.tsx # Email + OAuth login
β β βββ RegisterPage.tsx # Registration with confirm password
β β βββ ProfilePage.tsx # User profile, stats, streaks
β β βββ SettingsPage.tsx # Account settings
β β βββ SharePage.tsx # Public shared roadmap view
β β βββ ... # ForgotPassword, ResetPassword, etc.
β β
β βββ store/ # Zustand stores
β βββ useAuthStore.ts # Auth state (user, token)
β βββ useRoadmapStore.ts # Roadmap, theme, UI state
β
βββ server/ # ββ Backend (Express + Prisma) ββ
β βββ prisma/
β β βββ schema.prisma # Database schema (6 models)
β β βββ seed.ts # Database seeder
β β
β βββ src/
β βββ routes/
β β βββ auth.ts # Login, register, OAuth, verify, reset
β β βββ chat.ts # AI chat (streaming SSE + non-streaming)
β β βββ roadmap.ts # Generate, save, load, share roadmaps
β β βββ project.ts # CRUD project management
β β βββ quiz.ts # Generate quizzes, submit answers
β β βββ profile.ts # User stats, streaks, XP, avatar
β β βββ notes.ts # Per-node note CRUD
β β
β βββ services/
β β βββ ai.ts # OpenAI + Gemini abstraction layer
β β βββ oauth.ts # Google & GitHub OAuth handlers
β β βββ email.ts # Nodemailer templates
β β βββ resourceEnricher.ts # YouTube + Dev.to resource fetcher
β β
β βββ middleware/
β β βββ auth.ts # JWT verification middleware
β β
β βββ lib/
β β βββ prisma.ts # Prisma client singleton
β β βββ logger.ts # Pino structured logger
β β βββ businessLogic.ts # Pure functions (streak, XP, quiz scoring)
β β
β βββ __tests__/
β βββ auth.test.ts # Auth middleware tests (6 tests)
β βββ businessLogic.test.ts # Streak, XP, quiz scoring (19 tests)
β
βββ .github/workflows/
β βββ ci.yml # GitHub Actions CI pipeline
β
βββ README.md
Create server/.env with the following:
# ββ Database ββββββββββββββββββββββββββββββββββββ
DATABASE_URL="postgresql://user:password@localhost:5432/skillbridge"
# ββ AI Providers ββββββββββββββββββββββββββββββββ
OPENAI_API_KEY="sk-..." # Required β GPT-4o-mini
GEMINI_API_KEY="AIza..." # Optional β Gemini fallback
# ββ Authentication ββββββββββββββββββββββββββββββ
JWT_SECRET="your-random-secret-string" # Required β JWT signing key
# ββ OAuth (optional) ββββββββββββββββββββββββββββ
GOOGLE_CLIENT_ID="..."
GOOGLE_CLIENT_SECRET="..."
GITHUB_CLIENT_ID="..."
GITHUB_CLIENT_SECRET="..."
# ββ Frontend URL (for OAuth callback) βββββββββββ
FRONTEND_URL="http://localhost:5173"
# ββ Email (optional β for verification) βββββββββ
SMTP_HOST="smtp.gmail.com"
SMTP_PORT=587
SMTP_USER="your-email@gmail.com"
SMTP_PASS="your-app-password"
# ββ YouTube (optional β for video resources) ββββ
YOUTUBE_API_KEY="AIza..."| Command | Description |
|---|---|
npm run dev |
Start both frontend (Vite) and backend (Express) concurrently |
npm run dev:frontend |
Start Vite dev server only |
npm run dev:backend |
Start Express dev server only |
npm run build |
Build frontend for production |
npm run preview |
Preview production build locally |
npm run lint |
Run ESLint |
npm run db:push |
Push Prisma schema to database |
npm run db:generate |
Generate Prisma client |
npm run db:migrate |
Run Prisma migrations |
npm run db:studio |
Open Prisma Studio (DB GUI) |
| Command | Description |
|---|---|
npm run dev |
Start backend with hot-reload (tsx watch) |
npm run build |
Compile TypeScript to dist/ |
npm run start |
Run compiled server (node dist/index.js) |
npm test |
Run unit tests (Vitest) |
npm run test:watch |
Run tests in watch mode |
cd server
npm test25 tests across 2 test suites:
| Suite | Tests | Covers |
|---|---|---|
auth.test.ts |
6 | JWT middleware (missing token, invalid token, expired token, user not found, valid flow) |
businessLogic.test.ts |
19 | Streak calculation, XP/Level math, quiz scoring/pass threshold |
Runs automatically on every push to main and on pull requests:
- Frontend TypeScript type check
- Backend TypeScript type check
- Prisma client generation
- Unit test execution
The app uses 6 Prisma models:
User ββββββββ 1:N ββββ Project ββββ 1:N ββββ Roadmap
β
QuizResult ββ
ChatMessage ββ
NodeNote βββββ
| Model | Purpose |
|---|---|
| User | Auth, profile, XP/level, streaks, OAuth fields |
| Project | Groups roadmaps under a named project |
| Roadmap | React Flow nodes/edges stored as JSON, shareable |
| QuizResult | Quiz answers, score, pass/fail per node per user |
| ChatMessage | Chat history per project or per node |
| NodeNote | User notes attached to specific roadmap nodes |
- Connect your GitHub repo to Railway
- Set the root directory to
server - Railway auto-detects the
Dockerfileor uses Nixpacks - Add all environment variables in Railway dashboard
- Railway provides a PostgreSQL add-on for the database
- Connect your GitHub repo to Vercel
- Set
VITE_API_URLto your Railway backend URL (e.g.https://your-app.up.railway.app/api) - Deploy β Vercel auto-detects Vite
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
MIT License β feel free to use for your own projects!
Built with β€οΈ for Education & Upskilling



