Skip to content

MikolajKocik/RentCarX

 
 

Repository files navigation

RentCarX - Scalable Backend Architecture Showcase

.NET Azure Docker Architecture

Note to Recruiters: This repository is a fork of an engineering thesis project co-created with a frontend developer. This fork serves as a portfolio showcase for the Backend Architecture, Cloud Infrastructure, and DevOps pipelines, which were designed and implemented entirely by me.

Project Overview

RentCarX is a cloud-native Vehicle Reservation Platform designed for scalability and maintainability. The system handles the complete rental lifecycle: from vehicle searching and booking, through secure payments, to administrative management and reporting.

The core objective was to build a robust, distributed system using Clean Architecture principles, capable of handling high traffic loads verified by Azure Load Testing.

My Technical Contributions

As the Backend Architect & DevOps Engineer, I was responsible for:

  • Core Architecture: Designing the system using Clean Architecture and CQRS (Command Query Responsibility Segregation) pattern with MediatR.
  • Cloud Infrastructure: Deploying the solution to Azure App Service and Azure Container Apps using Docker containers.
  • Observability: Implementing a full telemetry stack with OpenTelemetry, Grafana, and Prometheus for real-time monitoring.
  • Background Processing: Decoupling long-running tasks (e.g., reservation deadlines, email notifications) using Hangfire workers.
  • Integrations: Implementing secure payments via Stripe API and PDF/Excel reporting using QuestPDF/ClosedXML.

Architecture & Design Patterns

The solution is split into loosely coupled layers to ensure testability and separation of concerns:

Layer Technologies & Patterns
Presentation ASP.NET Core Web API, Global Exception Handling, Swagger Versioning
Application CQRS (MediatR), FluentValidation, DTOs, AutoMapper
Domain Enterprise logic, Entities, Enums, Custom Exceptions
Infrastructure EF Core, SQL Server, Identity, External Services (Stripe, Azure Blobs)

Key Design Decisions:

  • CQRS: Separated read and write operations to optimize performance and scalability.
  • Background Jobs: Utilized a separate RentCarX.HangfireWorker service to handle recurring tasks like checking car availability without blocking the main API thread.
  • Feature Flags: Implemented feature management to toggle system capabilities (e.g., Notification Service) dynamically.

🛠️ Tech Stack

  • Language: C# (.NET 8)
  • Frameworks: ASP.NET Core Web API, Entity Framework Core
  • Database: Azure SQL Database / MSSQL (Dev)
  • Cloud & DevOps: Azure App Service, Docker, Azure Container Registry
  • Observability: OpenTelemetry, Grafana, Prometheus, Serilog
  • Background Jobs: Hangfire (Persistent storage in SQL)
  • Payment Gateway: Stripe API
  • Reporting: QuestPDF, ClosedXML

Getting Started (Local Development)

The project is fully containerized. To spin up the backend, database, and background worker locally:

  1. Clone the repository:

    git clone [https://github.com/your-username/RentCarX.git](https://github.com/your-username/RentCarX.git)
    cd RentCarX
  2. Configure Environment: Rename .env.template to .env and fill in the necessary secrets (Stripe keys, Connection Strings).

  3. Run with Docker Compose:

    docker-compose up -d --build

    This starts the API, SQL Server, and Hangfire Dashboard.

  4. Access Dashboards:

    • Swagger API: http://localhost:8080/swagger
    • Hangfire Dashboard: http://localhost:8080/hangfire

Video

Watch the video

License & Credits

  • Backend Architecture & DevOps: Mikołaj Kocik
  • Frontend Development: Dawid Majchrzak

This project was developed as part of an Engineering Thesis.

About

Cloud-native API utilizing .NET 8, Docker, CQRS, Hangfire & OpenTelemetry. Deployed with Azure App Service.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • C# 99.3%
  • Dockerfile 0.7%