[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-95966":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":12,"openIssues":14,"contributorsCount":14,"subscribersCount":14,"size":14,"stars1d":14,"stars7d":14,"stars30d":13,"stars90d":14,"forks30d":14,"starsTrendScore":14,"compositeScore":15,"rankGlobal":10,"rankLanguage":10,"license":16,"archived":17,"fork":17,"defaultBranch":18,"hasWiki":19,"hasPages":17,"topics":20,"createdAt":10,"pushedAt":10,"updatedAt":40,"readmeContent":41,"aiSummary":42,"trendingCount":14,"starSnapshotCount":14,"syncStatus":13,"lastSyncTime":43,"discoverSource":44},95966,"booking-microservices","evangelosvlachos96-dotcom\u002Fbooking-microservices","evangelosvlachos96-dotcom","Flight booking system built as .NET 10 microservices with Vertical Slice Architecture, DDD, CQRS, Event Sourcing, gRPC, RabbitMQ, Wolverine, PostgreSQL, MongoDB and .NET Aspire.","",null,"C#",240,2,0,1.43,"MIT License",false,"main",true,[21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39],"cqrs","docker","domain-driven-design","dotnet","event-driven-architecture","event-sourcing","eventstoredb","grpc","identityserver4","kubernetes","microservices","mongodb","net-aspire","opentelemetry","postgresql","rabbitmq","vertical-slice-architecture","wolverines","yarp","2026-09-21 02:04:29","\u003Cdiv align=\"center\">\n  \u003Cimg src=\"assets\u002Flogo.png\" alt=\"booking-microservices\" \u002F>\n  \u003Cp>\n    \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fevangelosvlachos96-dotcom\u002Fbooking-microservices\u002Factions\u002Fworkflows\u002Fci.yml\">\u003Cimg alt=\"ci-status\" src=\"https:\u002F\u002Fgithub.com\u002Fevangelosvlachos96-dotcom\u002Fbooking-microservices\u002Factions\u002Fworkflows\u002Fci.yml\u002Fbadge.svg?branch=main&style=flat-square\"\u002F>\u003C\u002Fa>\n  \u003C\u002Fp>\n\u003C\u002Fdiv>\n\n# Booking Microservices\n\n> A practical flight-booking system built as microservices with **.NET 10**, using Vertical Slice Architecture, DDD, CQRS, Event Sourcing, gRPC, RabbitMQ, Wolverine, PostgreSQL, MongoDB and .NET Aspire.\n\nDeveloped by **Evangelos Vlachos**.\n\n## Table of Contents\n\n- [Overview](#overview)\n- [Architecture](#architecture)\n- [Services](#services)\n- [Technology Stack](#technology-stack)\n- [Project Structure](#project-structure)\n- [Getting Started](#getting-started)\n  - [Prerequisites](#prerequisites)\n  - [Dev Certificate](#dev-certificate)\n  - [Run with Aspire](#run-with-aspire)\n  - [Run with Docker Compose](#run-with-docker-compose)\n  - [Run with Kubernetes](#run-with-kubernetes)\n  - [Build, Run and Test manually](#build-run-and-test-manually)\n- [API Documentation](#api-documentation)\n- [Development Tooling](#development-tooling)\n- [Contributing](#contributing)\n\n## Overview\n\nThis repository demonstrates how to design and run a production-style microservices system end to end: independent services with their own databases, asynchronous messaging with durable inbox\u002Foutbox, synchronous gRPC calls between services, an API gateway, centralized identity, observability and container\u002FKubernetes deployment.\n\nKey goals:\n\n- **Vertical Slice Architecture** with feature folders. Each request is one self-contained slice.\n- **Domain Driven Design** for all business logic.\n- **CQRS** with MediatR, plus validation and logging pipeline behaviours.\n- **Event Sourcing** (EventStoreDB) for the write side of the Booking service.\n- **Event Driven Architecture** with RabbitMQ on top of Wolverine, using durable **inbox** (idempotent, exactly-once processing) and **outbox** (at-least-once delivery) patterns.\n- **gRPC** for internal service-to-service communication.\n- **PostgreSQL** for write models, **MongoDB** for read models.\n- **Unit, integration, end-to-end and contract tests** (NSubstitute, Testcontainers, PactNet).\n- **Observability** with OpenTelemetry, Jaeger, Prometheus, Grafana and Serilog\u002FKibana.\n- **IdentityServer** (OpenID Connect \u002F OAuth2) for authentication and authorization.\n- **YARP** as the API gateway.\n- **Docker Compose**, **Kubernetes** (Nginx Ingress, cert-manager) and **.NET Aspire** for orchestration.\n\n## Architecture\n\n\u003Cdiv align=\"center\">\n  \u003Cimg src=\".\u002Fassets\u002Fbooking-microservices.png\" alt=\"architecture diagram\" \u002F>\n\u003C\u002Fdiv>\n\nEach service owns its data and exposes a small REST surface through minimal APIs. Commands mutate the write store (PostgreSQL or EventStoreDB) and publish integration events through Wolverine's durable outbox to RabbitMQ. Consumers process those events through the durable inbox and project them into MongoDB read models. Queries read from MongoDB only. Cross-service reads that must be synchronous (for example Booking validating a flight or passenger) go over gRPC.\n\n\u003Cdiv align=\"center\">\n  \u003Cimg src=\".\u002Fassets\u002Fvertical-slice-architecture.png\" alt=\"vertical slice architecture\" \u002F>\n\u003C\u002Fdiv>\n\n## Services\n\n| Service | Responsibility | Write store | Read store |\n|---|---|---|---|\n| **Identity** | Users, roles, tokens (IdentityServer) | PostgreSQL | - |\n| **Flight** | Flights, airports, aircraft, seats | PostgreSQL | MongoDB |\n| **Passenger** | Passenger profiles | PostgreSQL | MongoDB |\n| **Booking** | Booking a seat on a flight for a passenger | EventStoreDB | MongoDB |\n| **ApiGateway** | Single public entry point (YARP) | - | - |\n| **Aspire AppHost** | Local orchestration and dashboard | - | - |\n\n## Technology Stack\n\n- [.NET 10](https:\u002F\u002Fgithub.com\u002Fdotnet\u002Faspnetcore), Minimal APIs, [API Versioning](https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Faspnet-api-versioning)\n- [MediatR](https:\u002F\u002Fgithub.com\u002Fjbogard\u002FMediatR), [FluentValidation](https:\u002F\u002Fgithub.com\u002FFluentValidation\u002FFluentValidation), [Mapster](https:\u002F\u002Fgithub.com\u002FMapsterMapper\u002FMapster)\n- [Wolverine](https:\u002F\u002Fwolverine.netlify.app\u002F) + [RabbitMQ](https:\u002F\u002Fwww.rabbitmq.com\u002F) for messaging, [MassTransit](https:\u002F\u002Fmasstransit.io\u002F) contracts\n- [gRPC](https:\u002F\u002Fgrpc.io\u002F) with [Grpc.AspNetCore](https:\u002F\u002Fgithub.com\u002Fgrpc\u002Fgrpc-dotnet)\n- [Entity Framework Core](https:\u002F\u002Fgithub.com\u002Fdotnet\u002Fefcore) + [PostgreSQL](https:\u002F\u002Fwww.postgresql.org\u002F)\n- [MongoDB](https:\u002F\u002Fwww.mongodb.com\u002F), [EventStoreDB](https:\u002F\u002Fwww.eventstore.com\u002F), [Redis](https:\u002F\u002Fredis.io\u002F)\n- [Duende IdentityServer](https:\u002F\u002Fduendesoftware.com\u002Fproducts\u002Fidentityserver) (OpenID Connect \u002F OAuth2)\n- [YARP](https:\u002F\u002Fmicrosoft.github.io\u002Freverse-proxy\u002F) reverse proxy\n- [OpenTelemetry](https:\u002F\u002Fopentelemetry.io\u002F), [Jaeger](https:\u002F\u002Fwww.jaegertracing.io\u002F), [Prometheus](https:\u002F\u002Fprometheus.io\u002F), [Grafana](https:\u002F\u002Fgrafana.com\u002F), [Serilog](https:\u002F\u002Fserilog.net\u002F) + Kibana\n- [Polly](https:\u002F\u002Fgithub.com\u002FApp-vNext\u002FPolly) resilience, ASP.NET Core Health Checks\n- [Scalar](https:\u002F\u002Fgithub.com\u002Fscalar\u002Fscalar) and Swagger for OpenAPI docs\n- [xUnit](https:\u002F\u002Fxunit.net\u002F), [NSubstitute](https:\u002F\u002Fnsubstitute.github.io\u002F), [Testcontainers](https:\u002F\u002Fdotnet.testcontainers.org\u002F), [PactNet](https:\u002F\u002Fgithub.com\u002Fpact-foundation\u002Fpact-net), [Bogus](https:\u002F\u002Fgithub.com\u002Fbchavez\u002FBogus)\n- [.NET Aspire](https:\u002F\u002Flearn.microsoft.com\u002Fdotnet\u002Faspire), Docker, Kubernetes, Nginx Ingress, cert-manager\n\n## Project Structure\n\n```\n.\n├── src\n│   ├── ApiGateway\u002F            # YARP gateway\n│   ├── Aspire\u002F                # Aspire AppHost and service defaults\n│   ├── BuildingBlocks\u002F        # Shared cross-cutting code (Core, EFCore, Mongo, Wolverine, Jwt, Logging, OpenTelemetry, Polly, TestBase, ...)\n│   └── Services\n│       ├── Booking\u002F           # src\u002FBooking, src\u002FBooking.Api, tests\u002F\n│       ├── Flight\u002F\n│       ├── Identity\u002F\n│       └── Passenger\u002F\n├── deployments\n│   ├── configs\u002F               # otel-collector, prometheus, grafana configs\n│   ├── docker-compose\u002F        # infrastructure and full-stack compose files\n│   └── kubernetes\u002F            # manifests + cert-manager\n├── assets\u002F                    # diagrams and logo\n├── booking.rest               # REST Client requests for manual API testing\n└── booking-microservices.sln\n```\n\nInside every service, code is grouped by **feature** (for example `Flights\u002FFeatures\u002FCreatingFlight\u002FV1\u002F`) rather than by technical layer. Each feature folder holds its endpoint, command\u002Fquery, handler, validator and any events it raises, so a change to one use case touches only that folder.\n\n## Getting Started\n\n### Prerequisites\n\n- [.NET 10 SDK](https:\u002F\u002Fdotnet.microsoft.com\u002Fdownload)\n- [Docker Desktop](https:\u002F\u002Fwww.docker.com\u002Fproducts\u002Fdocker-desktop\u002F)\n- [Node.js](https:\u002F\u002Fnodejs.org\u002F) (for Husky commit hooks)\n- Optional: [.NET Aspire CLI](https:\u002F\u002Flearn.microsoft.com\u002Fdotnet\u002Faspire\u002Ffundamentals\u002Faspire-cli), `kubectl`\n\n### Dev Certificate\n\nCreate and trust a development HTTPS certificate so the containers can serve TLS.\n\nWindows (PowerShell):\n\n```powershell\ndotnet dev-certs https -ep $env:USERPROFILE\\.aspnet\\https\\aspnetapp.pfx -p password\ndotnet dev-certs https --trust\n```\n\nmacOS \u002F Linux:\n\n```bash\ndotnet dev-certs https -ep ${HOME}\u002F.aspnet\u002Fhttps\u002Faspnetapp.pfx -p password\ndotnet dev-certs https --trust\n```\n\n### Run with Aspire\n\nThe fastest way to get everything up locally, with a dashboard for logs, traces and metrics:\n\n```bash\naspire run\n```\n\nThe Aspire dashboard is available at `http:\u002F\u002Flocalhost:18888`.\n\n### Run with Docker Compose\n\nInfrastructure only (RabbitMQ, PostgreSQL, EventStoreDB, MongoDB, Redis, Jaeger, Zipkin, OTel Collector, Prometheus, Grafana):\n\n```bash\ndocker-compose -f .\u002Fdeployments\u002Fdocker-compose\u002Fdocker-compose.infrastructure.yaml up -d\n```\n\nFull stack including the services:\n\n```bash\ndocker-compose -f .\u002Fdeployments\u002Fdocker-compose\u002Fdocker-compose.yaml up -d\n```\n\n### Run with Kubernetes\n\nInstall [cert-manager](https:\u002F\u002Fcert-manager.io\u002Fdocs\u002Finstallation) first, then apply the TLS issuer and the application manifests:\n\n```bash\nkubectl apply -f .\u002Fdeployments\u002Fkubernetes\u002Fbooking-cert-manager.yml\nkubectl apply -f .\u002Fdeployments\u002Fkubernetes\u002Fbooking-microservices.yml\n```\n\n> The manifests reference images under the `evangelosvlachos96\u002F` Docker Hub namespace. Build and push the service images there (or change the image names) before deploying.\n\n### Build, Run and Test manually\n\nBuild the whole solution from the repository root:\n\n```bash\ndotnet build\n```\n\nRun a single service from its `*.Api` project folder (for example `src\u002FServices\u002FFlight\u002Fsrc\u002FFlight.Api`):\n\n```bash\ndotnet run\n```\n\nRun all tests (integration and end-to-end tests start their dependencies with Testcontainers, so Docker must be running):\n\n```bash\ndotnet test\n```\n\n## API Documentation\n\nEvery service exposes OpenAPI documentation at `\u002Fswagger` (Swagger UI) and `\u002Fscalar\u002Fv1` (Scalar).\n\nFor quick manual testing, open [booking.rest](.\u002Fbooking.rest) with the VS Code [REST Client](https:\u002F\u002Fgithub.com\u002FHuachao\u002Fvscode-restclient) extension. Seeded users are `van1` \u002F `Admin@123456` (admin) and `van2` \u002F `User@123456` (user).\n\n## Development Tooling\n\n**.NET tools** (CSharpier formatter, dotnet-outdated) are declared in `.config\u002Fdotnet-tools.json`:\n\n```bash\ndotnet tool restore\n```\n\n**Husky + commitlint** enforce [Conventional Commits](https:\u002F\u002Fwww.conventionalcommits.org\u002F) and run the formatter before each commit:\n\n```bash\nnpm install\n```\n\n**Upgrade NuGet packages** across the solution:\n\n```bash\ndotnet outdated -u\n```\n","这是一个基于 .NET 10 构建的航班预订微服务系统，采用垂直切片架构（Vertical Slice Architecture）与领域驱动设计（DDD），支持命令查询职责分离（CQRS）、事件溯源（Event Sourcing）和事件驱动架构。核心功能包括：gRPC 同步服务间通信、RabbitMQ + Wolverine 实现可靠消息传递（含持久化 inbox\u002Foutbox）、PostgreSQL 存储写模型、MongoDB 存储读模型、IdentityServer4 提供统一身份认证、YARP 作为 API 网关，以及 .NET Aspire 支持云原生部署。适用于学习或参考高可用、可观测、可测试的生产级微服务架构设计。","2026-09-07 02:30:06","CREATED_QUERY"]