Architecture
The application follows a layered architecture:
- Controller Layer: Handles HTTP requests and responses.
- Service Layer: Contains business logic and interacts with repositories.
- Repository Layer: Manages data persistence using Spring Data JPA.
- Entity Layer: Defines the data models for components, users, suppliers, etc.
- Security Layer: Manages authentication and authorization using JWT.
- Integration Layer: Connects to external APIs (e.g., DigiKey).
Main Packages
controller/: REST controllersservices/: Business logicrepositories/: Data accessentities/: Data modelssecurity/: Security configuration
Data Flow
- Request received by Controller
- Controller calls Service
- Service interacts with Repository
- Repository accesses Entity
- Response returned to client