Skip to content

Dostam-07/PromptForge

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

1 Commit
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

✦ PromptForge

A fully local AI chatbot that turns any conversation into a production-quality prompt

Python React FastAPI Ollama TailwindCSS Privacy

No API keys. No accounts. No data leaves your machine.


What is PromptForge?

PromptForge is a chatbot first, prompt generator in parallel. It runs entirely on your local machine via Ollama β€” open a conversation, explore ideas freely, then fire a single slash command to convert the whole thread into a production-quality prompt for any AI tool.

The insight it's built on: you already know what you want β€” you just need help saying it right.

You say:       "a girl standing in a garden"
               ──── /image ────▢
PromptForge:   A young woman with flowing auburn hair stands in a sun-drenched
               English cottage garden at golden hour, wearing a white linen dress.
               Soft bokeh roses in the foreground. Cinematic lighting, 50mm lens,
               shallow depth of field, photorealistic, 8K UHD. Shot by Annie Leibovitz.

               Negative: cartoon, anime, blur, watermark, lowres, flat lighting
               Best for: Midjourney Β· Flux Β· Stable Diffusion

How the flow works

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  1. Chat freely β€” no setup needed                                   β”‚
β”‚                                                                     β”‚
β”‚     "I want a login form in React"                                  β”‚
β”‚     "TypeScript, with JWT and CSRF protection"                      β”‚
β”‚     "Should pass WCAG AA accessibility"                             β”‚
β”‚                                                      ↕ back & forth β”‚
β”‚  2. Type a slash command when ready                                  β”‚
β”‚                                                                     β”‚
β”‚     /code   /image   /video   /project   /brainstorm   /prd         β”‚
β”‚                                                                     β”‚
β”‚  3. PromptForge reads the full conversation and synthesizes         β”‚
β”‚     a production-quality prompt β€” not just your last message        β”‚
β”‚                                                                     β”‚
β”‚     The thread stays intact. Chat and prompts live together.        β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Features

πŸ’¬ Chat First, Always

Land in a chat interface with no mode selected, no forced setup. Talk freely β€” ask questions, think out loud, explore an idea. The AI is a fully capable local assistant powered by whichever Ollama model you have. Prompt generation is an option, never an obligation.

🧠 Brainstorm Mode

Type /brainstorm to enter a focused idea-exploration session. The assistant shifts into a dedicated mode: it asks one clarifying question per turn, surfaces constraints you haven't considered, and keeps responses tight (under 120 words) to maintain a productive back-and-forth rhythm. When you're ready, one slash command converts the whole conversation into a prompt.

✦ 8 Prompt Modes β€” Each Deeply Tuned

Every mode uses a domain-specific system prompt engineered to produce genuinely useful output, not generic rewrites:

Mode Slash What gets added to your idea
πŸ–ΌοΈ Image gen /image Subject, lighting, lens spec, art style, color palette, mood, negative prompt
🎬 Video gen /video Camera movement, shot type, duration, frame rate, scene transitions, style ref
πŸ’» Coding /code Language, architecture, validation, security, tests, edge cases, accessibility
πŸ“‹ Project / PRD /project Goals, personas, MoSCoW features, metrics, timeline, risks, out-of-scope
πŸ“‹ Full PRD /prd Complete Product Requirements Document β€” sections, OKRs, user flows, tech spec
πŸ€– AI Agent /agent Persona, capabilities, constraints, tool access, failure modes, few-shot examples
✍️ Creative /creative POV, tense, tone, pacing, sensory details, conflict arc, character depth
πŸ” Research /research Scope, methodology, output format, citation style, sub-questions, counter-arguments
πŸ—£οΈ Chat Prompt /chat Context, desired format, tone, audience, examples, constraints

🎯 Platform-Aware Output

Tell PromptForge which tool you're targeting β€” by slash command or plain English β€” and it formats the output to match that platform's exact conventions:

