Evently is a modular event management system built with .NET 9, following Clean Architecture principles and Domain-Driven Design (DDD). It demonstrates a transition from a Modular Monolith to a Microservices architecture.
- Framework: ASP.NET Core 9
- Databases:
- PostgreSQL (Write Model)
- MongoDB (Read Model)
- Message Broker: RabbitMQ (MassTransit)
- Caching: Redis (Hybrid Caching)
- Identity Provider: Keycloak
- Background Jobs: Quartz.NET
- Observability:
- OpenTelemetry
- Jaeger (Tracing)
- Seq (Logging)
- API Gateway: YARP (Yet Another Reverse Proxy)
- API Documentation: Scalar
The system is divided into the following modules:
- Users: User management and authentication.
- Events: Event creation, scheduling, and management.
- Ticketing: Ticket sales and inventory management (Microservice).
- Attendance: Tracking event attendance.
- Docker Desktop
- .NET 9 SDK (optional, for local development)
The easiest way to run the entire system is using Docker Compose.
-
Clone the repository.
-
Navigate to the project root.
-
Run the following command:
docker-compose up -d
| Service | URL | Description |
|---|---|---|
| Evently API | http://localhost:5000 |
Main API Gateway / Monolith |
| Ticketing API | http://localhost:5004 |
Ticketing Microservice |
| Gateway | http://localhost:5002 |
API Gateway (YARP) |
| Keycloak | http://localhost:18080 |
Identity Provider (admin/admin) |
| Seq | http://localhost:8082 |
Logging Dashboard |
| Jaeger | http://localhost:16686 |
Tracing Dashboard |
| Scalar Docs (Core) | http://localhost:5000/scalar |
API Docs (Users, Events, Attendance) |
| Scalar Docs (Ticketing) | http://localhost:5004/scalar |
API Docs (Ticketing) |
Evently follows a Modular Monolith architecture where modules are loosely coupled. Some modules, like Ticketing, are extracted into separate services to demonstrate microservices capabilities.
- Domain-Driven Design (DDD): Rich domain models with aggregates, entities, and value objects.
- CQRS: Command Query Responsibility Segregation using MediatR.
- Event-Driven Architecture: Asynchronous communication between modules using integration events.
- Outbox Pattern: Reliable event publishing.
- Inbox Pattern: Idempotent event processing.
- Saga Pattern: Managing long-running distributed transactions (e.g., using MassTransit).
API documentation is split between the services:
- Core Modules:
http://localhost:5000/scalar(Users, Events, Attendance) - Ticketing Module:
http://localhost:5004/scalar
To run the tests, use the following command in the solution directory:
dotnet test-
If you encounter issues, check the logs of the individual services using:
docker-compose logs -f
-
For database migrations, use the following command:
dotnet ef database update
Ensure the correct connection string is set in the environment variables.
This project is licensed under the MIT License - see the LICENSE file for details.