Turn a text prompt into a stunning HD image in seconds.
A full-stack AI image generation platform built with a vanilla JavaScript frontend and a Spring Boot backend powered by Spring AI. Type a prompt, hit generate, get a 1792×1024 HD image — no fuss.
- HD image generation via OpenAI DALL·E 3 (1792×1024, natural style)
- Clean, responsive UI — no framework dependencies
- Spring AI
ImageModelabstraction for easy provider swapping - Fully configurable quality, dimensions, and style via
OpenAiImageOptions - RESTful API backend ready to plug into any frontend or mobile app
| Layer | Technology |
|---|---|
| Frontend | HTML5, CSS3, Vanilla JavaScript |
| Backend | Java 21, Spring Boot 3, Spring AI |
| AI Provider | OpenAI DALL·E 3 |
| Build | Maven |
- Java 21+
- Maven
- OpenAI API key
git clone https://github.com/your-username/refine-snap-image-generator.git
cd refine-snap-image-generatorIn src/main/resources/application.properties:
spring.ai.openai.api-key=YOUR_OPENAI_API_KEYmvn spring-boot:runOpen index.html in your browser or serve it with any static file server.
POST /api/images/generate
Content-Type: application/json
{
"prompt": "A futuristic city skyline at golden hour, photorealistic"
}Response:
{
"imageUrl": "https://..."
}The backend uses Spring AI's ImageModel abstraction to decouple the application from OpenAI's SDK directly. Swapping to another image provider (Stability AI, etc.) requires changing a single bean — no business logic changes.
Frontend (HTML/JS)
└── POST /api/images/generate
└── ImageService
└── Spring AI ImageModel
└── OpenAI DALL·E 3
PRs are welcome. Please open an issue first for major changes.
MIT
Built by [Your Name] · Open to full-stack and AI engineering roles · LinkedIn