Skip to content

Sarkonah718/promptforge

Repository files navigation

PromptForge

One prompt. Every model. Side by side.

A privacy-first prompt engineering studio that fans out a single prompt to many OpenAI-compatible models in parallel — Xiaomi MiMo, OpenAI, DeepSeek, Groq, Ollama, or any custom endpoint — and then lets one model judge the others.

Made with Next.js 16 TypeScript Tailwind CSS 4 License: MIT Default: Xiaomi MiMo

PromptForge — multi-model panel grid


Why PromptForge?

Prompt engineering is comparative work. You don't actually know if a prompt is good until you've seen it run on more than one model. Today most playgrounds force you to copy-paste the same prompt into 4 browser tabs.

PromptForge is a static Next.js single-page app that:

  • Sends one prompt to up to 8 model panels in parallel, each with its own provider, model, and temperature.
  • Streams content + reasoning (reasoning_content from MiMo / DeepSeek-R1) into collapsible panels in real time.
  • Tracks time-to-first-token, total time, and completion tokens per panel so you can compare both quality and speed.
  • Stores prompt templates with {{variables}} so you can iterate on a prompt without retyping it.
  • Has a Judge mode — pick any model as a referee, and it scores all other panel outputs on a customizable rubric and returns a sortable JSON-backed table.

Everything happens in your browser. No backend, no telemetry, no sign-up. Your API keys live in localStorage only.

Built for the MiMo era

Xiaomi's open MiMo V2.5 series is set as the default panel out of the box, with both the reasoning and flagship models pre-loaded:

  • mimo-v2.5-reasoning — long chain-of-thought, parsed into the collapsible panel
  • mimo-v2.5-flagship, mimo-v2.5-vision, mimo-v2.5-mini
  • Default base URL: https://api.xiaomimimo.com/v1
  • Settings dialog deep-links to https://platform.xiaomimimo.com/

But everything is provider-agnostic — bring any OpenAI-compatible endpoint.

Features at a glance

🔀 Parallel fan-out One prompt → 1-8 panels run concurrently with AbortController.
🧠 Reasoning panel Streams reasoning_content / reasoning deltas. Collapsible per panel.
🧩 Variables {{topic}}, {{audience}}, … auto-detected and rendered as inputs.
📚 Prompt library Save / load / delete templates in localStorage.
⚖️ Judge mode One model scores the others on correctness / reasoning / style / adherence. Returns JSON.
Per-panel stats Time-to-first-token, total elapsed, completion tokens.
🎛️ Per-panel temp Inline slider so you can A/B temperature on the same prompt.
🔌 Six providers built in MiMo • OpenAI • DeepSeek • Groq • Ollama • Custom.
🌗 Theme Light / dark / system, flicker-free.
🛡️ Privacy API keys & templates live in localStorage. No backend.

Screenshots

Multi-panel grid (dark) Variables filled, ready to run
Provider keys & endpoints Light mode

Getting started

Requires Node.js 20+.

git clone https://github.com/your-username/promptforge.git
cd promptforge
npm install
npm run dev
# open http://localhost:3000

Then open Settings, paste at least one provider key (MiMo at https://platform.xiaomimimo.com/ is the recommended default), and hit Run.

Usage walkthrough

  1. Pick or design panels. The default layout is MiMo + OpenAI + DeepSeek + Groq. Add up to 8, change provider/model per panel from the inline dropdown.
  2. Write a prompt. Use {{variables}} anywhere in the system or user prompt; PromptForge will surface them as input fields.
  3. Run. Every enabled panel gets its own streaming request. Time-to-first-token and total tokens are shown live.
  4. Judge. Open the judge bar, pick one model as the referee, click Judge. The referee gets your original prompt + every candidate output and returns a JSON array of { id, scores, total, verdict } rows that PromptForge renders as a sortable table.
  5. Save the template. Save writes the current prompt + variables into your library. Re-open later from Library.

Architecture

File Purpose
src/lib/streaming.ts OpenAI-compatible /chat/completions SSE streamer — content, reasoning, usage, ttft, abort.
src/lib/presets.ts Provider preset registry (MiMo, OpenAI, DeepSeek, Groq, Ollama, custom).
src/lib/storage.ts localStorage schema for keys, panels, templates, judge config, theme.
src/hooks/usePromptForge.ts Single hook orchestrating panels, templates, and parallel runs.
src/components/PanelCard.tsx A single model panel — header, stats, reasoning, markdown body.
src/components/JudgePanel.tsx LLM-as-judge implementation with rubric editing and a results table.

Data flow

                       ┌────────────┐
                       │   Prompt   │
                       │  + system  │
                       │ + vars     │
                       └─────┬──────┘
                             │
              applyVariables({{var}} → value)
                             │
        ┌────────────┬───────┼───────┬────────────┐
        ▼            ▼       ▼       ▼            ▼
   ┌────────┐  ┌────────┐ ┌────┐ ┌────────┐ ┌────────┐
   │ Panel 1│  │ Panel 2│ │ …  │ │ Panel N│ │ Judge  │
   │ MiMo   │  │ OpenAI │ │    │ │ Groq   │ │ (later)│
   │ stream │  │ stream │ │    │ │ stream │ │  POST  │
   └───┬────┘  └───┬────┘ └─┬──┘ └───┬────┘ └───┬────┘
       │ SSE       │ SSE    │        │ SSE      │ JSON
       ▼           ▼        ▼        ▼          ▼
       reasoning_content / content / usage  →  ranked table

Privacy

  • No backend. No analytics. No cookies.
  • API keys, prompts, and templates live in localStorage under promptforge:*:v1 keys. Open DevTools to inspect or clear them.
  • Every request goes from your browser directly to the provider you configured.

Development

npm run dev        # Next.js dev server (Turbopack)
npm run lint       # ESLint (flat config)
npm run typecheck  # tsc --noEmit
npm run build      # Production build

License

MIT — go forth and remix.

About

PromptForge — privacy-first prompt engineering studio. Run one prompt across many OpenAI-compatible models in parallel (Xiaomi MiMo, OpenAI, DeepSeek, Groq, Ollama), compare side-by-side, and use one model as a judge. Next.js 16 + React 19 + TypeScript + Tailwind CSS 4.

Topics

Resources

License

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors