A full-stack learning platform that uses AI to diagnose knowledge gaps, generate personalized courses, and support focused study sessions. Students sign up, complete an initial assessment, and receive adaptive content tailored to their weak areas—with gamification, progress tracking, and study tools in one workspace.
- Authentication & onboarding — Register, log in, choose a role (student, teacher, or self-learner), and select subjects.
- AI-powered initial assessment — Gemini generates 10 MCQs per subject; answers are scored by concept to build a skill profile.
- Weak area analysis — Surfaces high- and medium-priority concepts with AI-suggested prerequisite topics.
- Personalized course generation — Builds a structured course from assessment results, emphasizing weak concepts with modules, resources, and progression.
- Module lessons — On-demand AI-generated lesson content in Markdown for each course module.
- Study mode — Flashcards, concept mind maps (React Flow), and a Pomodoro timer for focused sessions.
- Gamification — XP, levels, badges, and progress visualization.
- Dashboard — Course overview, review schedule, and performance charts.
| Layer | Technologies |
|---|---|
| Frontend | React 18, Vite, React Router, Tailwind CSS, Framer Motion, Chart.js, React Flow |
| Backend | Node.js, Express, MongoDB (Mongoose), JWT auth |
| AI | Google Gemini (gemini-flash-latest) |
AI--Adaptive--Learning/
├── backend/
│ ├── server.js # Express entry point
│ ├── .env.example # Environment template
│ └── src/
│ ├── controllers/ # Route handlers
│ ├── middleware/ # JWT auth
│ ├── models/ # Mongoose schemas
│ ├── routes/ # API routes
│ └── utils/ # LLM client, errors
└── frontend/
├── index.html
├── vite.config.mts # Dev server + API proxy
└── src/
├── components/ # UI components
├── context/ # Auth & progress state
├── pages/ # Route pages
└── services/ # API client
- Node.js 18+ (LTS recommended)
- MongoDB running locally or a cloud connection string
- Google AI Studio API key for Gemini
git clone <repository-url>
cd AI--Adaptive--Learningcd backend
npm install
cp .env.example .envEdit backend/.env:
| Variable | Description |
|---|---|
PORT |
API port (default: 5000) |
MONGO_URI |
MongoDB connection string |
JWT_SECRET |
Secret for signing JWTs |
JWT_EXPIRES_IN |
Token lifetime (e.g. 7d) |
GEMINI_API_KEY |
Google Gemini API key (required for AI features) |
Start the API:
npm run devThe server runs at http://localhost:5000. Health check: GET /api/health.
In a new terminal:
cd frontend
npm install
npm run devThe app runs at http://localhost:5173. Vite proxies /api requests to the backend.
cd frontend
npm run build
npm run previewServe the frontend/dist output behind your host of choice and point API calls to your deployed backend (update the proxy or baseURL in frontend/src/services/api.js as needed).
- Landing → Sign up or log in.
- Role selection → Student, teacher, or self-learner.
- Subject selection → Choose learning subjects.
- Initial assessment → AI-generated quiz; submit answers for concept-level scoring.
- Dashboard → View progress, course modules, and charts.
- Weak areas → Review prioritized gaps and prerequisites.
- Course → Browse generated modules and open AI lesson content.
- Study mode → Flashcards, mind map, and Pomodoro timer.
- Gamification → XP, levels, and badges.
All protected routes require Authorization: Bearer <token>.
| Method | Endpoint | Description |
|---|---|---|
POST |
/api/auth/register |
Create account |
POST |
/api/auth/login |
Log in, receive JWT |
GET |
/api/user/me |
Current user profile |
POST |
/api/user/select-role |
Set user role |
POST |
/api/user/select-subjects |
Set subjects |
GET |
/api/assessment/generate?subject= |
Generate quiz (session + questions) |
GET |
/api/assessment/status |
Whether initial assessment is done |
POST |
/api/assessment/submit |
Submit answers (sessionId, answers) |
GET |
/api/analysis/weak-areas |
Weak concepts and prerequisites |
POST |
/api/course/generate |
Generate course from assessment results |
GET |
/api/course/my-course |
Fetch user's course |
POST |
/api/course/module-content |
Generate lesson for a module |
GET |
/api/study/generate?subject= |
Flashcards and mind map for a subject |
Backend (backend/)
| Command | Description |
|---|---|
npm run dev |
Start API with file watch |
npm start |
Start API (production) |
Frontend (frontend/)
| Command | Description |
|---|---|
npm run dev |
Vite dev server |
npm run build |
Production build |
npm run preview |
Preview production build |
npm run lint |
ESLint |
npm run format |
Prettier |
GEMINI_API_KEYis required for assessments, courses, weak-area prerequisites, study materials, and module lessons.MONGO_URImust be set before the server starts; otherwise startup fails with a clear error.- Do not commit
.envfiles; they are listed in.gitignore.
This project is private ("private": true in package manifests). Add a license file if you intend to open-source or distribute it.