The aim of this project is to simulate a Food Delivery Application.
- Order
- Rider
- An order is initially created with a default status (New).
- A rider accepts an order, triggering an event stream start and dispatching an OrderAccepted event.
- The rider updates their location to track the order's progress, with a LocationUpdate event dispatched for each new location.
- The Order Aggregate entity reflects the result of order and rider updates. There are two ways to retrieve an aggregate:
- Live Aggregation: Evaluating all events from the database each time you request the data.
- Snapshot Aggregation: Stored in memory using Marten.
Minimal APIs are designed for creating HTTP APIs with minimal dependencies, ideal for microservices and applications requiring minimal files, features, and dependencies in ASP.NET Core. Learn more
Publishing your app as Native AOT produces a self-contained app that's been ahead-of-time (AOT) compiled to native code. Native AOT apps boast faster startup times and smaller memory footprints, and they can run on machines without the .NET runtime installed. Learn more
Note: Marten and projection cannot work with AOT compilation because dynamically generated code is not allowed.
Command Query Responsibility Segregation (CQRS) is a pattern that separates the read and write operations of a system into distinct paths. Learn more
To implement the CQRS pattern, a Mediator Library is employed to manage Queries and Commands. MediatR
In combination with MediatR, FluentValidation is used to validate Queries and Commands before they hit the handlers. FluentValidation
Event Sourcing captures every change to an application’s state as a sequence of immutable events, maintaining a full history of state changes. Learn more
The combination of Event Sourcing and CQRS offers several advantages:
- Historical Transparency
- Flexibility in Query Optimization
- Scalability and Performance
- Resilience and Fault Tolerance
- Support for Complex Domains
Domain-driven design (DDD) focuses on modeling software to match the domain or subject area that the software is intended for. Learn more
- Clarity of Business Logic
- Improved Communication
- Flexibility & Scalability
- Quality Software
Conduct testing with NSubstitute for MOQ.
To evaluate the quality of existing software tests, mutation testing with Stryker is integrated into the project.
Navigate to the 'docker' folder to access the Docker Compose file, facilitating the deployment of your persistence layer.
Rancher Desktop: A free and commercial tool for Docker and/or Kubernetes in a local environment.