TestForge

πŸ§ͺ TestForge v2 β€” turn any AI chat into an exam hall

TestForge is a Chrome extension for students who study with AI. You tell it your syllabus, it writes a precision prompt for your own AI chat (ChatGPT, Claude, Gemini β€” anything), the AI replies with a structured test file, and TestForge turns that into an interactive, auto-graded, full-page test.

No scraping. No DOM injection. No API keys. The AI’s answer travels by copy-paste, which makes TestForge platform-agnostic and immune to chat UI changes β€” and it means the test is built from the context of your actual study conversation, not from a cold prompt.

The loop

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”   1. topics, counts,     β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  TestForge β”‚      difficulty          β”‚   Your AI chat  β”‚
β”‚   (Build)  β”‚ ───► curated prompt ───► β”‚ (ChatGPT/Claude β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜      (you copy-paste)    β”‚    /Gemini)     β”‚
      β–²                                 β””β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”˜
      β”‚ 4. interactive full-page test           β”‚ 2. replies with
      β”‚    auto-graded locally                  β”‚    one JSON block
β”Œβ”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”                                  β”‚
β”‚  TestForge β”‚ ◄──── 3. paste / drop JSON β”€β”€β”€β”€β”€β”€β”˜
β”‚  (Import)  β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

If the AI’s JSON is malformed, TestForge generates a repair prompt you paste back β€” the AI fixes its own output.

Question types

mcq Β· truefalse Β· short Β· long Β· fillblank Β· match

Grading (all local, instant, zero tokens)

Project layout

frontend/   Chrome extension (Manifest V3, React + Vite + TypeScript)
  β”œβ”€ popup.html         quick launcher
  β”œβ”€ app.html           full-page app: Build / Import / Take / Results / History
  └─ src/core/          schema (zod), prompt generator, grading engine, storage
backend/    Express + TS placeholder β€” NOT needed by the MVP (see backend/README.md)

Install & run (extension)

cd frontend
npm install
npm run build          # β†’ frontend/dist
  1. Open chrome://extensions, enable Developer mode
  2. Load unpacked β†’ select frontend/dist
  3. Pin πŸ§ͺ TestForge and click it

UI development without Chrome APIs

cd frontend && npm run dev

Open http://localhost:5173/app.html β€” storage transparently falls back to localStorage in a plain tab.

Roadmap (post-MVP, in order)

  1. Website phase β€” hosted test-taking app + shareable test links
  2. BYO API key β€” skip the copy-paste loop for users who have keys
  3. Claude connectors / MCP β€” let the AI push the test JSON directly
  4. AI round-trip grading as an optional deep-feedback mode (kept out of MVP: it spends the user’s tokens)

Why not DOM injection?

v1 (GeminiITUpgrade) injected prompts into Gemini’s input and scraped responses from the page. It worked, but it was coupled to one platform, broke when the UI changed, and sat in a ToS gray zone. v2 trades one paste of friction for portability, stability, and safety.