How contii/robocoffee works
RoboCoffee is a layered .NET backend for managing a coffee product catalog, customer orders, and postal-code address lookup. Its main workflow is an API request to create an order: the order service loads active products, the domain builds validated item snapshots and calculates the total, and infrastructure persists the order. Catalog management and order status changes are separate branches. The README documents PostgreSQL persistence and ViaCEP integration; some subsystem links are omitted where sampled source does not show the runtime wiring.
Main entry points: OrderService.cs Order operations · ProductCatalogService.cs Catalog operations · RoboCoffeeDbContext.cs EF Core context · ProductsController.cs Product endpoints
Components 22
API
- Product endpoints
src/RoboCoffee.Api/Controllers/ProductsController.cs - Order endpoints
src/RoboCoffee.Api/Controllers/OrdersController.cs - Address endpoint
src/RoboCoffee.Api/Controllers/AddressesController.cs - API host
src/RoboCoffee.Api/Program.cs
Application services
- Catalog service contract
src/RoboCoffee.Application/Catalog/IProductCatalogService.cs - Order service contract
src/RoboCoffee.Application/Orders/IOrderService.cs - Address lookup contract
src/RoboCoffee.Application/Integrations/IAddressLookupService.cs - Request validators
src/RoboCoffee.Application - Catalog DTOs
src/RoboCoffee.Contracts/Catalog - Order DTOs
src/RoboCoffee.Contracts/Orders - Address DTO
src/RoboCoffee.Contracts/Integrations/AddressLookupResponse.cs
Domain model
- Product model
src/RoboCoffee.Domain/Catalog/Product.cs - Order lifecycle
src/RoboCoffee.Domain/Orders/Order.cs - Order item snapshots
src/RoboCoffee.Domain/Orders/OrderItem.cs
Infrastructure
- Catalog operations
src/RoboCoffee.Infrastructure/Catalog/ProductCatalogService.cs - Order operations
src/RoboCoffee.Infrastructure/Orders/OrderService.cs - ViaCEP adapter
src/RoboCoffee.Infrastructure/Integrations/ViaCepAddressLookupService.cs - Lookup resilience
src/RoboCoffee.Infrastructure/Integrations/AddressLookupResiliencePolicies.cs - EF Core context
src/RoboCoffee.Infrastructure/Persistence/RoboCoffeeDbContext.cs - PostgreSQL
Other components
- API client
- ViaCEP API
Connections 24
- API client → Product endpoints: requests
README.md - API client → Order endpoints: requests
README.md - API client → Address endpoint: requests
src/RoboCoffee.Api/Controllers/AddressesController.cs - Product endpoints → Catalog service contract: calls
src/RoboCoffee.Api/Controllers/ProductsController.cs - Order endpoints → Order service contract: calls
src/RoboCoffee.Api/Controllers/OrdersController.cs - Address endpoint → Address lookup contract: calls
src/RoboCoffee.Api/Controllers/AddressesController.cs - API host → EF Core context: configures
src/RoboCoffee.Api/Program.cs - Product endpoints → Catalog DTOs: accepts and returns
src/RoboCoffee.Api/Controllers/ProductsController.cs - Order endpoints → Order DTOs: accepts and returns
src/RoboCoffee.Api/Controllers/OrdersController.cs - Address endpoint → Address DTO: returns
src/RoboCoffee.Api/Controllers/AddressesController.cs - Catalog service contract → Catalog operations: implemented by
src/RoboCoffee.Infrastructure/DependencyInjection.cs - Order service contract → Order operations: implemented by
src/RoboCoffee.Infrastructure/DependencyInjection.cs - Address lookup contract → ViaCEP adapter: implemented by
src/RoboCoffee.Infrastructure/DependencyInjection.cs - Catalog operations → EF Core context: reads and writes
src/RoboCoffee.Infrastructure/Catalog/ProductCatalogService.cs - Catalog operations → Product model: creates and updates
src/RoboCoffee.Infrastructure/Catalog/ProductCatalogService.cs - Order operations → EF Core context: reads and writes
src/RoboCoffee.Infrastructure/Orders/OrderService.cs - Order operations → Product model: loads products
src/RoboCoffee.Infrastructure/Orders/OrderService.cs - Order operations → Order lifecycle: creates and advances
src/RoboCoffee.Infrastructure/Orders/OrderService.cs - Order lifecycle → Order item snapshots: creates items
src/RoboCoffee.Domain/Orders/Order.cs - Order operations → Order DTOs: maps responses
src/RoboCoffee.Infrastructure/Orders/OrderService.cs - Catalog operations → Catalog DTOs: maps responses
src/RoboCoffee.Infrastructure/Catalog/ProductCatalogService.cs - EF Core context → PostgreSQL: persists through
README.md - ViaCEP adapter → ViaCEP API: looks up addresses
README.md - ViaCEP adapter → Lookup resilience: uses policies