'Foody' is a comprehensive backend food delivery platform built with Spring Boot. The application provides a robust API for managing restaurants, menu items, orders, user ratings, and comments.
- Features
- Tech Stack
- Requirements
- Getting Started
- API Documentation
- Testing
- Available Commands
- Project Structure
- License
- User Management: Registration, authentication, and role-based access control
- Restaurant Management: Create, update, and search for restaurants
- Menu Management: Add, update, and remove menu items
- Order Processing: Place, track, and manage food orders
- Review System: Rate restaurants and add comments
- Search Functionality: Find restaurants and menu items based on various criteria
- Caching: Optimized performance using Spring Cache
- Scheduled Tasks: Automated processes for order management and reporting
- Monitoring: With Prometheus and Grafana
- Java 21: Core programming language
- Spring Boot: Main framework
- Spring Security: Authentication and authorization
- Spring Data JPA: Database operations
- PostgreSQL: Primary database
- Redis: Caching and message broker
- Flyway: Database migrations
- Hibernate Validator: Data validation
- Mapstruct: Data mapping
- Spring Cache: Caching mechanism
- JUnit 5: Testing framework
- Mockito: Mocking library for unit tests
- Testcontainers: Integration testing with containerized dependencies
- Docker: Containerization
- Maven: Build tools
- Prometheus and Grafana: For monitoring
- Java 21 or higher
- Docker and Docker Compose
- Maven (included as wrapper)
- Make (for running Makefile commands)
git clone https://github.com/nelsontanko/foody.git
cd foodyTo run the entire application stack using Docker:
make up
make runThe application will be available at http://localhost:8080
To stop all containers:
make downOnce the application is running, you can access the API documentation at:
- OpenAPI JSON:
http://localhost:8080/v3/api-docs
# Run all tests
make test
# Run only integration tests
make test-integrationFor Prometheus dashboard, go to http://localhost:9090 For Grafana dashboard, go to http://localhost:3000
The project includes a Makefile with the following commands:
# Development
make build - Build the application
make clean - Clean build artifacts
make test - Run tests
make test-integration - Run integration tests
make run - Run the application locally
# Docker operations
make docker-logs - Show logs from the Docker container
make docker-shell - Get a shell in the Docker container
# Docker Compose operations
make up - Start all services with Docker Compose
make down - Stop all services with Docker Compose
# Database operations
make db-connect - Connect to PostgreSQL database├───.idea
├───.mvn
│ └───wrapper
├───src
│ ├───main
│ │ ├───java
│ │ │ └───dev
│ │ │ ├───account/ # Account configuration
│ │ │ ├───core
│ │ │ │ ├───common # Shared classes
│ │ │ │ ├───config # Application configuration
│ │ │ │ ├───dto # Data Transfer Objects
│ │ │ │ ├───exception # Custom exception
│ │ │ │ ├───spec # Specification class
│ │ │ │ ├───utils # Utility classes
│ │ │ │ └───validation # Validation classes
│ │ │ ├───security/ # Security configuration
│ │ │ └───services/ # Business logic
│ │ │
│ │ └───resources
│ │ ├───config/ # Application configuration
│ │ ├───db
│ │ │ └───migration # Flyway migration scripts
│ │ └───swagger
│ └── test/ # Test classes
├── docker-compose.yml # Docker Compose configuration
├── Dockerfile # Docker configuration
├── Makefile # Project commands
├── mvnw # Maven wrapper
├── pom.xml # Maven configuration
└── README.md # Project documentation
This project is licensed under the MIT License - see the LICENSE file for details.