How axelvega483/concesionaria works
Project type and purpose
• This is a Spring Boot–based backend REST API for managing a car dealership (“concesionaria”).
• It exposes endpoints for vehicles, clients, users (employees), sales, payments, and enforces JWT security.
File structure
• Top‐level: pom.xml, application entry point (ConcecionariaApplication).
• Config: WebConfig, SecurityConfig, JWT filter/utility under Security.
• Controller layer: REST controllers under controller/*.
• Service layer: business logic under service/*.
• Repository layer: Spring Data interfaces under repository/*.
• Entity model under entity/*.
• DTOs + Mappers under DTOs/* for input/output shaping.
• Utility classes under util/*.
• application.properties for DB + JWT settings.
README for additional insights
• Confirms Java 17, Spring Web, Spring Data JPA, MySQL/PostgreSQL, JWT auth, modular design, DTO‐based responses.
• Functional requirements: CRUD on vehicles/clients/users, sales/payments workflow with state transitions.
• Clients (Web/Mobile UI or API consumers)
• API Gateway / Load Balancer (optional)
• Authentication & Authorization (JWT filter + SecurityConfig)
• REST Controllers (VehicleController, ClienteController, etc.)
• Service Layer (e.g., VehiculoService, ClienteService…)
• Repository Layer (Spring Data JPA Repositories)
• RDBMS (MySQL/PostgreSQL tables: VEHICULO, CLIENTE, USUARIO, VENTA, PAGOS, DETALLE_VENTA, IMAGEN)
• DTO/Mapper modules (transform entities to API models)
1. Client → HTTP Request → Security Filter (JwtRequestFilter)
2. Security → Controller → Service → Repository → Database
3. Repository → Service → DTO Mapper → Controller → HTTP Response → Client
c. Architectural patterns & principles:
• Layered (Presentation → Business → Data)
• DTO pattern for decoupling API schema from internal model
• Spring Data repository abstraction (DAO)
• SOLID: single‐responsibility controllers/services, open for extension via modular packages
• JWT‐based stateless authentication
d. Key technologies:
• Java 17, Spring Boot, Spring Web MVC, Spring Security (JWT), Spring Data JPA, Hibernate, Lombok, MySQL/PostgreSQL, Maven
Detailed capture of essential elements
• Service classes under “Business Services”
• Repository interfaces under “Data Repositories”
• A “DTO Mapper” sub-layer between services and controllers
• Render the JWT flow: LoginController → JwtUtil → token → filter → SecurityContext