Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

21 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

AptifyAI โ€” AI-Powered Aptitude Test Trainer

AptifyAI

AI-Powered Aptitude Training. Track Every Improvement.

Live Demo



๐Ÿ“Œ Overview

AptifyAI is a production-grade, full-stack MERN web application built for Pakistani students preparing for NTS, GAT, MDCAT, and CSS/PMS exams.

Unlike static question banks that repeat the same MCQs, AptifyAI uses OpenRouter AI to generate completely fresh, unique aptitude questions every single session. After each exam, AI evaluates your answers, explains every mistake in detail, detects your weak topics, and visualizes your improvement arc over time โ€” so you always know exactly where you stand and what to fix next.


โ— Problem Statement

Pakistani students preparing for NTS, GAT, MDCAT and CSS/PMS face four core problems:

  • Repeated question banks โ€” every platform recycles the same MCQs
  • No feedback โ€” you see your score but never understand why you got it wrong
  • No progress tracking โ€” no way to know if you're actually improving session by session
  • API abuse & unfair usage โ€” most free tools get abused by bots and heavy users, degrading experience for genuine students. AptifyAI enforces smart rate limiting so every real student gets a fair, consistent experience

AptifyAI solves all four with AI-generated questions, detailed AI explanations, and a full analytics dashboard that tracks your growth arc.


๐Ÿ–ฅ๏ธ UI Preview

AptifyAI Dashboard

---

โœจ Key Features

Feature Description
๐Ÿง  AI Live Question Generation Fresh unique MCQs every session โ€” never repeated, powered by OpenRouter
โฑ๏ธ Custom Duration Selection Pick 5, 10, 15, 20, or 30 minutes โ€” question count adjusts automatically
๐Ÿ“Š Progress Analytics Dashboard Visual improvement arc across all sessions with bar charts and trend graphs
โšก Real-Time Answer Scoring Clarity, depth, confidence and accuracy scored after every session
๐ŸŽฏ Weak Topic Detection AI analyzes patterns across sessions and flags exactly what to study next
๐Ÿ† Streak & Session History Daily streak tracking + full breakdown of every past session
๐ŸŒ™ Dark & Light Mode Full theme support โ€” persisted in localStorage, zero hardcoded colors
๐Ÿ” JWT Authentication Secure register and login with bcrypt password hashing

๐ŸŽฏ Supported Exams

Exam Topics Covered
NTS Maths, English, Analytical, GK, IQ
GAT Verbal, Quantitative, Analytical
MDCAT Biology, Chemistry, Physics, English
CSS/PMS Current Affairs, English, General Knowledge, Pakistan Affairs

๐Ÿ› ๏ธ Tech Stack

Frontend

  • React 18 + Vite
  • React Router v6
  • Axios
  • Custom CSS with CSS variables (no Tailwind, no Bootstrap)
  • Fonts: Syne + DM Sans + Space Mono

Backend

  • Node.js + Express.js
  • MongoDB Atlas + Mongoose
  • JWT Authentication
  • bcrypt password hashing
  • express-rate-limit

AI

  • OpenRouter API โ€” meta-llama/llama-3.3-70b-instruct
  • Live question generation + answer evaluation + weak topic detection

๐Ÿ”’ Rate Limiting

All endpoints are rate-limited to prevent API abuse:

Scope Limit Status
All /api routes 100 requests per 15 min 429
/api/auth 10 requests per 15 min 429
/api/exam/generate 10 requests per hour 429

โš™๏ธ How to Run Locally

Prerequisites

  • Node.js 18+
  • MongoDB Atlas account (free tier works)
  • OpenRouter API key (free tier available)

1. Clone the repo

git clone https://github.com/muhammadkhuzaima25/aptifyai.git
cd aptifyai

2. Backend setup

cd server
npm install

Create server/.env:

PORT=5000
MONGO_URI=mongodb+srv://...
JWT_SECRET=your_long_random_secret
OPENROUTER_API_KEY=sk-or-...
OPENROUTER_MODEL=meta-llama/llama-3.3-70b-instruct:free
CLIENT_URL=http://localhost:5173

Start backend:

npm run dev

3. Frontend setup

cd client
npm install

Create client/.env:

VITE_API_URL=http://localhost:5000/api

Start frontend:

npm run dev

