A lightweight implementation of the Elmenus food ordering concept. This application provides a platform for restaurants to list their menus and for customers to browse and order food.
Elmenus Lite is a Spring Boot application that allows:
- Restaurants to register and manage their menus
- Customers to browse restaurants and their menus
- Users to create accounts and place orders
- Address management for delivery locations
- Java 17
- Spring Boot 3.4.5
- Spring Data JPA - For database access and ORM
- PostgreSQL - As the primary database
- Hibernate Spatial - For location-based features
- Liquibase - For database migration and version control
- MapStruct - For object mapping between DTOs and models
- Lombok - For reducing boilerplate code
- Hibernate Validator - For input validation
- Maven - For dependency management and build
src/main/java/spring/practice/elmenus_lite/
├── apiDto # API data transfer objects
├── controller # REST controllers
├── dto # Internal data transfer objects
├── exception # Custom exception handlers
├── helperannotations # Custom annotations
├── mapper # MapStruct mappers
├── model # Domain entities
├── repository # JPA repositories
├── service # Business logic
├── statusCode # Response status codes
└── util # Utility classes
- Java 17 or higher
- Maven 3.6 or higher
- PostgreSQL 12 or higher
- Clone the repository:
git clone <repository-url>
cd elmenus-lite
-
Configure the database connection in
src/main/resources/application.properties
orapplication.yml
-
Build the project:
./mvnw clean install
- Run the application:
./mvnw spring-boot:run
The application will be available at http://localhost:8080
- User authentication and authorization
- Restaurant and menu management
- Food ordering system
- Cart functionality
- Address management for delivery
The project includes Docker Compose configuration to easily set up the PostgreSQL database.
- Docker and Docker Compose installed on your machine
# Start the PostgreSQL container
docker-compose up -d postgres
# To check the logs
docker-compose logs -f postgres
This will start a PostgreSQL container with the following configuration:
- Database: postgres
- Schema: study
- Username: postgres
- Password: mysecretpassword
- Port: 5432 (mapped to host)
docker-compose down
To remove the volumes and delete all data:
docker-compose down -v
./mvnw clean package
./mvnw test
MIT License
[Add contributing guidelines here]