Better prompts start with better questions.
PromptMind was developed as the capstone project for the Vibe Coding Program by SDAIA Academy.
- Overview
- Live Demo
- Core Features
- How It Works
- Prompt Generation Boundary
- System Architecture
- Tech Stack
- Project Structure
- Local Setup
- Environment Variables
- Prompt Quality Score
- Data and Security
- Testing
- Current Scope
- Future Improvements
- Author
Many people know roughly what they want from an AI assistant but struggle to turn that idea into an effective prompt.
PromptMind closes that gap. It takes a rough idea, asks a small number of focused clarification questions, and turns the idea plus the user's answers into a clear, structured, reusable prompt — one the user can paste into any AI assistant to actually get the result they want.
PromptMind is a prompt-building tool, not a task-execution tool. It does not write the requested document, email, or code itself; it writes the instructions for another AI to do that. See Prompt Generation Boundary.
Live Website: https://promptmind-ai.netlify.app/
Alternative Deployment: https://promptmind-nada.netlify.app/
GitHub Repository: https://github.com/nadaalamri-9/PromptMind
The backend is not exposed as a separate public URL in this repository's configuration; the deployed frontend talks to a backend deployment configured through its own environment variables.
- Category selection (General, Work, Education, Technology, Creative, Marketing, Personal)
- Initial idea submission with a live character counter
- Intent analysis of the user's idea
- AI-generated, category-aware clarification questions with single/multiple-choice options and optional custom answers
- Reusable prompt generation based on the idea, category, detected intent, and the user's answers
- Prompt quality score (0–100) with a five-criterion breakdown
- Improvement notes describing what the generated prompt added over the raw idea
- Copy the generated prompt to the clipboard, from the result screen or from history
- Local prompt history stored in the browser
- Clear the entire local prompt history
- Loading, success, timeout, and error states for both the clarification and generation requests, with real backend error messages surfaced to the user
- Automatic smooth scroll to the generated-result card once it renders
- Responsive layout for desktop and mobile
- Detects the language of the user's idea (tested with English and Arabic) and responds in that language
- The user selects a category and enters an idea.
- The backend analyzes the request and detects the user's intent.
- Clarification questions are generated when information is missing.
- The user answers the clarification questions (or provides a custom answer).
- The backend retrieves relevant prompt-engineering guidance from ChromaDB (RAG) to inform how the final prompt should be structured.
- PromptMind generates a reusable prompt for another AI tool, along with a quality score and improvement notes.
- The user copies the prompt or it is saved to local history for later.
RAG and ChromaDB are used only during final prompt generation (step 5–6). The clarification stage (steps 2–3) does not query the knowledge base — it is a single, focused call to detect intent and form questions, kept fast on purpose.
PromptMind never performs the user's underlying task. It does not write the requested PRD, email, article, codebase, or other deliverable.
Instead, it produces a complete, reusable prompt that instructs another AI to produce that deliverable.
Example:
- User idea: "Create a PRD for PromptMind."
- PromptMind output: a reusable prompt beginning with something like "Act as a professional Product Manager and create a concise Product Requirements Document..." — not an actual PRD.
User Idea + Category
│
▼
React Frontend
│
▼
FastAPI Backend
│
▼
OpenAI analyzes the request
│
▼
Clarification Questions
│
▼
User Answers
│
▼
ChromaDB retrieves relevant
prompt-engineering guidance (RAG)
│
▼
OpenAI generates the final reusable prompt
│
├── Reusable Prompt
├── Quality Score
└── Improvement Notes
Frontend
- React
- Vite
- Vanilla CSS
- Framer Motion
Backend
- FastAPI
- Python
- OpenAI API (Responses API and Embeddings)
- ChromaDB
- Retrieval-Augmented Generation (RAG)
Deployment
- Netlify (frontend)
- Render (backend)
PromptMind/
├── backend/
│ ├── app/
│ │ ├── routes/
│ │ ├── services/
│ │ ├── rag/
│ │ ├── config.py
│ │ ├── exceptions.py
│ │ ├── schemas.py
│ │ └── main.py
│ ├── scripts/
│ ├── tests/
│ ├── .env.example
│ └── requirements.txt
│
├── frontend/
│ ├── public/
│ ├── src/
│ │ ├── assets/
│ │ ├── components/
│ │ ├── services/
│ │ ├── App.jsx
│ │ └── main.jsx
│ ├── .env.example
│ └── package.json
│
├── .gitignore
└── README.md
- Python 3.12 or later
- Node.js and npm
- An OpenAI API key
git clone https://github.com/nadaalamri-9/PromptMind.git
cd PromptMindcd backend
python -m venv .venv
.venv\Scripts\Activate.ps1
pip install -r requirements.txt
copy .env.example .envOpen backend/.env and add your OpenAI API key:
OPENAI_API_KEY=your_openai_api_keyBuild the RAG knowledge base:
python scripts\index_knowledge.py --rebuildStart the FastAPI development server:
uvicorn app.main:app --reloadThe backend runs at http://localhost:8000. Interactive API docs are available at http://localhost:8000/docs.
Open a second terminal:
cd frontend
npm install
copy .env.example .env
npm run devThe frontend runs at http://localhost:5173.
Backend (backend/.env, see backend/.env.example)
| Variable | Purpose |
|---|---|
OPENAI_API_KEY |
OpenAI API key used for analysis and generation |
OPENAI_MODEL |
Chat/completions model used for analysis and generation |
OPENAI_EMBEDDING_MODEL |
Embedding model used for RAG retrieval |
CHROMA_PERSIST_DIRECTORY |
Path to the on-disk ChromaDB store |
CHROMA_COLLECTION_NAME |
Name of the ChromaDB collection |
FRONTEND_ORIGINS |
Allowed CORS origin(s) for the frontend |
OPENAI_TIMEOUT_SECONDS |
Per-request timeout for OpenAI API calls |
OPENAI_MAX_RETRIES |
Bounded retry attempts for transient OpenAI errors |
RAG_TOP_K |
Number of chunks retrieved per RAG query |
RAG_RELEVANCE_THRESHOLD |
Minimum similarity score for a retrieved chunk |
APP_ENV |
Application environment name |
LOG_LEVEL |
Logging verbosity |
Frontend (frontend/.env, see frontend/.env.example)
| Variable | Purpose |
|---|---|
VITE_API_BASE_URL |
Base URL of the backend API |
Never commit real API keys or .env files.
PromptMind evaluates each generated prompt using five quality criteria, each worth 20 points:
| Criterion | Maximum Score |
|---|---|
| Goal clarity | 20 |
| Context completeness | 20 |
| Requirement specificity | 20 |
| Output definition | 20 |
| Ambiguity reduction | 20 |
| Total | 100 |
The backend scores the generated prompt against each criterion and returns the total as the final quality score.
- The OpenAI API key is stored only in
backend/.envand is never sent to the frontend - Environment files must not be committed to GitHub
- User prompts and answers are not stored in ChromaDB
- ChromaDB contains only curated prompt-engineering reference material
- Prompt history is stored locally in the browser using
localStorage, not on a server - No user authentication system or user database is used
The following should never be committed:
backend/.env
frontend/.env
backend/.venv/
__pycache__/
backend/app/rag/chroma/
Backend
cd backend
pytestThis runs the full backend suite (request validation, the analyze and generate stages, retrieval, and health checks) against a mocked OpenAI client. A small set of opt-in, real-API verification tests also exists in backend/tests/test_generate_live.py; they are skipped by default and only run when RUN_LIVE_OPENAI_TESTS=1 is set, since they call the real OpenAI API.
Frontend
cd frontend
npm testThis runs the frontend suite (frontend/src/services/promptApi.test.js), which covers request handling, timeout behavior, and error messaging for the API layer.
In scope
- The prompt creation workflow: idea, category, clarification questions, answers
- AI-generated clarification questions
- RAG-assisted reusable prompt generation
- Prompt quality score and improvement notes
- Local prompt history in the browser
- Responsive desktop and mobile interface
Out of scope
- User authentication
- A permanent cloud database
- Payments
- Team collaboration
- AI model selection by the user
- Direct execution of the generated prompts
- Add prompt export options
- Add reusable prompt templates
- Support additional languages
- Add optional user authentication
- Add cloud-based prompt history
- Expand the RAG knowledge base
- Add prompt comparison features
- Add prompt version history
Nada Alamri
Capstone Project — Vibe Coding Program by SDAIA Academy