Skip to content

Eonthereal/FoodOrderPlatform

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FoodOrderPlatform

A Spring Boot + PostgreSQL + Redis project for experimenting with restaurant and menu management.
Designed to run locally with zero configuration using Docker Compose and environment variables.

Requirements

  • Java 21+
  • Maven 3.9+
  • Docker + Docker Compose
  • Git

Project Structure

See the folder layout section at the bottom of this README.


Getting Started

1. Clone the repository

git clone https://github.com/

2. Create the .env file

Linux/macOS

cp .env.example .env

Windows

copy .env.example .env

3. Start services (PostgreSQL + Redis)

docker compose up -d

4. Run the Spring Boot app

mvn spring-boot:run

The app will start on: http://localhost:8080

5. Stopping containers

docker compose down


Configuration

Environment Variables

All configuration is driven through .env.

See .env.example for default values: POSTGRES_DB POSTGRES_USER POSTGRES_PASSWORD REDIS_HOST REDIS_PORT TOKEN_SECRET TOKEN_EXPIRATION

Database

  • PostgreSQL runs at port 5433
  • Default user/password: dev_user / dev_pass
  • Flyway migrations are under src/main/resources/db/migration

Redis

  • Redis runs at localhost:6379

Scripts

Create .env automatically

./scripts/setup-env.sh


Folder Structure

See full diagram below.


Notes

  • This project is for local development and experimentation
  • No real credentials are committed
  • .env is ignored by Git but .env.example is committed so others can set up quickly

Folder Structure (Production-Ready Layout)

platform/
│
├─ .env.example
├─ .env                # ignored
├─ .gitignore
├─ README.md
├─ docker-compose.yml
├─ pom.xml
│
├─ src/
│   ├─ main/
│   │   ├─ java/com/foodorder/platform/
│   │   │   ├─ config/
│   │   │   ├─ controller/
│   │   │   ├─ service/
│   │   │   ├─ repository/
│   │   │   ├─ domain/
│   │   │   ├─ dto/
│   │   │   ├─ mapper/
│   │   │   └─ util/
│   │   │
│   │   └─ resources/
│   │       ├─ application.yml
│   │       ├─ application-local.yml
│   │       ├─ application-prod.yml
│   │       └─ db/migration/
│   │
│   └─ test/
│       └─ java/com/foodorder/platform/
│
└─ docs/
    ├─ architecture-diagram.png
    ├─ postman-collection.json
    └─ notes.md

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages