Smart Menu App is a full-stack application that generates personalized weekly menus using OpenAI. It consists of a Java Spring Boot backend and a React frontend.
- smart-menu-server – Spring Boot REST API providing menu generation, user authentication and scheduled weekly emails.
- smart-menu-client – React + Vite frontend for user interaction and menu display.
- Java 21 (Maven wrapper included)
- Node.js (version 18 or newer recommended)
- PostgreSQL database
Set the following variables to run the backend:
DB_URL– JDBC connection stringDB_USER– database userDB_PASSWORD– database passwordJWT_SECRET– secret used for JWT tokensOPENAI_API_KEY– API key for menu generationMAIL_USERNAMEandMAIL_PASSWORD– credentials for Mailgun SMTPURL_PATH– base URL used in password reset emails
Configuration keys are defined in application.properties:
spring.datasource.url=${DB_URL}
spring.datasource.username=${DB_USER}
spring.datasource.password=${DB_PASSWORD}
jwt.secret=${JWT_SECRET}
spring.ai.openai.api-key=${OPENAI_API_KEY}
...
The frontend expects VITE_API_URL that points to the backend API:
const API_URL = import.meta.env.VITE_API_URL;
cd smart-menu-server
./mvnw spring-boot:runcd smart-menu-client
npm install
npm run devThe frontend will default to http://localhost:5173 and proxy requests to the API specified by VITE_API_URL.
To produce an executable JAR and Docker image:
cd smart-menu-server
./mvnw packageThe resulting JAR can be run with java -jar target/smart-menu-server-0.0.1-SNAPSHOT.jar. A Dockerfile is also included for containerised deployments.
For the client:
cd smart-menu-client
npm run build- User authentication and profile creation
- AI generated menus with detailed recipes
- Weekly menu emails with attached PDF
- React interface with protected routes and Tailwind styling