🚀 This project was generated using Firebase Studio
A Next.js (App Router) + React application for optimizing and comparing AI-generated code prompts. Quickly refine your prompts, test them, and compare outputs side-by-side to find the best-performing prompt for your coding tasks.
- Prompt Optimization: Refine your initial code prompt using an AI-powered optimization flow.
- Sample Testing: Generate code outputs from both original and optimized prompts.
- Output Comparison: Compare side-by-side outputs and view a summary of key differences.
- Multi-language Support: Choose from common programming languages like C#, Python, JavaScript, TypeScript, Java, C++, and Go.
- Live Toast Notifications: Get real-time feedback on actions (optimize, test, compare).
- Easy Navigation: GitHub link in header for quick access to source.
You can view a live demo or run locally:
- Live Demo: https://codeprompt.blazorserver.com/
- GitHub: https://github.com/neozhu/codeprompts-optimizer
-
Clone the repository
git clone https://github.com/neozhu/codeprompts-optimizer.git cd codeprompts-optimizer
-
Install dependencies
npm install # or yarn install
-
Setup environment Create a
.env.local
file in the project root:NEXT_PUBLIC_OPENAI_API_KEY=your_openai_api_key
-
Run in development
npm run dev # or yarn dev
The app will be available at
http://localhost:3000/
.
- Select a language from the dropdown (default: C#).
- Enter your coding prompt in the text area.
- Optimize Prompt to generate a refined AI prompt.
- Test Prompts once the optimized prompt appears to see both outputs.
- Compare Outputs to get a summary of differences.
├── app/ # Next.js App Router pages
│ └── page.tsx # Home page component
├── components/ # Reusable UI components
│ ├── ui/ # Tailwind-based UI primitives
│ └── ...
├── ai/ # AI flow definitions (optimize, generate, summarize)
├── hooks/ # Custom React hooks (e.g., use-toast)
├── public/ # Static assets (icons, images)
├── styles/ # Global CSS / Tailwind config
└── README.md # This file
Contributions are welcome! Please open an issue or submit a pull request:
- Fork the repo
- Create a new branch (
git checkout -b feature/YourFeature
) - Commit your changes (
git commit -m 'Add YourFeature'
) - Push to branch (
git push origin feature/YourFeature
) - Open a Pull Request
This project is licensed under the MIT License. See LICENSE for details.
Developed by neozhu