Event-driven wallet platform built as a Full Cycle challenge. A Go microservice owns accounts and transactions and publishes domain events to Kafka; a Laravel consumer keeps a read model of balances and exposes a query API.
Client → Wallet Core (Go :8080) → Kafka (BalanceUpdated)
↓
Balances Service (Laravel :3003)
↓
MySQL
| Service | Role | Stack |
|---|---|---|
| Wallet Core | Commands: clients, accounts, transactions | Go, Chi, MySQL, Kafka producer |
| Balances Service | Queries: account balances (read model) | Laravel, Kafka consumer, MySQL |
| Kafka + Zookeeper | Async event bus | Confluent images |
| Control Center | Kafka UI | Port 9021 |
- Docker & Docker Compose
git clone https://github.com/fellipesg/fc-eda-wallet-core.git
cd fc-eda-wallet-core
docker compose up -d
docker compose psServices:
| Service | URL |
|---|---|
| Wallet Core | http://localhost:8080 |
| Balances API | http://localhost:3003 |
| Kafka Control Center | http://localhost:9021 |
Laravel migrations/seeders run on container startup.
| Method | Path | Description |
|---|---|---|
POST |
/clients |
Create client |
POST |
/accounts |
Create account |
POST |
/transactions |
Transfer between accounts (emits event) |
| Method | Path | Description |
|---|---|---|
GET |
/api/balances/{account_id} |
Get current balance |
# 1) Create a client
curl -s -X POST http://localhost:8080/clients \
-H "Content-Type: application/json" \
-d '{"name":"Jane Doe","email":"jane@email.com"}'
# 2) Create accounts (use returned client/account IDs)
curl -s -X POST http://localhost:8080/accounts \
-H "Content-Type: application/json" \
-d '{"client_id":"<client-id>"}'
# 3) Transfer
curl -s -X POST http://localhost:8080/transactions \
-H "Content-Type: application/json" \
-d '{"account_id_from":"<from>","account_id_to":"<to>","amount":50}'
# 4) Query read model
curl -s http://localhost:3003/api/balances/<account-id>HTTP client files: api/client.http and balances-service/api/client.http.
Seeded sample accounts (after bootstrap) include account-1 / account-2 with demo balances.
├── cmd/ # Go entrypoints
├── internal/ # Wallet Core domain & application
├── pkg/
├── api/ # HTTP examples for Wallet Core
├── balances-service/ # Laravel balances API + Kafka consumer
├── docker-compose.yaml
└── Dockerfile
docker compose logs balances-app
docker compose logs balances-kafka-consumer
docker compose logs kafka
# Reset (destroys volumes)
docker compose down -v- Event-Driven Architecture (EDA) with Kafka
- CQRS-style separation (write service vs balance read model)
- Polyglot microservices (Go + PHP/Laravel)
- Docker Compose orchestration for local demos
Educational project — Full Cycle course challenge.