/claude            /midjourney        /cursor            /sora
/stable-diffusion  /flux              /opencode          /runway
/nanobanana        /copilot           /windsurf          /comfyui
... and 13 more

Or just say "give me a prompt for Cursor" β€” the app parses your intent automatically.

πŸ“Ž File Context

Attach files and PromptForge injects their content as context for enhancement:

Type What's extracted
PDF Full text
Images Description via vision model
Code files (.py .js .ts) Structure and function signatures
CSV / JSON Schema and sample data
Markdown / TXT / DOCX Full content

πŸ“š Prompt Library

Every enhanced prompt is auto-saved. Browse examples, filter by mode or platform, copy with one click, or load any saved prompt back into the chat to continue from where you left off.

⌨️ Slash Command Palette

Type / anywhere in the input to open a live-filtered command palette. Every mode, platform, and special command is one keystroke away:

/brainstorm   Explore ideas collaboratively before committing to a prompt
/image        Image generation prompt
/video        Video generation prompt
/code         Production-ready coding prompt
/project      Project brief / PRD prompt
/prd          Full Product Requirements Document
/agent        AI agent system prompt
/creative     Creative writing prompt
/research     Structured research prompt
/chat         Conversational prompt clarity
/search       Web search with cited sources
/prompt       Prompt it β€” enhance the current conversation now
/claude       Target Claude  Β· /midjourney  Β· /cursor  Β· /opencode ...

πŸ’Ύ Persistent Session Context

Every conversation auto-saves to a local .md file. Restart the app and resume exactly where you left off β€” message history, active mode, platform, and your notes, all preserved.


Quick Start

Prerequisites

  • Ollama installed and running
  • Python 3.10+
  • Node.js 18+

1. Pull models

# Primary reasoning model β€” pick based on available VRAM
ollama pull hermes3:8b        # 8 GB β€” excellent for prompt engineering
ollama pull qwen3:4b          # 4 GB β€” solid fallback

# Coding specialist (recommended for /code and /prd modes)
ollama pull qwen2.5-coder:7b

# Embedding model (for semantic library search)
ollama pull nomic-embed-text

2. Start the backend

cd backend
pip install -r requirements.txt
uvicorn main:app --reload --port 8000

Windows: py -m pip install -r requirements.txt Β· py -m uvicorn main:app --reload --port 8000

3. Start the frontend

cd frontend
npm install
npm run dev

Open http://localhost:5173 β€” start chatting.


Example sessions

Brainstorm β†’ Image prompt

You:           I want a cyberpunk cityscape for Midjourney
PromptForge:   Neon-soaked rain streets or dry brutalist megacity?

You:           Neon rain, Blade Runner feel, lone figure silhouette
PromptForge:   Wide shot or closer β€” should the city feel huge around them?

You:           Wide shot, city dwarfs them
You type:      /image

PromptForge ✦  A lone silhouetted figure stands on a rain-slicked neon-lit
               street at the base of towering brutalist skyscrapers. Glowing
               holographic advertisements reflect in deep puddles. Cinematic
               wide shot, anamorphic lens flare, Blade Runner 2049 palette
               (deep teal + electric orange), 8K, sharp focus, film grain.

               Negative: flat lighting, daytime, cartoon, blur, watermark
               Best for: Midjourney Β· Flux Β· Stable Diffusion

Direct enhance (no chat needed)

Type:  /code build a JWT login form in React with TypeScript

PromptForge ✦  Create a production-ready React login form using TypeScript
               and React Hook Form. Requirements: email + password fields
               with Zod validation, WCAG 2.1 AA accessible labels and error
               messages, show/hide password toggle, loading state on submit,
               JWT stored in httpOnly cookie (no localStorage), CSRF token
               header support. Handle: 429 rate limiting, network errors,
               expired token redirect. Include React Testing Library tests.
               Use TailwindCSS for styling.

Natural language platform targeting

Type:  give me a prompt for Cursor to build a REST API

