Upload your lectures. Generate practice exams. Ace your finals.
A self-hosted, AI-powered exam preparation tool. Upload your lecture PDFs, and STARK generates realistic practice exams using OpenAI or Anthropic.
stark.mp4
- AI-generated practice tests — multiple choice, true/false, short answer, and fill-in-the-blank
- Dual AI provider — choose between OpenAI and Anthropic
- Smart PDF pipeline — pypdfium2 for fast text extraction, with OpenAI Vision OCR fallback for scanned documents
- Upload lecture PDFs and old exams — STARK matches the style of your professor's real exams
- Project-based organization — group materials by course with exam context for better generation
- Batch generation with deduplication — generate up to 80 questions without repeats
- Practice mode and Exam simulation — timed exam mode with countdown, or untimed practice
- Performance analytics — track your scores over time with visual breakdowns
- Bloom's taxonomy difficulty levels — Easy, Medium, and Hard question tiers
- Multi-language support — English and German
- Custom instructions — fine-tune how the AI generates your questions
- Node.js 18+
- pnpm
- Python 3.9+ (for PDF text extraction)
- Clone the repository:
git clone https://github.com/usestark/stark.git
cd stark- Install dependencies:
pnpm install- Set up the Python environment for PDF processing:
pnpm setup
# or manually: bash scripts/setup.shThis creates a Python virtual environment and installs pypdfium2 and Pillow.
- Configure your API keys:
cp .env.example .env.localEdit .env.local and add your API keys (see Environment Variables below).
- Start the development server:
pnpm dev- Open http://localhost:3000 in your browser.
| Layer | Technology |
|---|---|
| Framework | Next.js 16 (App Router), React 19 |
| Language | TypeScript |
| Styling | Tailwind CSS 4 |
| Local Storage | Dexie.js (IndexedDB) |
| PDF Extraction | pypdfium2 (fast), OpenAI Vision gpt-4o-mini (OCR fallback) |
| AI Generation | OpenAI GPT-4o Mini, Anthropic Claude Sonnet |
| Charts | Recharts |
| Validation | Zod |
| Variable | Required | Description |
|---|---|---|
OPENAI_API_KEY |
Yes | Powers test generation (GPT-4o Mini) and Vision OCR for scanned PDFs |
ANTHROPIC_API_KEY |
No | Enables Claude Sonnet as an alternative AI model for generation |
STARK_VENV_PATH |
No | Custom path to the Python virtual environment (default: ~/.stark-venv) |
STARK is designed to be self-hosted. For detailed deployment instructions, including Docker setup and reverse proxy configuration, see docs/SELF-HOST.md.
Contributions are welcome. Please read CONTRIBUTING.md before submitting a pull request.
STARK is licensed under the MIT License.