How wilianbordon/backend1pm works
This is a Spring Boot backend for an e-commerce-style catalog and order system. A client uses REST controllers to manage products, categories, subcategories, banners, accounts, and orders; services implement those operations and repositories persist or retrieve the domain data. The order workflow validates the account and products, totals line items, fills missing address fields through ViaCEP, and saves the order. The README identifies H2 as the database and Swagger/OpenAPI as API documentation; source excerpts were sampled, so links for unsampled controller/service pairs follow the repository structure.
Main entry points: PedidoService.java Order Service · ProdutoService.java Product Service · CategoriaRepository.java Category Repository · SubcategoriaService.java Subcategory Service
Components 22
REST API
- Banner API
src/main/java/com/drones/backend1PM/controller/BannerController.java - Category API
src/main/java/com/drones/backend1PM/controller/CategoriaController.java - Subcategory API
src/main/java/com/drones/backend1PM/controller/SubcategoriaController.java - Product API
src/main/java/com/drones/backend1PM/controller/ProdutoController.java - Account API
src/main/java/com/drones/backend1PM/controller/ContaController.java - Order API
src/main/java/com/drones/backend1PM/controller/PedidoController.java
Catalog Management
- Banner Service
src/main/java/com/drones/backend1PM/service/BannerService.java - Category Service
src/main/java/com/drones/backend1PM/service/CategoriaService.java - Subcategory Service
src/main/java/com/drones/backend1PM/service/SubcategoriaService.java - Product Service
src/main/java/com/drones/backend1PM/service/ProdutoService.java
Accounts and Orders
- Account Service
src/main/java/com/drones/backend1PM/service/ContaService.java - Order Service
src/main/java/com/drones/backend1PM/service/PedidoService.java
Persistence and Integration
- Banner Repository
src/main/java/com/drones/backend1PM/repository/BannerRepository.java - Category Repository
src/main/java/com/drones/backend1PM/repository/CategoriaRepository.java - Subcategory Repository
src/main/java/com/drones/backend1PM/repository/SubcategoriaRepository.java - Product Repository
src/main/java/com/drones/backend1PM/repository/ProdutoRepository.java - Account Repository
src/main/java/com/drones/backend1PM/repository/ContaRepository.java - Order Repository
src/main/java/com/drones/backend1PM/repository/PedidoRepository.java - H2 Database
- ViaCEP Client
src/main/java/com/drones/backend1PM/client/ViaCepClient.java
Other components
- API Client
- ViaCEP Service
Connections 31
- API Client → Banner API: calls
- API Client → Category API: calls
- API Client → Subcategory API: calls
- API Client → Product API: calls
- API Client → Account API: calls
- API Client → Order API: calls
- Banner API → Banner Service: calls
- Category API → Category Service: calls
- Subcategory API → Subcategory Service: calls
- Product API → Product Service: calls
- Account API → Account Service: calls
- Order API → Order Service: calls
- Banner Service → Banner Repository: reads/writes
- Category Service → Category Repository: reads/writes
- Subcategory Service → Subcategory Repository: reads/writes
- Subcategory Service → Category Repository: reads
- Product Service → Product Repository: reads/writes
- Product Service → Category Repository: reads
- Product Service → Subcategory Repository: reads
- Account Service → Account Repository: reads/writes
- Order Service → Order Repository: reads/writes
- Order Service → Account Repository: reads
- Order Service → Product Repository: reads
- Order Service → ViaCEP Client: calls
- ViaCEP Client → ViaCEP Service: requests address
- Banner Repository → H2 Database: persists data
- Category Repository → H2 Database: persists data
- Subcategory Repository → H2 Database: persists data
- Product Repository → H2 Database: persists data
- Account Repository → H2 Database: persists data
- Order Repository → H2 Database: persists data