Skip to content

shodiBoy1/stark

Repository files navigation

STARK

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.

License: MIT Next.js 16 TypeScript

stark.mp4

Features

  • 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

Quick Start

Prerequisites

  • Node.js 18+
  • pnpm
  • Python 3.9+ (for PDF text extraction)

Installation

  1. Clone the repository:
git clone https://github.com/usestark/stark.git
cd stark
  1. Install dependencies:
pnpm install
  1. Set up the Python environment for PDF processing:
pnpm setup
# or manually: bash scripts/setup.sh

This creates a Python virtual environment and installs pypdfium2 and Pillow.

  1. Configure your API keys:
cp .env.example .env.local

Edit .env.local and add your API keys (see Environment Variables below).

  1. Start the development server:
pnpm dev
  1. Open http://localhost:3000 in your browser.

Tech Stack

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

Environment Variables

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)

Self-Hosting

STARK is designed to be self-hosted. For detailed deployment instructions, including Docker setup and reverse proxy configuration, see docs/SELF-HOST.md.

Contributing

Contributions are welcome. Please read CONTRIBUTING.md before submitting a pull request.

License

STARK is licensed under the MIT License.

About

Self-hosted, AI-powered exam prep tool. Upload lecture PDFs, generate realistic practice exams with OpenAI or Anthropic.

Resources

License

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors