✨ Give this repository a star!
Order Management System is a backend application to manage orders in a store. It enables the creation, retrieval, updating, and deletion of customers, sellers and orders. All data is stored and managed using a PostgreSQL database. This system is designed to automate key processes such as tracking customer credit limits and linking orders to the correct customer and seller.
I deployed the application using Render. You can see the testing process with Postman below
This project represents my first experience working with Spring Boot and Spring Data JPA. Previously, I used JDBC and plain Java for my applications, but I wanted to explore more modern tools and approaches. I also chose to follow the Controller-Service-Repository design pattern, alongside Entities and DTOs to ensure better separation of concerns and maintainable code.
- Register and maintain customer information.
- Track customer credit limits and available credit.
- Automatically update customer credit limits based on their orders.
- Change the customer's available credit (it can never exceed the credit limit).
- Increase the credit limit (the available credit will adjust accordingly).
- Create, read, modify, and delete seller details.
- Link sellers to specific orders.
- Create, read, modify, and delete orders
- Manage customer orders and link them to specific sellers.
- JDK 21 (Amazon Corretto): Java is the primary language for this project.
- Spring Boot: Framework to simplify backend development.
- Spring Data JPA: For managing data persistence and database interactions.
- PostgreSQL: Relational database for data storage.
- Maven: For dependency management and project building.
The project follows the Controller-Service-Repository architecture pattern, with additional layers for Entities and DTOs to enhance modularity and maintainability.
I had an introduction to Docker and made my first deployment using Render. One of my decisions was to not work with thymeleef for ui because I wanted to focus more on backend development, testing everything mainly through Postman. But yes, I plan on expanding the code when I start learning front-end development.
Working with the controller-repository-service pattern was really nice and a new thing to me. I also had to deal with exception handling, something that I had only seen in Exercism's tasks (you can see them here) before, so it was also fun to deeply understand.
Well, it's always great to see how real projects provide such an immersive learning experience.
see here
Before running the application, make sure you have Docker installed on your machine.
Note: There is no need to have JDK or PostgreSQL installed locally. Docker will handle all dependencies within isolated containers.
git clone https://github.com/your-username/order-management-app.git
cd order-management-system/backend/order-management-system
To build and start the application using Docker Compose, run the following command:
sudo docker-compose up --build
This command will:
- Build the application image based on the
Dockerfile
in the application. - Create and start the containers for both the Spring Boot application and the PostgreSQL database.
- Set up the necessary environment variables for the database connection.
You can make the HTTP requests now
http://localhost:8080
docker-compose down
- Application:
8080
(Spring Boot Application) - Database:
5432
(PostgreSQL Database)