Open http://localhost:5173 in your browser.


๐Ÿ“ Project Structure

AptifyAI/
โ”œโ”€โ”€ client/                  # React + Vite Frontend
โ”‚   โ”œโ”€โ”€ public/
โ”‚   โ”œโ”€โ”€ src/
โ”‚   โ”‚   โ”œโ”€โ”€ components/      # Navbar, Footer, Sidebar, ThemeToggle, etc.
โ”‚   โ”‚   โ”œโ”€โ”€ context/         # AuthContext, ThemeContext, ToastContext
โ”‚   โ”‚   โ”œโ”€โ”€ hooks/           # useAnimations, useScrollReveal
โ”‚   โ”‚   โ”œโ”€โ”€ pages/           # Landing, Dashboard, StartExam, ExamRoom, Results, Progress, History, Profile
โ”‚   โ”‚   โ”œโ”€โ”€ utils/           # api.js, helpers.js
โ”‚   โ”‚   โ”œโ”€โ”€ index.css        # Design system + CSS variables
โ”‚   โ”‚   โ””โ”€โ”€ App.jsx
โ”‚   โ””โ”€โ”€ vite.config.js
โ”‚
โ””โ”€โ”€ server/                  # Node + Express Backend
    โ”œโ”€โ”€ controllers/         # authController, examController, progressController
    โ”œโ”€โ”€ middleware/          # authMiddleware, errorMiddleware
    โ”œโ”€โ”€ models/              # User, Session, Progress
    โ”œโ”€โ”€ routes/              # authRoutes, examRoutes, progressRoutes
    โ”œโ”€โ”€ utils/               # openai.js, examHelpers.js, generateToken.js
    โ””โ”€โ”€ server.js

๐ŸŒ API Endpoints

Auth โ€” /api/auth

Method Path Description
POST /register Create new account
POST /login Login, returns JWT
GET /me Get current user (protected)
PUT /profile Update name / target exam
PUT /password Change password
DELETE /profile Delete account + all sessions

Exam โ€” /api/exam

Method Path Description
POST /generate Generate fresh AI MCQs
POST /submit Submit answers, get scores + explanations
GET /history List all sessions
GET /history/:id Get single session breakdown

Progress โ€” /api/progress

Method Path Description
GET /dashboard Stats, chart, weak topics, recent sessions
GET /streak Current streak data
GET /full Full analytics โ€” calendar, AI insight, topic performance

๐Ÿ”ฎ Future Work

  • Voice answer support โ€” speak your answers instead of typing
  • Resume upload โ†’ personalized exam questions based on your CV
  • Leaderboard โ€” compete with other students
  • PDF result export โ€” share your progress report
  • Multi-language support โ€” Urdu interface
  • Mobile app โ€” React Native version

๐Ÿ” SEO Keywords

NTS preparation online ยท GAT practice test ยท MDCAT MCQs AI ยท CSS PMS preparation ยท aptitude test Pakistan ยท AI generated MCQs ยท NTS test preparation app ยท GAT test online practice ยท MDCAT biology questions ยท CSS general knowledge MCQs ยท Pakistani exam preparation ยท aptitude test trainer ยท AI quiz generator Pakistan ยท MERN stack AI project ยท progress tracking exam app ยท weak topic detection AI ยท OpenRouter AI app ยท React exam app ยท Node.js quiz API ยท MongoDB exam history ยท Pakistani student app ยท free aptitude test online ยท AI powered MCQ generator ยท NTS GAT MDCAT CSS practice ยท exam improvement tracker


๐Ÿ‘ค Author

Muhammad Khuzaima
Graphic Designer ยท Logo & Brand Identity Expert ยท UI/UX Designer ยท MERN Stack Developer

LinkedIn Live Demo


๐Ÿ“„ License

All Rights Reserved. Copyright ยฉ 2026 Muhammad Khuzaima.
This project is for viewing and evaluation only. See LICENSE for full terms.


โญ If AptifyAI helped your exam prep or impressed you โ€” please leave a star!
Built from scratch with real debugging, designing, and grinding.
A star costs nothing but means everything. ๐Ÿ™

Star this repo

About

AI-powered aptitude test trainer for Pakistani students. Practice NTS, GAT, MDCAT & CSS/PMS with AI-generated questions, real-time scoring, and progress analytics.

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages