A web application that automatically improves AI prompts (for GPT, Claude, Gemini, etc.) and asks follow-up questions when the prompt is too vague.
This project was created to get hands-on experience with Vue.js and Spring Boot, while integrating the OpenAI API.
- Analyze user prompts to check if they're clear enough
- Automatically optimize prompts based on the selected model (GPT-3.5, GPT-4, Claude 3, Gemini…)
- Generate clarifying questions when needed
- View prompt history
- One‑click copy for prompts and results
- Frontend built with Next.js + Tailwind CSS
- Backend using Spring Boot (Java) + OpenAI API
- User registration and login system
A Docker Compose file is provided to run Postgres locally.
Start Postgres:
docker compose up -dDefault connection details:
- Host: localhost
- Port: 5432
- Database: po_db
- User: postgres
- Password: postgres
Update your Spring Boot configuration (application.yml) to match these values if needed.
- Clone the repository:
git clone https://github.com/adrienfrsn/prompt-optimizer.git
cd prompt-optimizer/backend- Copy the configuration template and fill in your credentials:
cp src/main/resources/application.yml.example src/main/resources/application.ymlThen edit application.yml to include your database details (see above) and OpenAI API key.
- Run the backend:
mvn spring-boot:runBy default, the backend runs on http://localhost:8080
- Go to the frontend directory:
cd ../frontendv2- Install dependencies:
npm install- Start the development server:
npm run devThe app should be accessible at http://localhost:3000
- Edit final prompt
- Execute prompt
- User settings
- Deployment


