Skip to content

Java Spring Boot app using Spring-AI (OpenAI Model) for chat, image generation and cuisine recipe creation via REST-API (controller–service), paired with a React front-end UI.

Notifications You must be signed in to change notification settings

jorgepiconjr/Spring-AI-OpenAI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Java Spring AI - Full Stack Project

Java Spring Boot app using Spring AI Framework (OpenAI Model), exposing a clean REST API (controller–service) for chat, image generation, and cuisine recipe creation, paired with a JavaScript/React front-end User Interface.

Table of Contents


About the Project

Java Spring Boot application integrating Spring AI (OpenAI) with a clean controller–service REST API and a React frontend User Interface. It provides:

  • Chat: Conversation Service with optional system prompts.
  • Image generation: Service that accepts a prompt and returns up to 4 images.
  • Recipe creation: Service that generates structured cooking recipes (title, ingredients with quantities, steps, and optional dietary tags).

Configurable model settings (model name, temperature, max tokens) via application properties and typed DTOs. The React SPA offers dedicated views for Chat, Images, and Recipes, calling the API via fetch/axios, showing loaders and errors, and rendering chat threads, image previews/downloads, and recipe cards in a responsive UI.

Technologies Used

  • Java
  • Spring Boot Framework
  • Spring AI (OpenAI Model)
  • JavaScript & REACT
  • REST API
  • Model–view–controller (MVC) architecture

Services Details

  1. MyAI
  • MyAI service contains the implementation of the Backend, that is, the use of Java with Spring Framework implementing Spring AI together with the OpenAI Model.
  • MyAI implements a controller-service architecture, where the respective services are Chat, Image, and Recipe Generator, which interact through a REST API with the frontend integrated in JavaScript/React.
  1. my-ai-react
  • my-ai-react contains the frontend implementation communicating directly with the backend, allowing for pleasant user interaction and providing a pleasant user interface.

Screenshots

In the following images, we see examples of prompts entered by the user along with the response generated by the AI (text or image).

Chat

image_alt

Image generation

image_alt

Recipe creation

image_alt

About

Java Spring Boot app using Spring-AI (OpenAI Model) for chat, image generation and cuisine recipe creation via REST-API (controller–service), paired with a React front-end UI.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages