Food Fiesta is a Spring Boot fullstack dining management application built with Java 21, Spring Boot 3.4.2, Thymeleaf, Spring Security, Spring Data JPA, and H2 for quick local development.
The project can also be configured to use PostgreSQL for deployment or production-style testing.
#SpringBoot #Java21 #RestAPI #BackendProject #H2Database #PostgreSQL #Thymeleaf #FullstackProject
- Premium Thymeleaf UI with modern CSS and JavaScript.
- Role-based admin and customer flows.
- Product inventory management.
- User registration and login.
- Order placement and order history.
- Spring Data JPA persistence.
- H2 database for fast local startup.
- Swagger/OpenAPI documentation.
- Optional Google OAuth2 login configuration.
| Layer | Technology |
|---|---|
| Backend | Java 21, Spring Boot 3.4.2, Spring Security, Hibernate |
| Database | H2 for local development, PostgreSQL optional |
| Documentation | SpringDoc OpenAPI / Swagger UI |
| Frontend | Thymeleaf, CSS, JavaScript |
| Build Tool | Maven Wrapper |
| API Testing | Swagger, Postman |
erDiagram
USER ||--o{ ORDERS : "places"
USER {
int u_id PK
string uname
string uemail
string upassword
long unumber
}
ADMIN {
int adminId PK
string adminName
string adminEmail
string adminPassword
string adminNumber
}
PRODUCT {
int pid PK
string pname
double pprice
string pdescription
}
ORDERS {
int oId PK
string oName
double oPrice
int oQuantity
date orderDate
double totalAmmout
int user_u_id FK
}
- JDK 21
- Maven is optional because the Maven wrapper is included
Docker and PostgreSQL are only needed if you choose the PostgreSQL/Docker setup.
Clone the project:
git clone https://github.com/imrajeevnayan/Food-Fiesta.git
cd Food-FiestaRun the application:
./mvnw spring-boot:runOn Windows PowerShell:
.\mvnw.cmd spring-boot:runIf JAVA_HOME is not set on Windows, set it before running Maven:
$env:JAVA_HOME="C:\Program Files\Java\jdk-21.0.11"
.\mvnw.cmd spring-boot:runOpen the app:
- Frontend: http://localhost:8080/
- Swagger UI: http://localhost:8080/swagger-ui/index.html
- H2 Console: http://localhost:8080/h2-console
H2 console connection:
JDBC URL: jdbc:h2:mem:foodfiesta
User Name: sa
Password:
The H2 database is in-memory, so data resets when the application stops.
The app seeds sample products and a default admin account on startup.
Admin email: admin@foodfiesta.com
Admin password: admin123
The default src/main/resources/application.properties uses H2:
spring.datasource.url=jdbc:h2:mem:foodfiesta
spring.datasource.driver-class-name=org.h2.Driver
spring.datasource.username=sa
spring.datasource.password=
spring.h2.console.enabled=true
spring.h2.console.path=/h2-console
spring.jpa.hibernate.ddl-auto=create-dropTo use PostgreSQL instead of H2, update src/main/resources/application.properties:
spring.datasource.url=jdbc:postgresql://localhost:5432/foodfiesta
spring.datasource.username=postgres
spring.datasource.password=YOUR_PASSWORD
spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.PostgreSQLDialect
spring.jpa.hibernate.ddl-auto=updatePostgreSQL should be running on port 5432, and the foodfiesta database should exist.
To enable Google login:
- Go to Google Cloud Console.
- Create an OAuth 2.0 Client ID.
- Add this authorized redirect URI:
http://localhost:8080/login/oauth2/code/google
- Update
src/main/resources/application.properties:
spring.security.oauth2.client.registration.google.client-id=YOUR_CLIENT_ID
spring.security.oauth2.client.registration.google.client-secret=YOUR_CLIENT_SECRETBuild the image:
docker build -t food-fiesta .Run with Docker:
docker run -p 8080:8080 --name food-fiesta-app food-fiestaRun app and PostgreSQL together:
docker compose up -dFollow logs:
docker compose logs -f app./mvnw clean packageOn Windows:
.\mvnw.cmd clean packageDistributed under the MIT License. See LICENSE for details.
Developed by imrajeevnayan







