This project is a robust backend system for managing products, categories, and users, inspired by the classic Northwind database. It provides RESTful APIs for CRUD operations, user authentication, and data transfer, designed for scalability and maintainability.
- Product Management: Create, read, update, and delete products and categories.
- User Management: User registration, login, and role management.
- Organization Management: Organize products by categories.
- DTOs: Data Transfer Objects for clean API communication.
- Consistent API Responses: Custom result wrappers for success, error, and data responses.
- Error Handling: Centralized and structured error management.
- Unit Testing: JUnit-based tests for reliability.
- Layered Architecture:
- Controller Layer: Handles HTTP requests and responses.
- Service Layer: Contains business logic, interfaces, and implementations.
- Data Access Layer: Interfaces and implementations for database operations using JPA/Hibernate.
- Entity/DTO Layer: Models for persistence and API communication.
- Design Patterns:
- Dependency Injection (Spring)
- Data Transfer Object (DTO)
- Service and Repository patterns
- Programming Principles:
- SOLID (Single Responsibility, Open/Closed, Liskov Substitution, Interface Segregation, Dependency Inversion)
- DRY (Don’t Repeat Yourself)
- KISS (Keep It Simple, Stupid)
- Separation of Concerns
- Language: Java 17+
- Framework: Spring Boot
- ORM: JPA/Hibernate
- Build Tool: Maven
- Testing: JUnit
- Lombok: For reducing boilerplate code
- Clone the repository.
- Configure your database connection in
src/main/resources/application.properties. - Build and run the project using Maven:
./mvnw spring-boot:run
- Access the API endpoints via Postman or any REST client.
Feel free to use or extend this project for your own learning or as a foundation for professional applications.