This is a playground to explore Event Sourcing, DDD, CQRS, and async architecture in standard lib Go code. The business logic models a greatly simplified e-commerce scenario simulating a distributed system with separate storage per service domain.
- Event-sourced aggregates
- Transactional outbox integrated into task processing
- Durable async task pool runner
- Internal event bus with channel draining
- ES snapshots are not implemented
- No application entry point — tests only
- SQLite 3
- PostgreSQL 9.1+
Use the Makefile:
E2E: make test.gateway
Run all tests: make test.all
Overload the default .env config: make test.all cfg=pg.example for file .env.pg.example
- Add new event struct declaration in
eventspackage: BaseEvent + payload fields. - Update
events/generate.goif needed. - Run:
make gen.events.