This is a Spring-based backend for a Point of Sale (POS) system. It provides RESTful APIs for managing customers, items, orders, and transactions. The project uses Spring, JPA, Hibernate,Tomcat, and MySQL for database connectivity.
- Customer Management (Create, Read, Update, Delete)
- Item Management (Create, Read, Update, Delete)
- Order and Transaction Processing
- Exception Handling and Validation using Hibernate Validator
- JSON Response formatting
- Java Vesion: JDK 21
- Backend Framework: Spring
- Database: MySQL
- ORM: JPA, Hibernate
- Server: Apache Tomcat 11.0.0-M26
- Validation: Hibernate Validator
- Logger: Logback
- Entities: Representations for Customer, Item, Order, and OrderDetail
- Data Transfer Objects (DTOs): Includes CustomerDTO, ItemDTO, and OrderDTO
- Repositories: Interfaces for database operations, such as CustomerRepository, ItemRepository, OrderRepository, and OrderDetailRepository
- Services: Business logic for managing customers, items, and orders in CustomerService, ItemService, and OrderService
- Controllers: API endpoints for handling customer, item, and order-related requests via CustomerController, ItemController, and OrderController
- Utilities: Helper classes for tasks like object mapping (Mapping) and application utilities (AppUtil)
- Exceptions: Custom error handling mechanisms for specific scenarios
- Configuration: Application setup classes like WebAppConfig and WebAppRootConfig
Data validation is enforced through Hibernate Validator annotations within the DTO classes, ensuring both data integrity and accuracy.
Logging is set up with Logback, capturing logs both in the console and in a dedicated file.
Custom exceptions are designed to address specific error situations, delivering clear and informative error messages to the client.
Prerequisites
- JDK 21
- Tomcat 11
- MySQL server
- Maven
https://github.com/sasmithx/Spring-POS.git
To view this project API Documentation
Refer to the Postman API Documentation for detailed API endpoints and usage instructions.
This project is licensed under the MIT License - see the MIT License file for details.
© 2024 Sasmith Manawadu