How bakhtarian/todo_list works
This is a Symfony Todo List CQRS/event-sourcing application. The principal flow is an API request through an ApiPlatform processor into command handling, domain events, event persistence, and projected MongoDB read models; queries serve those read models back through the API. The tree and README also describe replay and notification-oriented projectors, but their implementation details were not sampled, so those links are shown as documented or unverified rather than asserted source calls.
Main entry points: Bus CQRS buses · Read Read-model projectors · TodoListRepository.php Event-sourced repository · Processor Request processors
Components 19
API boundary
- REST resources
src/UI/Http/Rest/ApiPlatform - Request processors
src/UI/Http/Rest/ApiPlatform/Processor - List provider
src/UI/Http/Rest/ApiPlatform/Provider/TodoListProvider.php - API outputs
src/UI/Http/Rest/ApiPlatform/Output
Application workflow
- Command handlers
src/Application/TodoList/Command - Description query handler
src/Application/TodoList/Query/FindTodoListDescriptionQueryHandler.php - CQRS buses
src/Infrastructure/Shared/Bus
Todo List domain
- Todo List aggregate
src/Domain/TodoList/TodoList.php - List events
src/Domain/TodoList/Event - Title uniqueness rule
src/Domain/TodoList/Specification/TitleMustBeUniqueRule.php
Persistence and projections
- Event-sourced repository
src/Infrastructure/TodoList/Persistence/TodoListRepository.php - PostgreSQL event store
src/Infrastructure/TodoList/Persistence/Write/TodoListEventStore.php - Mongo read repository
src/Infrastructure/Shared/Persistence/Read/AbstractMongoDBReadModelRepository.php - Detail view repository
src/Infrastructure/TodoList/Persistence/Read/DetailView/DetailViewRepository.php - Overview read model
src/Infrastructure/TodoList/Persistence/Read/Overview/OverviewRepository.php - Read-model projectors
src/Infrastructure/TodoList/Persistence/Read - Event replay
src/Infrastructure/TodoList/Replay/ReplayTodoListAggregate.php - Lifecycle notifications
src/Domain/Shared/Projector/ProjectorInterface.php
Other components
- API client
Connections 22
- API client → REST resources: sends requests
README.md - REST resources → Request processors: dispatches writes
src/UI/Http/Rest/ApiPlatform/Processor/SetDescriptionOfListProcessor.php - Request processors → CQRS buses: dispatches commands
src/UI/Http/Rest/ApiPlatform/Processor/SetDescriptionOfListProcessor.php - Request processors → CQRS buses: dispatches queries
src/UI/Http/Rest/ApiPlatform/Processor/SetDescriptionOfListProcessor.php - CQRS buses → Command handlers: routes commands
- Command handlers → Todo List aggregate: invokes aggregate
src/Application/TodoList/Command/AddDescriptionToTodoListCommandHandler.php - Command handlers → Event-sourced repository: loads and saves
src/Application/TodoList/Command/AddDescriptionToTodoListCommandHandler.php - Todo List aggregate → Title uniqueness rule: checks uniqueness
src/Domain/TodoList/TodoList.php - Todo List aggregate → List events: applies events
src/Domain/TodoList/TodoList.php - Event-sourced repository → PostgreSQL event store: persists stream
- Event-sourced repository → CQRS buses: publishes events
src/Infrastructure/TodoList/Persistence/TodoListRepository.php - List events → Read-model projectors: build read models
README.md - Read-model projectors → Detail view repository: updates view
src/Infrastructure/TodoList/Persistence/Read/DetailView/DetailViewRepository.php - Read-model projectors → Overview read model: updates overview
src/Infrastructure/TodoList/Persistence/Read/Overview/OverviewRepository.php - Detail view repository → Mongo read repository: uses repository
src/Infrastructure/TodoList/Persistence/Read/DetailView/DetailViewRepository.php - Overview read model → Mongo read repository: uses repository
src/Infrastructure/TodoList/Persistence/Read/Overview/OverviewRepository.php - Description query handler → Detail view repository: reads description
src/Application/TodoList/Query/FindTodoListDescriptionQueryHandler.php - CQRS buses → Description query handler: routes queries
- List provider → CQRS buses: requests list data
- List provider → API outputs: provides response
src/UI/Http/Rest/ApiPlatform/Provider/TodoListProvider.php - Event replay → Event-sourced repository: rebuilds state
README.md - Read-model projectors → Lifecycle notifications: may notify lifecycle
README.md