How blackuprise/vicander works
Vicander is an Elixir DDD framework, not a standalone application: an adopting application defines domain types and use cases, configures a repository, and starts the framework’s event processes. Its main write workflow validates and executes a command, persists an aggregate with its events, then delivers those events to handlers and projections through the outbox. The README also documents read-only queries, repository-backed projections, and MCP access. Some subsystem paths and links are documented but unsampled; those links cite the README rather than implying source inspection.
Main entry points: command.ex Commands · server.ex MCP server · repository.ex Repository ports · query.ex Queries
Components 21
Domain model
- Domain types
lib/ddd/model - Specifications
lib/ddd/model/specification.ex - Identity
lib/ddd/model/identity.ex
Use cases
- Commands
lib/ddd/use_cases/command.ex - Queries
lib/ddd/use_cases/query.ex - Listing and pagination
lib/ddd/use_cases/listing.ex
Persistence
- Unit of work
lib/ddd/persistence/unit_of_work.ex - Repository ports
lib/ddd/persistence/repository.ex - Ecto repository
lib/ddd/persistence/repository/ecto.ex - In-memory repository
lib/ddd/persistence/in_memory_repository.ex - Projections
lib/ddd/persistence/projection.ex
Events
- Transactional outbox
lib/ddd/persistence/repository/ecto/flush.ex - Outbox poller
lib/ddd/events/outbox/poller.ex - Event bus
lib/ddd/events/event_bus.ex - Event handlers
lib/ddd/events/event_handler.ex - Dead-letter handling
lib/ddd/events/outbox/dead_letter_handler.ex
Interfaces and operations
- MCP server
lib/ddd/mcp/server.ex - MCP registry
lib/ddd/mcp/registry.ex - MCP transports
lib/ddd/mcp - Health and telemetry
lib/ddd/operations
Other components
- Application caller
Connections 26
- Application caller → Commands: calls
README.md - Commands → Domain types: validates and operates
README.md - Domain types → Specifications: checks invariants
README.md - Domain types → Identity: uses identity
README.md - Commands → Unit of work: executes transaction
README.md - Commands → Repository ports: saves aggregate
README.md - Unit of work → Ecto repository: coordinates persistence
- Repository ports → Ecto repository: implemented by
README.md - Repository ports → In-memory repository: implemented by
lib/ddd/persistence/in_memory_repository.ex - Ecto repository → Transactional outbox: writes events
README.md - Transactional outbox → Outbox poller: supplies events
README.md - Outbox poller → Event bus: publishes events
README.md - Event bus → Event handlers: dispatches events
README.md - Event bus → Projections: notifies projections
README.md - Outbox poller → Dead-letter handling: notifies on failure
lib/ddd/events/outbox/dead_letter_handler.ex - Application caller → Queries: calls
lib/ddd/use_cases/query.ex - Queries → Repository ports: reads through
README.md - Application caller → Listing and pagination: requests listing
- Listing and pagination → Repository ports: queries repository
- Application caller → MCP server: connects client
lib/ddd/mcp/server.ex - MCP server → MCP registry: builds registry
lib/ddd/mcp/server.ex - MCP server → MCP transports: serves over
lib/ddd/mcp/server.ex - MCP server → Commands: exposes tools
lib/ddd/mcp/server.ex - MCP server → Queries: exposes tools
lib/ddd/mcp/server.ex - Commands → Health and telemetry: emits telemetry
- Queries → Health and telemetry: emits telemetry
lib/ddd/use_cases/query.ex