OnionStore

Onion Store is a modern e-commerce platform built with ASP.NET Core API and Onion Architecture.

Stars
16

Bot releases are hidden (Show)

OnionStore - V.1.0 Latest Release

Published by ahmedeldamity about 1 month ago

Overview

This release includes the initial version of the e-commerce API application with full functionality for managing brands, categories, products, orders, payments, and more. Key integrations and features are included to ensure smooth operations and scalability.

Key Features

  • Docker Compose Setup:
    The project includes Docker Compose configurations to easily set up and run the API, Redis caching, and SQL Server database.

  • Health Check Endpoint:
    A unified /health endpoint that monitors the status of key system components:

    • SQL Server Database: Ensures database connectivity.
    • Redis Caching: Confirms the availability of the Redis service.
    • Hangfire Job Processing: Verifies background job processing.
    • Mail Service: Checks if the mail service is operational.
  • API Endpoints:
    Product management endpoints allow product filtering by brand, category, search keywords, and sorting.
    Complete endpoints for user authentication, order management, basket management, and payment processing.

  • Rate Limiting:
    The API uses rate limiting strategies to protect against misuse:

    • Fixed window
    • Sliding window
    • Concurrency control to limit simultaneous requests.
  • API Versioning:
    Supports multiple API versions to ensure backward compatibility. Clients can specify the API version via URL, query string, or headers.

Error Handling and Global Exception Handling

  • Global Error Exception Handling:
    The application includes a global exception handler that captures and processes unhandled exceptions. This ensures that all errors are logged appropriately and that clients receive consistent error responses in a standardized format.

  • Result Pattern for Error Handling:
    The result pattern is used to handle both success and error responses across the API. Instead of throwing exceptions, functions return a Result object that encapsulates either a successful result or an error. This pattern simplifies error handling and improves the reliability of API responses.

    • Success Responses:
      When operations succeed, the result pattern returns a structured success object containing the necessary data and success message.

    • Error Responses:
      When errors occur, the result object provides a consistent error message and status code, ensuring clients receive clear and actionable information.