A microservices-based, event-driven and event sourcing application for tracking financial transactions.
ExpenseTracker is built with modularity, scalability, and observability in mind. It enables users to create accounts, track income/expenses, and audit every transaction using Event Sourcing and Event-Driven Architecture.
- Features
- Technologies Used
- Installation
- Usage
- API Reference
- Tests
- Deployment
- Contributing
- License
- Contact and Acknowledgments
- 🧾 Account creation and lifecycle management
- 💸 Deposit and withdrawal tracking
- 📜 Event-sourced audit logs
- 🧠 Projections using Marten for read models
- 🚀 Asynchronous communication with RabbitMQ and Wolverine
- 🔒 Health checks and diagnostics endpoints
- 📦 Containerized using Docker Compose
- 🛡️ API Gateway via Kong
- Backend: .NET 8, C#
- Messaging: RabbitMQ, Wolverine
- Event Store & Projections: Marten (PostgreSQL)
- API Gateway: Kong
- Cache: Redis
- Infrastructure: Docker, Docker Compose
- Tests: xUnit, Testcontainers
- Docker + Docker Compose
- .NET 8 SDK
- Git
# Clone the repository
git clone https://github.com/aekoky/ExpenseTracker.git
cd ExpenseTracker
# Start the system
docker-compose up --build- Kong Gateway Proxy: http://localhost:8000
- AuditService Swagger: http://localhost:8000/audit/api/docs
- ExpenseService Swagger: http://localhost:8000/expense/api/docs
Health endpoints:
GET /healthRun services manually if needed:
dotnet run --project src/Services/ExpenseService
dotnet run --project src/Services/AuditServicePOST /expense/api/accountsPUT /expense/api/accounts/{id}/depositPUT /expense/api/accounts/{id}/withdrawDELETE /expense/api/accounts/{id}
GET /audit/api/accountsGET /audit/api/accounts/{id}/events
dotnet testTest projects are located in /tests:
ExpenseService.IntegrationTestsExpenseService.UnitTestsAuditService.IntegrationTestsAuditService.UnitTests
Uses Testcontainers for ephemeral PostgreSQL and RabbitMQ setup.
- Deploy via Docker Compose or Kubernetes
- Customize
.envanddocker-compose.override.ymlfor production settings - Ensure external databases, queues, and cache systems are configured properly
We welcome contributions!
- Fork the repo
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a pull request
This project is licensed under the MIT License.
Developed by Reda AEKOKY
Special thanks to the open-source community and libraries like:
- JasperFx Ecosystem (Marten, Wolverine)
- Testcontainers
- Kong Gateway