AI Test Engine is a study app that turns notes, PDFs, TXT, Markdown, and DOCX files into practice exams. Students can attach multiple note sources, generate an exam from that material, take the test, submit answers, and review previous attempts with AI-generated grading feedback.
The current product direction is exam-first: instead of only creating passive summaries, the app pushes students into active recall through generated questions, scored attempts, feedback, and result history.
- Paste notes as separate attached note cards.
- Import study material from
.pdf,.docx,.txt, and.mdfiles. - Generate AI exams from submitted notes.
- Start every generated exam from the first question.
- Answer multiple question types:
- Multiple choice
- Multi-select
- Short answer
- True/false
- Fill in the blank
- Matching
- Ordering
- Scenario-based application
- Submit exams for AI grading.
- View previous attempts on the results page.
- Open recent tests from the navigation drawer.
- Delete individual previous attempts.
- Clear all previous attempts.
- Light/dark theme toggle.
- Dashboard with active recall stats, score visuals, activity calendar, weak areas, and recent tests.
- Missed-question flashcard review from incorrect previous responses.
- SQLite-backed persistence through Prisma.
- React
- TypeScript
- Vite
- React Router
- Material UI
- Axios
- PDF/DOCX text extraction with
pdfjs-distandmammoth
- Node.js
- Express
- TypeScript
- Prisma
- SQLite
- Groq SDK for AI generation/grading
- Zod is available for validation work
.
├── client/
│ └── src/
│ ├── api/ # Frontend API wrappers
│ ├── components/ # Shared UI and feature components
│ ├── hooks/ # Frontend data/loading hooks
│ ├── pages/ # Route-level pages
│ ├── styles/ # Theme and theme provider
│ └── utils/ # File text extraction utilities
├── prisma/
│ ├── migrations/
│ └── schema.prisma
├── src/
│ ├── db/ # Shared Prisma client
│ ├── generated/ # Generated Prisma client
│ ├── lib/ # API clients and shared backend libs
│ ├── routes/ # Domain route modules
│ ├── services/ # AI generation, grading, ingestion, prompts
│ ├── routes.ts # Express route aggregator
│ └── server.ts # Express server entry
└── package.jsonFrom the project root:
npm install
cd client
npm installCreate a .env file in the project root:
GROQ_API_KEY=your_groq_api_key_hereThe backend reads this key when generating questions and grading answers.
From the project root:
npx prisma generate
npx prisma migrate devThe app currently uses SQLite through Prisma. Local data is stored in the Prisma SQLite database.
From the project root:
npm run devThis starts:
- Backend:
http://localhost:3001 - Frontend: Vite will print the local frontend URL, usually
http://localhost:5173
Run the full app:
npm run devBuild the frontend:
cd client
npm run buildOpen Prisma Studio:
npx prisma studio- Open the dashboard to review active recall progress.
- Start a new test from the upload page.
- Paste or import study notes.
- Attach one or more notes.
- Generate a test.
- Take the exam from question one.
- Submit the exam.
- Review score, feedback, and previous attempts.
- Practice missed questions as flashcards from the dashboard.
- Return to previous results from the dashboard or results page.
The current Prisma schema centers on:
Document: raw uploaded or pasted study material.Chunk: pieces of document content used as context for generation.Test: generated exam tied to a document.Question: generated exam questions.Attempt: a completed test submission.Response: the student's answer, score, correctness, and feedback for each question.
This gives the app enough history to show prior exams, delete attempts, and inspect detailed results.
- Route pages are named by purpose, such as
DashboardPage,UploadNotesPage,TestPage,ResultsPage, andResultDetailPage. - Frontend API calls live in
client/src/apiinstead of being scattered through components. - Reusable data flows live in
client/src/hooks, including:useGenerateTestuseTestuseRecentAttemptsuseAttemptResult
- Page-level layout is centralized in
PageFrame. - The note input UI is split into smaller note-focused components.
- Backend routes are split by domain under
src/routes. - Prisma client setup is centralized in
src/db/prisma.ts.
The app is currently focused on AI-generated exams, but the learning experience can expand beyond tests.
Planned or possible future features:
- Flashcard generation from notes and previous missed questions.
- Spaced repetition scheduling for flashcards and weak topics.
- Study guides and condensed summaries from uploaded notes.
- Topic mastery tracking across multiple attempts.
- Targeted practice sets based on incorrect answers.
- Better loading states during AI generation and grading.
- Exam date planning and daily study recommendations.
- Exportable exams and printable study material.
- Editable generated questions before taking a test.
- Support for more specialized question formats, such as coding questions and topic-aware worked problems.
- Learning material library where students can revisit notes, generated tests, flashcards, summaries, and study plans from one place.
- Add stronger request/response validation.
- Improve typed API models shared between frontend and backend.
- Add better error and empty states across the UI.
- Add automated tests for generation, grading, and attempt deletion flows.