How l1nehalt/food-delivery works
This repository implements a food-ordering system split into an API gateway and Catalog, Order, Kitchen, and Delivery services. The visible order workflow creates and persists an order, publishes an order-created event for catalog inventory validation, then handles validation by updating the order and publishing confirmation for kitchen processing. Catalog also exposes product operations; Kitchen exposes order retrieval. The source index supports these service and event links, but the README is empty and gateway routing, Delivery behavior, and broker wiring are not shown, so those connections are omitted.
Main entry points: OrdersService.cs Order workflow · InventoryValidatedConsumer.cs Inventory response · OrderCreatedConsumer.cs Order validation · ProductsService.cs Product operations
Components 18
Order management
- Orders API
src/OrderService/Controllers/OrdersController.cs - Order workflow
src/OrderService/Services/OrdersService.cs - Order database
src/OrderService/Data/OrderDbContext.cs - Inventory response
src/OrderService/Consumers/InventoryValidatedConsumer.cs
Catalog and inventory
- Products API
src/CatalogService/Controllers/ProductsController.cs - Product operations
src/CatalogService/Services/ProductsService.cs - Catalog database
src/CatalogService/Data/CatalogDbContext.cs - Order validation
src/CatalogService/Consumers/OrderCreatedConsumer.cs
Kitchen operations
- Kitchen intake
src/KitchenService/Consumers/OrderConfirmedConsumer.cs - Kitchen operations
src/KitchenService/Services/KitchenService.cs - Kitchen API
src/KitchenService/Controllers/KitchenController.cs - Kitchen database
src/KitchenService/Data/KitchenDbContext.cs
Event contracts
- Order-created event
src/Contracts/Orders/OrderCreatedEvent.cs - Inventory-validated event
src/Contracts/Catalog/InventoryValidatedEvent.cs - Order-confirmed event
src/Contracts/Orders/OrderConfirmedEvent.cs
Service entry points
- API gateway
src/ApiGateway/Program.cs - Delivery service
src/DeliveryService/Program.cs
Other components
- Ordering client
Connections 16
- Ordering client → Orders API: submits order
- Orders API → Order workflow: delegates to
src/OrderService/Controllers/OrdersController.cs - Order workflow → Order database: writes and reads
src/OrderService/Services/OrdersService.cs - Order workflow → Order-created event: publishes
src/OrderService/Services/OrdersService.cs - Order validation → Order-created event: consumes
src/CatalogService/Consumers/OrderCreatedConsumer.cs - Order validation → Product operations: checks inventory
src/CatalogService/Consumers/OrderCreatedConsumer.cs - Order validation → Inventory-validated event: publishes
src/CatalogService/Consumers/OrderCreatedConsumer.cs - Inventory response → Inventory-validated event: consumes
src/OrderService/Consumers/InventoryValidatedConsumer.cs - Inventory response → Order workflow: updates order
src/OrderService/Consumers/InventoryValidatedConsumer.cs - Inventory response → Order-confirmed event: publishes
src/OrderService/Consumers/InventoryValidatedConsumer.cs - Kitchen intake → Order-confirmed event: consumes
src/KitchenService/Consumers/OrderConfirmedConsumer.cs - Kitchen intake → Kitchen operations: creates kitchen order
src/KitchenService/Consumers/OrderConfirmedConsumer.cs - Products API → Product operations: delegates to
src/CatalogService/Controllers/ProductsController.cs - Product operations → Catalog database: reads products
src/CatalogService/Services/ProductsService.cs - Kitchen API → Kitchen operations: delegates to
src/KitchenService/Controllers/KitchenController.cs - Kitchen operations → Kitchen database: reads and writes
src/KitchenService/Services/KitchenService.cs