Skip to content

Gravy is a robust, scalable, and cleanly architected backend for a food delivery application. Built with ASP.NET Core Web API, the project emphasizes modern software engineering principles such as Clean Architecture,Domain-Driven Design(DDD), and integration of advanced features like Outbox Pattern, Redis Cache, and comprehensive Logging mechanisms

License

Notifications You must be signed in to change notification settings

MrEshboboyev/Gravy

Gravy 🍲

Gravy is a robust, scalable, and cleanly architected backend solution for a food delivery application, built using ASP.NET Core Web API. Gravy leverages modern software engineering principles, including Clean Architecture, Domain-Driven Design (DDD), and advanced techniques like the Outbox Pattern, Redis Cache, and Comprehensive Logging.

This project is designed for high performance, maintainability, and developer productivity.


🌟 Features

  • 🍔 Efficient Order Processing
    Scalable and reliable order lifecycle management.

  • 🗂️ Clean Architecture
    Clear separation of concerns for maintainability and testability.

  • 🌐 Domain-Driven Design (DDD)
    Focused on aligning the codebase with real business requirements.

  • 🔁 Outbox Pattern
    Ensures reliable message delivery and event processing.

  • Redis Cache
    Enhances application performance with fast caching.

  • 📜 Comprehensive Logging
    Detailed monitoring and logging using Serilog for improved debugging and observability.


🛠️ Technologies Used

The project is built using the following libraries, tools, and frameworks:

Technology Purpose
ASP.NET Core Web API development
Entity Framework Core ORM for database access
Dapper Lightweight ORM for high-performance queries
Redis Caching for fast data access
Serilog Logging and monitoring
AutoMapper Object mapping for cleaner code
FluentValidation Input and model validation

🧩 Design Patterns

Gravy employs modern and proven architectural and design patterns:

  1. Clean Architecture

    • Enforces separation of concerns to ensure long-term maintainability.
    • Divides the project into Domain, Application, Infrastructure, and Presentation layers.
  2. Domain-Driven Design (DDD)

    • Focused on the core domain logic and encapsulating business rules.
  3. Outbox Pattern

    • Ensures reliable event publishing to external systems using transactional outboxes.
  4. Repository Pattern

    • Abstracts database access logic for cleaner and more testable code.
  5. Result Pattern

    • Provides a standardized way to handle operation results, making it easier to deal with success and failure cases.
  6. Idempotency

    • Ensures that operations can be performed multiple times without different outcomes, which is crucial for reliability in distributed systems.
  7. CQRS (Command Query Responsibility Segregation)

    • Separates read and write operations to optimize performance and scalability.
  8. Logging

    • Implements comprehensive logging to capture important events and errors, aiding in monitoring and debugging the application.

🚀 Installation

Follow these steps to set up the project locally:

Prerequisites

Ensure you have the following installed:

  • .NET 9 SDK
  • PostgreSQL for database support
  • Redis server (optional but recommended)

Setup

  1. Clone the repository

    git clone https://github.com/MrEshboboyev/Gravy.git  
    cd Gravy  
  2. Restore dependencies

    dotnet restore  
  3. Apply database migrations

    dotnet ef database update  
  4. Run the project

    dotnet run  

The application will start at http://localhost:7082.


📖 Usage

Example: Creating a New Order

Here’s a simple example of how to create a new order:

using Gravy.Application.Services;  
using Gravy.Domain.Entities;  

// Use the factory method to create a new order
var order = OrderCreate(
    Guid.NewGuid(),
    Guid.NewGuid(),
    Guid.NewGuid(),
    DeliveryAddress.Create(
      "street",
      "city",
      "state",
      Location.Create(
      10.0,
      12.0
   )
);

🧪 Testing

To run the tests for Gravy:

dotnet test  

The project uses xUnit for testing and ensures thorough coverage across application and domain layers.


🤝 Contributing

We welcome contributions to Gravy! Follow these steps to get started:

  1. Fork the repository.
  2. Clone your fork locally:
    git clone https://github.com/YourUsername/Gravy.git  
  3. Create a new branch for your feature:
    git checkout -b feature/your-feature  
  4. Make your changes and commit them:
    git commit -m "Add your feature"  
  5. Push to your branch:
    git push origin feature/your-feature  
  6. Open a Pull Request.

Please make sure to adhere to the project's coding standards and best practices.


📄 License

This project is licensed under the MIT License. See the LICENSE file for details.


📧 Contact

For any questions, feedback, or collaboration opportunities:


⭐ Acknowledgments

Special thanks to:

  • The ASP.NET Core Team for the incredible framework.
  • All contributors to this project!

🌟 Give Gravy a Star!

If you find this project helpful or interesting, please consider giving it a ⭐ on GitHub!

Star


Thank you for checking out Gravy! We hope it simplifies your food delivery backend development and provides a foundation for robust applications. 🚀

About

Gravy is a robust, scalable, and cleanly architected backend for a food delivery application. Built with ASP.NET Core Web API, the project emphasizes modern software engineering principles such as Clean Architecture,Domain-Driven Design(DDD), and integration of advanced features like Outbox Pattern, Redis Cache, and comprehensive Logging mechanisms

Topics

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages