How rakesh-bhandari/aptric works
Aptric is an aptitude-learning platform whose main learner journey runs from authentication through daily challenges or topic practice to recorded progress and rankings. The repository also includes an administrator workflow for question review and user/question management, plus AI question generation. The README describes a React-to-Express-to-MySQL architecture, while sampled frontend session code uses Supabase; the graph preserves both without assuming how they are integrated. Some feature links rely on README documentation because their implementation files were not sampled.
Main entry points: server.js Express API · App.jsx React application · auth.js Authentication routes · Practice.jsx Daily and topic practice
Components 25
Learner experience
- React application
frontend/src/App.jsx - Session and profile
frontend/src/context/SessionContext.jsx - Daily and topic practice
frontend/src/pages/Practice/Practice.jsx - Game API client
frontend/src/lib/game.js - Progress dashboard
frontend/src/pages/Profile/Profile.jsx - Leaderboard
frontend/src/pages/Leaderboard/Leaderboard.jsx
Platform services
- Express API
backend/src/server.js - Authentication routes
backend/src/routes/auth.js - Game routes
backend/src/routes/game.js - Question bank
backend/src/services/questionBank.js - MySQL database
backend/src/config/db.js - JWT authorization
backend/src/middleware/auth.js
Admin operations
- Admin console
frontend/src/pages/Admin/ReviewQueue.jsx - Admin routes
backend/src/routes/admin.js - Feedback and reports
backend/src/routes/feedback.js
Question generation
- Generation pipeline
supabase/functions/generate-questions/pipeline.ts - Generation endpoint
supabase/functions/generate-questions/index.ts - Structured LLM client
supabase/functions/generate-questions/llm.ts - Generation storage
supabase/functions/generate-questions/store.ts
Other components
- Learner
- Administrator
- OpenRouter AI
- Supabase auth/data
- Email service
- Google OAuth
Connections 29
- Learner → React application: uses
README.md - React application → Session and profile: provides session
frontend/src/App.jsx - Session and profile → Supabase auth/data: reads auth and profile
frontend/src/context/SessionContext.jsx - Learner → Daily and topic practice: solves questions
README.md - React application → Daily and topic practice: routes to
frontend/src/App.jsx - Daily and topic practice → Game API client: requests game data
frontend/src/pages/Practice/Practice.jsx - Game API client → Express API: calls API
- Express API → Game routes: routes requests
backend/src/server.js - Game routes → Question bank: gets daily questions
backend/src/routes/game.js - Game routes → MySQL database: reads and writes
backend/src/routes/game.js - Question bank → MySQL database: stores question data
backend/src/services/questionBank.js - Daily and topic practice → Progress dashboard: reviews progress
README.md - Progress dashboard → Leaderboard: compares ranking
README.md - Administrator → Admin console: manages platform
README.md - React application → Admin console: routes to
frontend/src/App.jsx - Admin console → Admin routes: manages questions
- Express API → Admin routes: routes requests
backend/src/server.js - Admin routes → JWT authorization: requires authorization
backend/src/routes/admin.js - Admin routes → MySQL database: manages records
backend/src/routes/admin.js - Administrator → Generation pipeline: starts generation
- Generation endpoint → Generation pipeline: runs pipeline
supabase/functions/generate-questions/index.ts - Generation pipeline → Structured LLM client: requests generations
supabase/functions/generate-questions/pipeline.ts - Structured LLM client → OpenRouter AI: sends prompts
supabase/functions/generate-questions/llm.ts - Generation pipeline → Generation storage: reads and inserts
supabase/functions/generate-questions/pipeline.ts - Authentication routes → MySQL database: reads and writes
backend/src/routes/auth.js - Express API → Authentication routes: routes requests
backend/src/server.js - Authentication routes → Google OAuth: supports sign-in
README.md - Authentication routes → Email service: sends verification mail
README.md - Express API → Feedback and reports: routes requests
backend/src/server.js