How alchemistlowkey/play.microservices works
Play Microservices is a .NET microservices sample with a Next.js interface. Users browse and manage catalog items, then view and manage inventory; catalog changes are published as events for Inventory to consume. The graph also shows shared MongoDB repository behavior and the documented RabbitMQ/MongoDB infrastructure. Source excerpts establish controller-to-repository and event-publishing calls; the README documents the broader service and frontend relationships. Some startup wiring and frontend request details are not evidenced in the supplied excerpts, so those links are omitted.
Main entry points: Controllers/ItemsController.cs Catalog endpoints · IRepository.cs Repository interface · Controllers/ItemsController.cs Inventory endpoints · Contracts.cs Catalog event contracts
Components 22
Web frontend
- Catalog UI
Play.Frontend/play.frontend/app/catalog/page.js - Inventory UI
Play.Frontend/play.frontend/app/inventory/page.js - Catalog API client
Play.Frontend/play.frontend/lib/catalogApi.js - Inventory API client
Play.Frontend/play.frontend/lib/inventoryApi.js
Catalog service
- Catalog endpoints
Play.Catalog/src/Play.Catalog.Service/Controllers/ItemsController.cs - Catalog item
Play.Catalog/src/Play.Catalog.Service/Entities/Item.cs - Catalog event contracts
Play.Catalog/src/Play.Catalog.Contracts/Contracts.cs
Inventory service
- Inventory endpoints
Play.Inventory/src/Play.Inventory.Service/Controllers/ItemsController.cs - Inventory record
Play.Inventory/src/Play.Inventory.Service/Entities/InventoryItem.cs - Catalog snapshot
Play.Inventory/src/Play.Inventory.Service/Entities/CatalogItem.cs - Catalog HTTP client
Play.Inventory/src/Play.Inventory.Service/Clients/CatalogClient.cs - Created event consumer
Play.Inventory/src/Play.Inventory.Service/Consumers/CatalogItemCreatedConsumer.cs - Updated event consumer
Play.Inventory/src/Play.Inventory.Service/Consumers/CatalogItemUpdatedConsumer.cs - Deleted event consumer
Play.Inventory/src/Play.Inventory.Service/Consumers/CatalogItemDeletedConsumer.cs
Shared persistence and messaging
- Repository interface
Play.Common/src/Play.Common/IRepository.cs - Mongo repository
Play.Common/src/Play.Common/MongoDB/MongoRepository.cs - Entity interface
Play.Common/src/Play.Common/IEntity.cs - Mongo settings
Play.Common/src/Play.Common/Settings/MongoDbSettings.cs - RabbitMQ settings
Play.Common/src/Play.Common/Settings/RabbitMQSettings.cs
Infrastructure
- MongoDB
- RabbitMQ
Other components
- User
Connections 26
- User → Catalog UI: browses
README.md - User → Inventory UI: views inventory
README.md - Catalog UI → Catalog API client: requests catalog
- Inventory UI → Inventory API client: requests inventory
- Catalog API client → Catalog endpoints: calls API
- Inventory API client → Inventory endpoints: calls API
- Catalog endpoints → Repository interface: reads and writes
Play.Catalog/src/Play.Catalog.Service/Controllers/ItemsController.cs - Catalog endpoints → Catalog item: creates and updates
Play.Catalog/src/Play.Catalog.Service/Controllers/ItemsController.cs - Catalog endpoints → Catalog event contracts: publishes changes
Play.Catalog/src/Play.Catalog.Service/Controllers/ItemsController.cs - Inventory endpoints → Repository interface: reads and writes
Play.Inventory/src/Play.Inventory.Service/Controllers/ItemsController.cs - Inventory endpoints → Inventory record: manages records
Play.Inventory/src/Play.Inventory.Service/Controllers/ItemsController.cs - Inventory endpoints → Catalog snapshot: joins catalog details
Play.Inventory/src/Play.Inventory.Service/Controllers/ItemsController.cs - Catalog HTTP client → Catalog endpoints: fetches catalog
- Created event consumer → Catalog event contracts: handles created
Play.Inventory/src/Play.Inventory.Service/Consumers/CatalogItemCreatedConsumer.cs - Updated event consumer → Catalog event contracts: handles updated
Play.Inventory/src/Play.Inventory.Service/Consumers/CatalogItemUpdatedConsumer.cs - Deleted event consumer → Catalog event contracts: handles deleted
Play.Inventory/src/Play.Inventory.Service/Consumers/CatalogItemDeletedConsumer.cs - Created event consumer → Repository interface: updates snapshot
Play.Inventory/src/Play.Inventory.Service/Consumers/CatalogItemCreatedConsumer.cs - Updated event consumer → Repository interface: updates snapshot
Play.Inventory/src/Play.Inventory.Service/Consumers/CatalogItemUpdatedConsumer.cs - Deleted event consumer → Repository interface: removes snapshot
Play.Inventory/src/Play.Inventory.Service/Consumers/CatalogItemDeletedConsumer.cs - Repository interface → Mongo repository: implemented by
Play.Common/src/Play.Common/MongoDB/Extension.cs - Mongo repository → Entity interface: requires
Play.Common/src/Play.Common/MongoDB/MongoRepository.cs - Catalog endpoints → RabbitMQ: publishes events
README.md - RabbitMQ → Created event consumer: delivers events
README.md - RabbitMQ → Updated event consumer: delivers events
README.md - RabbitMQ → Deleted event consumer: delivers events
README.md - Mongo repository → MongoDB: persists entities
README.md