β†’ Detects "Cursor" β†’ activates code mode
β†’ Asks clarifying questions about the API
β†’ "✦ Prompt it" generates output in Cursor's preferred format

Keyboard shortcuts

Action Shortcut
Send message Enter
Enhance conversation Ctrl+Enter
Open command palette /
Switch to image mode /image
Switch to code mode /code
Start brainstorm /brainstorm
Generate full PRD /prd

Project structure

promptforge/
β”œβ”€β”€ backend/
β”‚   β”œβ”€β”€ main.py                    # FastAPI app, CORS, router registration
β”‚   β”œβ”€β”€ routers/
β”‚   β”‚   β”œβ”€β”€ enhance.py             # POST /enhance, POST /enhance/chat
β”‚   β”‚   β”œβ”€β”€ library.py             # Prompt library CRUD
β”‚   β”‚   β”œβ”€β”€ files.py               # File upload + text extraction
β”‚   β”‚   └── models.py              # Ollama model list
β”‚   β”œβ”€β”€ services/
β”‚   β”‚   └── meta_prompts.py        # All system prompts per mode
β”‚   └── requirements.txt
β”‚
└── frontend/
    └── src/
        β”œβ”€β”€ App.jsx                # Root β€” session state, enhance/chat logic
        β”œβ”€β”€ components/
        β”‚   β”œβ”€β”€ ChatArea.jsx       # Message feed, enhanced prompt cards
        β”‚   β”œβ”€β”€ InputBar.jsx       # Textarea, slash commands, file attach
        β”‚   β”œβ”€β”€ Sidebar.jsx        # Mode nav, Ollama status
        β”‚   β”œβ”€β”€ Topbar.jsx         # Model picker, Library toggle
        β”‚   β”œβ”€β”€ PromptLibrary.jsx  # Saved + example prompt browser
        β”‚   β”œβ”€β”€ CopyButton.jsx
        β”‚   └── PlatformTags.jsx
        β”œβ”€β”€ lib/
        β”‚   β”œβ”€β”€ ollama.js          # Ollama API client, model picking, JSON parsing
        β”‚   └── providerIntent.js  # "give me a prompt for X" detection
        β”œβ”€β”€ hooks/
        β”‚   └── useModels.js       # Model list + per-mode auto-selection
        └── constants/
            β”œβ”€β”€ modes.js           # Mode definitions, meta-prompts, slash commands
            β”œβ”€β”€ platforms.js       # 25 supported AI platforms
            └── platformGuides.js  # Per-platform formatting guides

Supported platforms

PromptForge knows the formatting conventions for 25 AI tools:

Category Platforms
Chat AI ChatGPT, Claude, Gemini, Kimi, Perplexity, Grok, Meta AI, Ollama
Image Midjourney, DALLΒ·E, Stable Diffusion, Flux, Nanobanana, Ideogram, Leonardo AI, ComfyUI
Video Sora, Runway, Kling, Pika
Code Cursor, GitHub Copilot, Antigravity, Windsurf, OpenCode

πŸ”’ Privacy

Everything stays on your machine:

  • Ollama runs models locally at localhost:11434 β€” no cloud calls
  • No telemetry, no accounts, no API keys required
  • Uploaded files are processed in memory, never stored on disk
  • Prompt library is in a local SQLite file (backend/promptforge.db)
  • Session context saved to a local .md file you own and control

Tech stack

Layer Technology
Frontend React 18 + Vite + TailwindCSS
Backend FastAPI (Python 3.10+)
LLM runtime Ollama (local, any model)
Storage SQLite for prompts Β· .md file for session context
Dev proxy Vite β†’ Ollama (/ollama) + FastAPI (/api)

Roadmap

  • MCP server β€” expose PromptForge as a tool inside Claude Desktop and other MCP clients
  • Browser extension β€” "Enhance with PromptForge" button injected into ChatGPT, Claude, Midjourney, and Cursor

Built for people who know what they want but need help saying it right.

Get Ollama β†’ Β· Open an issue β†’

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors