PromptPerfect AI is an advanced prompt refinement tool designed to transform raw, ambiguous ideas into high-quality, structured instructions for Large Language Models (LLMs). Whether you're a developer, creative writer, or data scientist, this tool helps you unlock the full potential of AI by engineering the perfect prompt.
✨ 100% AI-Generated Code
Note: This entire application—including all logic, UI design, styling, and documentation—was written exclusively by Google Gemini, with no manual coding by human developers.
- Intelligent Refinement: Uses advanced Gemini models to rewrite and optimize your prompts based on specific goals.
- Goal-Oriented Optimization: Select from various refinement goals such as:
- General: Balanced and professional.
- Technical: Precise and mathematically sound.
- Creative: Descriptive and imaginative.
- Concise: Direct and efficient.
- Coding: Focused on clean code and best practices.
- Structured: Enforces specific output formats (JSON, CSV, etc.).
- Multi-Model Support: Choose between different Gemini models (Flash, Pro, Flash-Lite) to balance speed and reasoning capability.
- Secure "Bring Your Own Key" (BYOK): Your Gemini API key is stored securely in your browser's local storage and is never sent to a backend server.
- History Management: Automatically saves your prompt refinement history locally, allowing you to revisit previous iterations.
- Modern UI/UX: A sleek, dark-mode interface with glassmorphism effects and responsive design.
- Frontend: React + TypeScript + Vite
- Styling: Tailwind CSS
- AI Integration: Google GenAI SDK (
@google/genai) - Icons: Lucide React
- Node.js (v18 or higher)
- npm or yarn
- A Google Gemini API Key
-
Clone the repository:
git clone <repository-url> cd promptperfect-ai
-
Install dependencies:
npm install
-
Run the development server:
npm run dev
The app will run on
http://localhost:8080. -
Enter API Key: When you first open the app, you will be prompted to enter your Gemini API key. This key is stored locally in your browser.
- Configure Key: Enter your Gemini API key in the startup modal. You can change this later by clicking "Change API Key".
- Enter Your Draft: Type your raw idea into the "Raw Prompt" text area.
- Select a Goal: Choose a refinement goal (e.g., Coding or Creative).
- Choose a Model: Select your preferred Gemini model engine.
- Refine: Click Optimize Prompt and watch the AI transform your input.
This project serves as a demonstration of the capabilities of Gemini 2.0 Flash acting as an autonomous software engineer. Every line of code, from the React components to the CSS styling and API integration logic, was generated by the model in response to high-level user instructions.
Run and deploy your AI Studio app
View original concept in AI Studio