A Spring application that serves as the backend for the angular frontend. This serves as a customized intermediate between the angular frontend and OpenAI/Stability AI servers.
- Put your OpenAI key in a file named
bmc.env
in the same folder as this README. The structure of thebmc.env
file is :-OPENAI_API_KEY=xxxxx STABILITY_AI_API_KEY=xxxxxx
- The backend will not be able to communicate with the OpenAI servers without the API key.
This project uses Maven as it's build tool. It was tested using Adoptium Termurin OpenJDK, but should work on any JDK.
Open the imgGenRestAPI.java file in any IDE like or
IntelliJ Ideai or VSCode (with
the Extension Pack for Java installed).
It has a main
function which you can run.
- In the backend-ImgGen folder, run
mvnw spring-boot:run
The imgGenRestAPI.java file has the main
function which will run the app.
Refer to comments in the JavaDoc format written with each file and the important functions they contain.