This is an E-Commerce API project developed using Spring Boot, JPA/Hibernate, Maven, H2, Apache Tomcat, and PostgreSQL. The API allows managing users, orders, products, and categories for an online store.
. ____ _ __ _ _ /\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \ ( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \ \\/ ___)| |_)| | | | | || (_| | ) ) ) ) ' |____| .__|_| |_|_| |_\__, | / / / / =========|_|==============|___/=/_/_/_/ :: Spring Boot :: (v3.1.1)
The domain model of the API consists of the following entities:
- User: Represents the store users with attributes like name, email, phone, and password.
- Order: Represents the orders placed by users, with information such as order date and status.
- Category: Represents the categories of products sold in the store.
- Product: Represents the products available for purchase, with information like name, description, and price.
- OrderItem: Represents the items of an order with a many-to-many association with products, including additional attributes like quantity and unit price.
The project follows a logical layers structure for better code organization:
- Domain: Contains the classes representing the domain model of the application (entities).
- Repositories: Contains the JPA repositories that interact with the database.
- Services: Contains the business services that perform the API operations.
- Resources: Contains the REST controllers that define the API endpoints.
The API uses H2 as the database for development and testing, with support for PostgreSQL in production environments. The database configuration is done in the application.properties
file, and the test configuration is defined in the application-test.properties
file.
This is a project in continuous development, and improvements and new features will be added over time. Feel free to contribute with suggestions and ideas!
Java | Jakarta | Spring | STS4 | Hibernate | Maven | H2 | Tomcat | PostgreSQL |