Skip to content

Latest commit

 

History

5 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RefineSnap — AI Image Generator

Turn a text prompt into a stunning HD image in seconds.

Spring Boot Spring AI OpenAI Java

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.


Demo

Screenshot 2026-04-17 203058

Features

  • HD image generation via OpenAI DALL·E 3 (1792×1024, natural style)
  • Clean, responsive UI — no framework dependencies
  • Spring AI ImageModel abstraction for easy provider swapping
  • Fully configurable quality, dimensions, and style via OpenAiImageOptions
  • RESTful API backend ready to plug into any frontend or mobile app

Tech Stack

Layer Technology
Frontend HTML5, CSS3, Vanilla JavaScript
Backend Java 21, Spring Boot 3, Spring AI
AI Provider OpenAI DALL·E 3
Build Maven

Getting Started

Prerequisites

  • Java 21+
  • Maven
  • OpenAI API key

Clone & run

git clone https://github.com/your-username/refine-snap-image-generator.git
cd refine-snap-image-generator

Set your API key

In src/main/resources/application.properties:

spring.ai.openai.api-key=YOUR_OPENAI_API_KEY

Start the server

mvn spring-boot:run

Open index.html in your browser or serve it with any static file server.


API Reference

POST /api/images/generate
Content-Type: application/json

{
  "prompt": "A futuristic city skyline at golden hour, photorealistic"
}

Response:

{
  "imageUrl": "https://..."
}

Architecture

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

Contributing

PRs are welcome. Please open an issue first for major changes.


License

MIT


Built by [Your Name] · Open to full-stack and AI engineering roles · LinkedIn

About

Full-stack AI image generation app — Spring Boot + Spring AI backend calling OpenAI DALL·E 3, with a clean vanilla JS frontend. Type a prompt, get a 1792×1024 HD image.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages