FoodFast is a Java prototype of a meal delivery platform developed as part of a component-oriented programming project.
The project combines several standard backend concerns:
- object-oriented modeling of business entities
- application logic around orders
- collection-based search operations in Java
- error handling with a custom exception
- concurrency with
ExecutorServiceandConcurrentHashMap - PostgreSQL persistence through JDBC and
PreparedStatement
- create customers, dishes, and orders
- compute the total price of an order
- manage the lifecycle of an order with
OrderStatus - add orders to a delivery platform
- search by identifier, customer, or status
- simulate restaurant preparation with a possible failure
- basic logging through a singleton logger
- store orders in PostgreSQL
src/main/java/
Application.java
customer/
delivery/
dish/
exceptions/
logger/
order/
restaurant/
util/
src/test/java/
DeliveryPlatformTest.java
DishTest.java
FoodFastUtilsTest.java
OrderTest.java
db/
init.sql
- Java
- Maven
- JUnit 5
- PostgreSQL
- Docker Compose
docker-compose up -dThe local PostgreSQL database is initialized automatically with the schema defined in db/init.sql.
To check the orders stored in the database:
docker exec -it foodfast-db psql -U postgres -d foodfast -c "SELECT * FROM orders;"mvn clean package
mvn exec:java -Dexec.mainClass=Applicationmvn testThe project uses the following defaults:
FOODFAST_DB_URL=jdbc:postgresql://localhost:5432/foodfastFOODFAST_DB_USER=postgresFOODFAST_DB_PASS=postgres