A Vibe Coding Project - Built with AI 🤖💻
PromptDoctor is an advanced, gamified, and interactive Prompt Engineering tool. It helps you generate perfect prompts following the CO-STAR structure (Context, Objective, Style, Tone, Audience, Response), enhancing the process with semantic analysis driven by a Local LLM (Ollama) orchestrated through LangGraph.
This entire project is the result of Vibe Coding (AI-Assisted Software Engineering). The code architecture, the complex logic of the AI nodes, the user interface, and even the real-time Streamlit streaming of the agents' reasoning were created by interacting, iterating, and pairing with Artificial Intelligence.
- Client-Server Architecture: Separated FastAPI backend for heavy AI logic and Streamlit frontend.
- CO-STAR Generator: Transforms generic requests into highly effective, structured prompts.
- Multi-Agent Reasoning (LangGraph): A real team of agents (Business Analyst, Judge, and Software Architect) analyzes your requests in the background.
- Local AI Pattern Engine: Intelligent recognition of frameworks and tech stacks using locally executed LLMs (secure and private).
- Gamification & Scoring: Each prompt gets a score based on iterations, tokens, and AI usage. Aim for the perfect high-score streak to unlock Easter eggs!
- Prompt Library (Database): Automatic saving of all generated prompts in a local SQLite DB to retrieve them easily later.
- UI & Frontend (Client): Streamlit + Custom CSS
- API Backend (Server): FastAPI + Uvicorn
- AI Orchestration: LangChain & LangGraph
- Local LLM Integration: Ollama
- Database: SQLite3 (Embedded)
-
Clone the repository.
-
Create your Virtual Environment and install dependencies:
pip install -r requirements.txt
-
Start Ollama (make sure it's running in the background and you have downloaded a model, e.g.,
ollama run mistralorllama3). -
Start the Application: Open a terminal, activate your environment, and launch the main entry point which will automatically start both the backend server and the frontend UI:
python run.py
Alternatively, you can start the services manually in separate terminals:
API Backend Server:
uvicorn src.api_server:app --host 0.0.0.0 --port 8000 --reload
Streamlit Frontend: Open a second terminal and run:
streamlit run src/app.py
Enjoy vibe coding! 🌊