DEV Community

Diya
Diya

Posted on

I built a self-hosted "Git for AI prompts" — version control, test runner & A/B testing (open source)

If you're building anything with LLMs, you've probably hit this problem: your prompts are scattered across code files, Notion docs, and Slack threads. There's no version history. You can't easily test a change. And you have no idea what's actually running in production.
I built Prompt Vault to fix this — a self-hosted web app that treats your prompts like code.
What it does
Version control — every edit creates a new version. You can activate any version at any time, just like git checkout.
Auto-detected variables — use {{variable}} syntax in your prompts. The UI automatically detects them and lets you fill values before testing.
Test runner — run any prompt version directly against OpenAI from the UI. See the response, latency, and token usage instantly.
A/B testing — create a test between two prompt versions, run both in parallel, and compare outputs side by side.
Multi-user — JWT auth, each user's data is fully isolated.
Self-hosted — Docker Compose for one-command setup. Your prompts stay on your infrastructure.
Tech stack

Backend: NestJS + TypeScript
Database: PostgreSQL + Prisma
Frontend: Next.js 15 + Tailwind CSS
Auth: JWT + bcrypt
AI: OpenAI API

Quick start
bashgit clone https://github.com/DIYA73/prompt-vault
cd prompt-vault/backend
cp .env.example .env

Add your DATABASE_URL and OPENAI_API_KEY

npm install
npx prisma generate
npx prisma migrate dev --name init
npm run start:dev

New terminal

cd ../frontend
npm install
npm run dev
Open http://localhost:3000 — register, create a project, add your first prompt.
Why I built it
Every team I've seen building LLM features manages prompts the same broken way — hardcoded strings in source code, no history, no way to safely iterate. Prompt Vault is the tool I wished existed.
GitHub
https://github.com/DIYA73/prompt-vault
Would love feedback — especially from anyone managing prompts at scale.

Top comments (0)