This project is a CRUD (Create, Read, Update, Delete) application for an e-commerce system, developed with Spring Boot and MySQL. The application provides an interface for managing products, clients, shopping carts, and invoices. It uses Spring Data JPA for database persistence and Spring Web for creating RESTful services.
- Product Management: Create, retrieve, update, and delete products.
- Client Management: Register, retrieve, update, and delete clients.
- Cart Management: Add products to a cart, retrieve carts by client, and remove products from the cart.
- Invoice Management: Create invoices for clients and retrieve invoices by client.
- Spring Boot: Main framework for application development.
- Spring Data JPA: For data persistence management.
- MySQL: Relational database for storing information.
- Lombok: Simplifies code with automatic getters, setters, etc.
- Springdoc OpenAPI: For automatic Swagger/OpenAPI documentation generation.
- Database: Configured for MySQL. Adjust credentials in
application.properties
. - Dependencies: Managed via Maven. Includes Spring Boot, Spring Data JPA, MySQL, and Lombok.
- API Documentation: Access Swagger documentation at
http://localhost:8080/swagger-ui.html
when the application is running.
- Products:
/api/v1/products
- Clients:
/api/v1/clients
- Carts:
/api/v1/carts
- Invoices:
/api/v1/invoices
- Add Product to Cart:
POST /api/v1/carts/{clientId}/{productId}/{quantity}
- Remove Product from Cart:
DELETE /api/v1/carts/{cartId}?clientId={clientId}
- Create Invoice:
POST /api/v1/invoices
- Clone the repository:
git clone https://github.com/your_username/your_repository.git
- Navigate to the project directory.
- Run
mvn spring-boot:run
to start the application.
Contributions are welcome. Please submit a pull request or open an issue to discuss improvements.
This project is licensed under the MIT License. See the LICENSE
file for details.