How hamzaijaz/groceryhelper works
GroceryHelper is an ASP.NET Core API for a grocery list. A frontend sends CRUD requests to the groceries controller; the controller delegates use cases to the application service, which validates/maps request data and calls the repository abstraction. The in-memory implementation filters and sorts reads and loses its data on restart. The graph also shows domain data, startup registration, and documented Swagger support. Relationships are based on the README or shown source; configuration and middleware details are summarized at the host node.
Main entry points: InMemoryGroceryRepository.cs In-memory repository · GroceryService.cs Grocery use cases · GroceryRequest.cs Request validation and mapping · IGroceryRepository.cs Repository contract
Components 12
HTTP API
- Groceries controller
src/GroceryHelper.WebAPI/Controllers/GroceriesController.cs - API host and middleware
src/GroceryHelper.WebAPI/Program.cs - Swagger UI
src/GroceryHelper.WebAPI/Program.cs
Application
- Grocery use cases
src/GroceryHelper.Application/GroceryService.cs - Request validation and mapping
src/GroceryHelper.Application/GroceryRequest.cs - Repository contract
src/GroceryHelper.Application/IGroceryRepository.cs - Application registration
src/GroceryHelper.Application/DependencyInjection.cs
Grocery Domain
- Grocery record
src/GroceryHelper.Domain/Grocery.cs - Grocery categories
src/GroceryHelper.Domain/GroceryCategory.cs
Storage
- In-memory repository
src/GroceryHelper.Infrastructure/Repositories/InMemoryGroceryRepository.cs - Infrastructure registration
src/GroceryHelper.Infrastructure/DependencyInjection.cs
Other components
- Frontend client
Connections 18
- Frontend client → Groceries controller: sends CRUD requests
README.md - Groceries controller → Grocery use cases: delegates use cases
src/GroceryHelper.WebAPI/Controllers/GroceriesController.cs - Groceries controller → Request validation and mapping: accepts payload
src/GroceryHelper.WebAPI/Controllers/GroceriesController.cs - Grocery use cases → Request validation and mapping: maps payload
src/GroceryHelper.Application/GroceryService.cs - Grocery use cases → Repository contract: calls storage
src/GroceryHelper.Application/GroceryService.cs - Request validation and mapping → Grocery record: creates record
src/GroceryHelper.Application/GroceryRequest.cs - Request validation and mapping → Grocery categories: uses category
src/GroceryHelper.Application/GroceryRequest.cs - Grocery record → Grocery categories: stores category
src/GroceryHelper.Domain/Grocery.cs - Repository contract → Grocery record: operates on
src/GroceryHelper.Application/IGroceryRepository.cs - Repository contract → Grocery categories: filters by
src/GroceryHelper.Application/IGroceryRepository.cs - In-memory repository → Repository contract: implements
src/GroceryHelper.Infrastructure/Repositories/InMemoryGroceryRepository.cs - In-memory repository → Grocery record: stores and sorts
src/GroceryHelper.Infrastructure/Repositories/InMemoryGroceryRepository.cs - In-memory repository → Grocery categories: filters by
src/GroceryHelper.Infrastructure/Repositories/InMemoryGroceryRepository.cs - API host and middleware → Application registration: registers application
src/GroceryHelper.WebAPI/Program.cs - API host and middleware → Infrastructure registration: registers storage
src/GroceryHelper.WebAPI/Program.cs - Application registration → Grocery use cases: registers service
src/GroceryHelper.Application/DependencyInjection.cs - Infrastructure registration → In-memory repository: registers implementation
src/GroceryHelper.Infrastructure/DependencyInjection.cs - API host and middleware → Swagger UI: enables in development
src/GroceryHelper.WebAPI/Program.cs