AI-Powered Exam Preparation — Intelligent study tracking, adaptive learning pathways, and real-time readiness scoring.
KalExam transforms how students prepare for exams by combining intelligent content analysis with real-time progress intelligence. Upload study materials (PDFs, Word docs, PowerPoints), get an AI-generated strategy, and track your readiness with live scoring.
- AI Strategy Generation — Upload syllabus and study materials → get prioritized learning pathways
- Exam Mode Readiness — Real-time scoring (0–100) with likely questions and weak area identification
- Smart Chat Learning — Contextual Q&A with cached responses to reduce AI costs
- Live Progress Tracking — Per-topic status, time spent, and confidence scoring
- Adaptive Recommendations — Algorithm recommends next topic based on exam likelihood, priority, and time
- PDF Report Export — Download multi-page progress reports
Note: Replace these placeholder images with actual screenshots from the deployed application.
| Layer | Technology |
|---|---|
| Frontend | Next.js 16, TypeScript, TailwindCSS, shadcn/ui |
| Backend | Next.js API Routes, Node.js |
| Database | Firestore (real-time progress, strategies, sessions) |
| Auth | Firebase Authentication (email/password, OAuth) |
| AI | Gemini, OpenAI, RAG pipeline |
| File Parsing | pdf-parse, docx-parser, pptx-parser |
| PDF Export | jsPDF |
Strategy generation runs as a multi-stage pipeline with immediate return and long-polling:
- Stages: Queued → Extracting → Analyzing → Generating → Preparing → Complete
- Client polls status while precomputing recommended topics
TopicProgressmodel tracks learning status, time spent, and confidence per topic- Auto-marks topics as "learning" on first open, "completed" on finish
- Session caching prevents redundant LLM calls for identical queries
Six-factor scoring for next-topic suggestions:
- Exam likelihood (0–100) + Chapter weightage (0–100)
- Unfinished bonus + Priority score + Time remaining factor
- Generates 3 likely questions from weak areas
- Adjusts score based on retrieval confidence
- Per-topic caching with model signature invalidation
- Node.js 18+
- Firebase project with Firestore enabled
- API keys for LLM providers (Gemini, OpenAI)
# Clone the repository
git clone https://github.com/nihar5hah/kalexam.git
cd kalexam
# Install dependencies
npm install
# Configure environment variables
cp .env.example .env.localNEXT_PUBLIC_FIREBASE_API_KEY=...
NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN=...
NEXT_PUBLIC_FIREBASE_PROJECT_ID=...
FIREBASE_SERVICE_ACCOUNT_KEY=...
npm run dev
# Open http://localhost:3000src/
├── app/ # Next.js App Router
│ ├── api/ # API routes
│ │ ├── generate-strategy/ # AI strategy generation
│ │ └── study/ # Study & exam mode APIs
│ ├── auth/ # Authentication page
│ ├── dashboard/ # User dashboard
│ ├── study/[topic]/ # Topic study interface
│ └── upload/ # File upload page
├── components/ # React components
│ ├── ui/ # shadcn/ui components
│ └── study/ # Study-specific components
└── lib/ # Core utilities
├── ai/ # AI client & providers
├── firestore/ # Database operations
├── parsing/ # File parsing (PDF, DOCX, PPTX)
└── study/ # Study logic & RAG
POST /api/generate-strategy
{
"syllabusFiles": [...],
"syllabusTextInput": "...",
"studyMaterialFiles": [...]
}POST /api/study/ask
{
"topic": "Organic Chemistry",
"question": "What is a benzene ring?",
"strategyId": "..."
}POST /api/study/exam-mode
{
"topic": "Organic Chemistry",
"files": ["..."]
}
# Returns: { readinessScore, likelyQuestions, weakAreas, examTip }strategies/{strategyId}— AI-generated study strategiesusers/{uid}/studySessions/{sessionId}— Per-session progress trackingsources/{sourceId}— Uploaded study materials
- Production: Migrate to Cloud Tasks for job queue
- Dashboard analytics with exam countdown
- Spaced repetition scheduling
- React Native mobile app
This project is licensed under the MIT License.
Nihar Shah — Full-stack AI Engineer
GitHub: @nihar5hah
Built with ❤️ for students everywhere.


