🌐 Live Application: Food Fiesta | Culinary Excellence
Welcome to Food Fiesta, a modern, high-performance dining management and ordering platform. Built on Spring Boot 3.4.2 and Java 21, this application is designed for cloud-native deployment, supporting both quick-start in-memory databases (H2) and production-grade persistent databases (PostgreSQL).
This guide walks you through local development, architectural concepts, production configuration, and step-by-step cloud deployment (Render & Docker).
The application adheres to clean layered architecture design principles:
- Presentation Layer (Thymeleaf, CSS, JS): Server-side HTML rendering utilizing custom visual utility classes, glassmorphic UI elements, and dynamic loops.
- Controller Layer (Spring Web): RESTful APIs and traditional Web MVC routing controls handling requests, user session binding, and OAuth flows.
- Service Layer (Spring Component): Business logic, order calculations, and verification handlers.
- Data Access Layer (Spring Data JPA / Hibernate): Object-Relational Mapping (ORM) translating Java objects directly to database tables.
- Security Filter Chain (Spring Security): Built-in filters handling OAuth2, CORS policy setup, endpoint authorizations, and resource control.
[ Browser ] ──▶ [ Controller / MVC ] ──▶ [ Services ] ──▶ [ JPA Repositories ] ──▶ [ Database ]
│ │
▼ ▼
[ Thymeleaf Templates ] [ H2 / PostgreSQL ]
Before setting up or deploying, verify you have the following installed locally:
- Java Development Kit (JDK) 21
- Note: Maven is not required to be installed manually, as the Maven Wrapper (
mvnw/mvnw.cmd) is preloaded in the project.
In production, avoid hardcoding values. Use this table to configure environment variables for deployment on Render, Docker, or your preferred cloud host:
| Variable Name | Purpose | Example Value / Default |
|---|---|---|
JAVA_HOME |
Points to Java installation directory | C:\Program Files\Java\jdk-21 |
PORT |
Web port Spring Boot listens on | 8080 |
SPRING_DATASOURCE_URL |
JDBC database connection string | jdbc:postgresql://db:5432/foodfiesta |
SPRING_DATASOURCE_USERNAME |
Database username credentials | postgres |
SPRING_DATASOURCE_PASSWORD |
Database password credentials | your_password |
GOOGLE_CLIENT_ID |
Google OAuth Web App Client ID | your_client_id.apps.googleusercontent.com |
GOOGLE_CLIENT_SECRET |
Google OAuth Web App Client Secret | GOCSPX-your_secret |
git clone https://github.com/imrajeevnayan/Food-Fiesta.git
cd Food-FiestaCreate a file named .env in the root directory (this is automatically ignored by Git) to store your local credentials:
GOOGLE_CLIENT_ID=your_id_here.apps.googleusercontent.com
GOOGLE_CLIENT_SECRET=your_secret_here- Windows (PowerShell):
Get-Content .env | ForEach-Object { $name, $value = $_.Split('=', 2); if ($name -and $value) { [System.Environment]::SetEnvironmentVariable($name.Trim(), $value.Trim()) } }; .\mvnw.cmd spring-boot:run
- macOS / Linux:
export $(cat .env | xargs) && ./mvnw spring-boot:run
- Frontend App: http://localhost:8080/
- Swagger Docs: http://localhost:8080/swagger-ui/index.html
- H2 DB Console: http://localhost:8080/h2-console (JDBC URL:
jdbc:h2:mem:foodfiesta, User:sa, Pass: blank)
By default, the application runs on H2. It auto-seeds default administrators and catalog entries on startup:
- Admin Email:
[email protected] - Admin Password:
admin123
Note: In-memory data resets every time the application stops or sleeps.
To run a persistent database locally or in production, configure the environment variables or update src/main/resources/application.properties with:
spring.datasource.url=jdbc:postgresql://localhost:5432/foodfiesta
spring.datasource.username=postgres
spring.datasource.password=YOUR_PASSWORD
spring.jpa.hibernate.ddl-auto=updateRender parses the project's Dockerfile to compile and containerize the Spring Boot application.
- Go to your Render Dashboard, click New > Web Service.
- Link your
Food-FiestaGitHub repository. - Select Docker as the Runtime environment.
- Go to Advanced settings, add the following environment variables:
PORT:8080GOOGLE_CLIENT_ID:[Your Client ID]GOOGLE_CLIENT_SECRET:[Your Client Secret]
- Click Create Web Service.
- Go to Render, click New > PostgreSQL to create a persistent database. Copy the Internal Database URL.
- Create a new Web Service, link your repository, and select Docker as the Runtime.
- Under Advanced, add the environment variables:
PORT:8080GOOGLE_CLIENT_ID:[Your Client ID]GOOGLE_CLIENT_SECRET:[Your Client Secret]SPRING_DATASOURCE_URL:jdbc:postgresql://<HOST>:<PORT>/foodfiesta(parsed from your Internal Database URL)SPRING_DATASOURCE_USERNAME:postgresSPRING_DATASOURCE_PASSWORD:[Your DB Password]
- Click Create Web Service.
- Build the production-ready Docker image:
docker build -t food-fiesta . - Run the container locally:
docker run -p 8080:8080 --env-file .env food-fiesta
This project is licensed under the MIT License. See LICENSE for details.
Developed by imrajeevnayan







