meysamhadeli/booking-microservices
61.5
Weak · 8 November 2026
5.4k
lines of production code
C#
primary language
7
measurements over time
What this system is
This system is a .NET 10 microservices platform for managing flight reservations, comprising distinct services for Identity, Flight, Booking, and Passenger data. It employs a CQRS architecture with vertical slices, utilizing PostgreSQL for write models and MongoDB for read models, while coordinating state changes via EventStoreDB and RabbitMQ. The system enforces strict domain validation through strongly-typed value objects and supports inter-service communication via gRPC and an API Gateway, all orchestrated locally using .NET Aspire.
How it got here
2022 — Microservices scaffolding and domain implementation
62 changes.
The project was initialized with a .NET 10 microservices architecture, establishing the core infrastructure for Identity, Flight, Booking, and Passenger services alongside an API Gateway. This period focused on implementing domain models, data access layers using PostgreSQL and MongoDB, and gRPC communication, while standardizing the codebase with minimal APIs and OpenTelemetry observability. Comprehensive integration and unit tests were added to validate the new services and their interactions.
2023 — Vertical slice architecture and domain hardening
30 changes.
The project refactored core services to adopt a vertical slice architecture with CQRS patterns, separating command and read-model handlers for operations like flight and passenger management. This period also focused on strengthening domain integrity by introducing strongly-typed value objects with factory-based validation and implementing optimistic concurrency control in the Identity service.
2024–2026 — Aspire orchestration and contract testing
5 changes.
The project introduced .NET Aspire for local development orchestration and centralized service defaults, streamlining infrastructure setup and observability. Concurrently, it established rigorous API contract verification through PactNet tests across core services and enforced code quality standards via Husky.
Features
Add FlightDto record for flight data transfer
A new FlightDto record has been introduced in the Flights/Dtos folder to serve as a data transfer object for flight information. This record exposes key flight details including the unique identifier, flight number, associated aircraft and airport IDs, departure and arrival dates, duration, flight date, current status, and price, enabling structured data exchange within the vertical slice architecture.
src/Services/Flight/src/Flight/Flights/Dtos · high confidence
Add PassengerDto record for passenger data transfer
A new PassengerDto record has been introduced in the Dtos folder to serve as a data transfer object for passenger information. This record exposes the passenger's unique identifier, name, passport number, type, and age, providing a structured way to pass passenger details across service boundaries.
src/Services/Passenger/src/Passenger/Passengers/Dtos · high confidence
Add RegisterIdentityUserException class
A new RegisterIdentityUserException class has been added to the Identity service's exception handling structure. This class inherits from AppException and is designed to handle errors specifically related to user registration failures within the identity management system.
src/Services/Identity/src/Identity/Identity/Exceptions · high confidence
Add domain-specific exception classes for Airports, Flights, and Seats
The Flight service now includes dedicated exception classes for validation and business-rule errors across the Airports, Flights, and Seats domains. These new types (e.g., AirportAlreadyExistException, FlightNotFountException, AllSeatsFullException) inherit from Woo.Core.Exception base classes and provide clear, domain-specific error messages, ensuring that users receive precise feedback when operations fail due to invalid inputs or state conflicts.
src/Services/Flight/src/Flight/Airports/Exceptions, src/Services/Flight/src/Flight/Flights/Exceptions, src/Services/Flight/src/Flight/Seats/Exceptions · high confidence
Add flight update capability via REST API and MongoDB read-model sync
Users can now update flight details through a PUT endpoint at /flight (v1), which validates inputs such as price, status, and dates before persisting changes to the database. The system also synchronizes these updates to the MongoDB read-model, ensuring that queries against the read-side reflect the latest flight information immediately after the update.
src/Services/Flight/src/Flight/Flights/Features/UpdatingFlight · high confidence
Add passenger registration handler and domain event
The system now includes a handler that processes incoming UserCreated messages to register new passengers. When a user is created, the handler checks if a passenger with the same passport number already exists; if not, it creates a new Passenger entity and publishes a PassengerCreatedDomainEvent to notify other parts of the system.
src/Services/Passenger/src/Passenger/Identity · high confidence
Add seat reservation capability with API endpoint and read-model synchronization
Users can now reserve a specific seat on a flight via a new POST /flight/reserve-seat API endpoint (v1). The service validates the request, locates the seat in the database, and marks it as reserved. To keep the read model consistent, the reservation event is also processed by a MongoDB handler that updates the seat's status in the read database.
src/Services/Flight/src/Flight/Seats/Features/ReservingSeat · high confidence
Added centralized service defaults for health checks, observability, and resilience
The ServiceDefaults library now provides extension methods to configure common infrastructure concerns for Aspire services. By calling AddServiceDefaults, services automatically register custom health checks and observability collectors, enable service discovery, and apply a standard HTTP client resilience policy (including circuit breaking and retry logic). UseServiceDefaults applies these configurations to the application pipeline.
src/Aspire/src/ServiceDefaults · high confidence
Added initial data seeding for flights, airports, aircraft, and seats
The Flight service now includes a data seeder that populates the database with initial reference data for airports, aircraft, flights, and seats upon first run. This process writes the seed data to the primary Entity Framework Core database and synchronizes it to the MongoDB read model, ensuring the application starts with a consistent set of test or baseline records.
src/Services/Flight/src/Flight/Data/Seed · high confidence
Added seat domain and read models
Introduced the core domain model for seats, including the \Seat\ aggregate which tracks seat number, type, class, and flight association, and supports creation and reservation states via domain events. Additionally, a \SeatReadModel\ was added with required properties for Id, SeatId, SeatNumber, Type, Class, FlightId, and deletion status to support read-side queries.
src/Services/Flight/src/Flight/Seats/Models · high confidence
Added specific validation exceptions for the Passenger service
The Passenger service now includes dedicated exception classes to handle specific validation failures, allowing for more precise error handling. New exceptions include InvalidAgeException for null or negative ages, InvalidNameException for empty or whitespace names, InvalidPassportNumberException for empty or whitespace passport numbers, PassengerAlreadyExist (implemented as class PassengerNotExist) for duplicate registration attempts, and PassengerNotFoundException for missing passenger records. All exceptions inherit from the Woo.Core.Exception base classes (BadRequestException or NotFoundException) to maintain consistency with the application's error handling architecture.
src/Services/Passenger/src/Passenger/Passengers/Exceptions · high confidence
Automated kubectl installation for Gitpod environments
A new setup script has been added to automatically download, make executable, and install the kubectl binary into the system PATH for Gitpod workspaces, ensuring the tool is available for cluster management without manual intervention.
scripts · high confidence
Flight service data layer initialized with PostgreSQL and MongoDB
The data access layer for the Flight service has been established, introducing a write model backed by PostgreSQL (via Npgsql) and a read model backed by MongoDB. This includes the creation of the FlightDbContext for managing flight, aircraft, airport, and seat entities, alongside a FlightReadDbContext for querying denormalized read models. A DesignTimeDbContextFactory is also provided to support EF Core tooling and migrations against a local PostgreSQL instance.
src/Services/Flight/src/Flight/Data · high confidence
Identity API initialized with minimal API structure and configuration
The Identity.Api service has been scaffolded using a minimal API pattern, featuring a streamlined Program.cs that registers infrastructure and endpoints via extension methods. Configuration is provided through standard appsettings files, including a docker-specific profile that defines connection strings for PostgreSQL, RabbitMQ, and Auth options. The service is also configured with comprehensive observability settings (OpenTelemetry, Zipkin, Jaeger, Prometheus) and includes assembly visibility attributes to support unit, integration, and end-to-end testing.
src/Services/Identity/src/Identity.Api · high confidence
Identity service infrastructure and identity server configuration
The identity service now initializes its core infrastructure through new extension methods. It configures ASP.NET Core Identity with Entity Framework Core stores and integrates IdentityServer4 for token management, including custom redirect behaviors for authentication and authorization failures. The service also sets up Wolverine for message handling, MediatR with validation and logging pipeline behaviors, and standard infrastructure features like problem details, API versioning, and OpenAPI support.
src/Services/Identity/src/Identity/Extensions · high confidence
Initial API Gateway setup with Yarp reverse proxy
The API Gateway service has been initialized with a new entry point that configures a Yarp reverse proxy to route requests to four backend services: identity, flight, passenger, and booking. The gateway strips the respective path prefixes (e.g., /identity, /flight) before forwarding traffic to the corresponding clusters, which are configured with local development endpoints in the default settings and Docker-specific endpoints in the Docker configuration.
src/ApiGateway/src · high confidence
Initial Booking service scaffolding with event mapping and projections
The Booking service has been initialized with core infrastructure components, including an event mapper that translates domain events (such as BookingCreated) into integration events, and a projection processor that updates the MongoDB read model based on those events. Configuration for gRPC endpoints (FlightAddress, PassengerAddress) and assembly visibility settings for test projects have also been added.
src/Services/Booking/src/Booking · high confidence
Initial Identity Server configuration and resource owner password validation
The Identity service now includes explicit configuration for Duende Identity Server, defining identity resources (OpenID, Profile, Email), API scopes and resources (Flight, Passenger, Booking, Identity, and Role), and a default client configured for the Resource Owner Password Credentials grant type with a 1-hour token lifetime. Additionally, a custom UserValidator implements IResourceOwnerPasswordValidator to handle username/password authentication against the ASP.NET Core Identity store, issuing JWT claims upon successful login.
src/Services/Identity/src/Identity/Configurations · high confidence
Initial booking feature with event-sourced aggregate and read model
The Booking service now exposes a new API endpoint to create flight reservations. This change introduces the core domain logic, including an event-sourced Booking aggregate, value objects for Trip and PassengerInfo with strict validation, and a MongoDB-based read model for querying. The feature is wired up via a MediatR command handler that validates inputs, checks flight availability via gRPC, and persists the booking state.
src/Services/Booking/src/Booking/Booking · high confidence
Initial identity data seeding for default roles and users
The Identity service now automatically seeds default administrative and standard user accounts upon startup. This includes creating 'Admin' and 'User' roles, and provisioning two initial user accounts ('samh' and 'samh2') with predefined credentials and roles, ensuring the system is ready for immediate use without manual database population.
src/Services/Identity/src/Identity/Data/Seed · high confidence
Initial infrastructure setup for Passenger service
The Passenger service now includes its foundational infrastructure configuration. This adds support for Entity Framework Core and MongoDB for data persistence, integrates JWT authentication, and configures gRPC services. The service utilizes Wolverine for message handling via RabbitMQ and implements MediatR with validation, logging, and transaction pipeline behaviors. Additionally, it enables OpenTelemetry for observability, ASP.NET Core OpenAPI for API documentation in development, and standard problem details for error responses.
src/Services/Passenger/src/Passenger/Extensions · high confidence
Initial project scaffolding with .NET 10 and microservices architecture
The repository is initialized with a complete microservices solution targeting .NET 10, featuring services for Identity, Flight, Booking, and Passenger, along with an API Gateway and Aspire orchestration. The build system is configured via Directory.Build.props to enforce code analysis and include core dependencies like EF Core 10, Wolverine for messaging, and IdentityServer. Development tooling includes a .dockerignore file to optimize builds, an .editorconfig for consistent C\# formatting, and a CONTRIBUTION.md outlining the use of Conventional Commits and semantic-release.
(repo-wide) · high confidence
Initial release of the Passenger API service
The Passenger API service is introduced as a new minimal API application. It configures a PostgreSQL database for write operations and MongoDB for read/storage, integrates with RabbitMQ for messaging, and connects to an Identity Server for JWT authentication. The service includes built-in observability via OpenTelemetry (supporting OTLP, Zipkin, Jaeger, and Prometheus) and exposes health check endpoints.
src/Services/Passenger/src/Passenger.Api · high confidence
Initial seat management feature with read models and mappings
This change introduces the core seat management capability within the Flight service, establishing the data transfer object (SeatDto) and the feature folder structure for seat creation and reservation. It implements Mapster mappings to convert domain entities (Seat) and command objects (CreateSeat, ReserveSeat) into read models and DTOs, enabling the system to handle seat creation and reservation requests while populating the necessary read models for querying.
src/Services/Flight/src/Flight/Seats/Features · high confidence
Introduce .NET Aspire AppHost for local development orchestration
Added a new .NET Aspire AppHost project that orchestrates local development infrastructure using Docker Compose. This host provisions and configures essential services including PostgreSQL (with logical replication enabled), MongoDB, Redis, EventStore, RabbitMQ, and observability tools (Jaeger, Zipkin, OpenTelemetry Collector, Prometheus). It also sets up the Aspire Dashboard to collect telemetry via OTLP endpoints, providing a unified view of the application's health and performance during development.
src/Aspire/src/AppHost · high confidence
Introduce Airport domain and read models
Added the core Airport aggregate model and its corresponding read model to the Flight service. The Airport aggregate defines the entity's identity, name, address, and code, and includes a factory method to create new airports while emitting a domain event. The AirportReadModel provides a simplified structure for querying airport data, including fields for ID, name, address, code, and deletion status.
src/Services/Flight/src/Flight/Airports/Models · high confidence
Introduce CQRS-based flight creation with dual persistence
The flight creation capability now uses a Command Query Responsibility Segregation (CQRS) pattern. A new \CreateFlight\ command handler persists flight data to a relational database (via \FlightDbContext\), while a separate \CreateFlightMongo\ handler writes the same data to a MongoDB read model (via \FlightReadDbContext\). This change introduces a new API endpoint (\POST /flight\) that accepts a \CreateFlightRequestDto\, validates inputs (ensuring price and duration are positive, status is valid, and IDs are present), and returns a \CreateFlightResponseDto\ with the generated flight ID upon success.
src/Services/Flight/src/Flight/Flights/Features/CreatingFlight · high confidence
Introduce Flight domain and read models with value objects
The Flight service now includes core domain and read models for flights, utilizing specific value objects for identifiers (FlightId, AircraftId, AirportId), dates (DepartureDate, ArriveDate, FlightDate), and attributes (FlightNumber, DurationMinutes, Price). The Flight aggregate record supports creating, updating, and soft-deleting flights, automatically emitting corresponding domain events (FlightCreated, FlightUpdated, FlightDeleted) to track state changes. A separate FlightReadModel class is provided with required properties for efficient data retrieval.
src/Services/Flight/src/Flight/Flights/Models · high confidence
Introduce Passenger domain and read models
The Passenger service now includes core domain and read models for managing passenger data. The \Passenger\ aggregate root defines the business logic for creating a passenger and completing their registration, utilizing value objects for identity and personal details while emitting domain events. A corresponding \PassengerReadModel\ is provided with required properties for efficient querying, including ID, passport number, name, type, age, and deletion status.
src/Services/Passenger/src/Passenger/Passengers/Models · high confidence
Introduce versioned vertical-slice implementations for creating airports and seats
The Flight service now exposes new V1 endpoints for creating airports and seats, structured within a vertical slice architecture. Users can create an airport via a POST to /flight/airport (requiring Name, Address, and Code) and a seat via a POST to /flight/seat (requiring SeatNumber, Type, Class, and FlightId). Both operations enforce authorization via an ApiScope, validate inputs using FluentValidation, and return a generated unique identifier upon success. The implementation includes dedicated command handlers for the write model (using Entity Framework Core) and separate handlers for the read model (using MongoDB), ensuring that new entries are persisted to both data stores while preventing duplicates based on unique codes or IDs.
src/Services/Flight/src/Flight/Airports/Features/CreatingAirport, src/Services/Flight/src/Flight/Seats/Features/CreatingSeat · high confidence
Introduction of Aircraft Value Objects with Factory Methods
New value objects for Aircraft (ManufacturingYear, Model, Name) have been added to the Flight service. These objects enforce validation rules—such as minimum year thresholds and non-empty strings—through static factory methods (Of) rather than constructors, ensuring that invalid states cannot be created. Each value object exposes its underlying value via a read-only property and supports implicit conversion to its primitive type (int or string) for convenient usage.
src/Services/Flight/src/Flight/Aircrafts/ValueObjects · high confidence
Introduction of Aircraft domain and read models
The Flight service now includes the core data structures for managing aircraft information. This change introduces the \Aircraft\ domain aggregate, which enforces business rules through value objects for name, model, and manufacturing year, and handles domain events upon creation. Additionally, an \AircraftReadModel\ is provided to support efficient querying and read-side operations, exposing the aircraft's ID, name, model, manufacturing year, and deletion status.
src/Services/Flight/src/Flight/Aircrafts/Models · high confidence
Introduction of DTOs for Aircraft and Airport entities
New Data Transfer Objects (DTOs) have been added to support the vertical slice architecture. Specifically, \AircraftDto\ is introduced in the Aircrafts module to expose aircraft identification, name, model, and manufacturing year, while \AirportDto\ is added in the Airports module to expose airport identification, name, address, and code. These records serve as the structured data contracts for these specific domains.
src/Services/Flight/src/Flight/Aircrafts/Dtos, src/Services/Flight/src/Flight/Airports/Dtos · high confidence
Introduction of SeatNumber value object with factory-based validation
A new SeatNumber value object has been added to the Flight service to enforce strict validation of seat identifiers. Instead of allowing raw strings, users must now create instances via the static Of factory method, which throws an InvalidSeatNumberException if the input is null or whitespace. The value object supports implicit conversion to string, allowing it to be used seamlessly in contexts expecting a string while maintaining type safety and validation rules at the point of creation.
src/Services/Flight/src/Flight/Seats/ValueObjects · high confidence
Introduction of standardized API scope constants
A new Constants class has been added to the Identity service, defining a set of standard OAuth2/OIDC scope strings for internal API access. These constants include 'roles', 'flight-api', 'passenger-api', 'booking-api', and 'identity-api', providing a single source of truth for scope names used across the identity infrastructure.
src/Services/Identity/src/Identity/Identity/Constants · high confidence
Introduction of strongly-typed flight value objects
New value objects have been added to the Flight service to enforce domain invariants for flight data. Specifically, ArriveDate, DepartureDate, FlightDate, FlightId, FlightNumber, DurationMinutes, and Price now encapsulate their underlying types (DateTime, Guid, string, decimal) and validate inputs via static factory methods (e.g., throwing exceptions for invalid dates, empty IDs, or negative prices). This ensures that invalid flight states cannot be created within the domain model.
src/Services/Flight/src/Flight/Flights/ValueObjects · high confidence
Introduction of typed value objects for passenger attributes
New value objects (Age, Name, PassportNumber) have been added to the Passenger service to enforce strong typing for core passenger attributes. These objects encapsulate validation logic—such as ensuring age is positive and names/passport numbers are not empty—within static factory methods, replacing direct usage of primitive types and ensuring data integrity at the domain level.
src/Services/Passenger/src/Passenger/Passengers/ValueObjects · high confidence
New gRPC service contracts for flight and passenger operations
The Booking service now exposes new gRPC interfaces for managing flights and passengers. Users can retrieve flight details, check available seats, and reserve seats via the FlightGrpcService, while passenger information can be fetched via the PassengerGrpcService. These contracts define the data structures and RPC methods used for these interactions.
src/Services/Booking/src/Booking/GrpcClient · high confidence
New user registration endpoint with distributed event publishing
A new API endpoint has been added at /identity/register-user (POST) that allows users to register by providing their first name, last name, username, email, password, and passport number. The service validates the input, creates the user account with the 'User' role, and publishes a 'UserCreated' event to the distributed event bus upon successful registration, returning the new user's ID and details.
src/Services/Identity/src/Identity/Identity/Features/RegisteringNewUser · high confidence
Behavioural changes
Add passenger entity configuration with value object mapping and concurrency control
The passenger data model is now explicitly configured in Entity Framework Core, mapping the Passenger entity to its table and defining primary key behavior. Value objects for Name, PassportNumber, and Age are persisted as owned types with specific column names and length constraints. The configuration also enforces optimistic concurrency using a Version token and stores the PassengerType enum as a string with a default value of Unknown.
src/Services/Passenger/src/Passenger/Data/Configurations · high confidence
Add specific domain and application exceptions for passenger validation
The Passenger service now includes dedicated exception classes to provide clearer error messaging for specific validation failures. New domain exceptions cover invalid age, name, passport number, and passenger ID scenarios, while application-level exceptions handle cases where a passenger is not found or already exists, returning appropriate HTTP 404 status codes.
src/Services/Passenger/src/Passenger/Exceptions · high confidence
Added airport mapping configuration for command-to-read-model conversion
A new mapping configuration file has been introduced to define how airport-related commands and DTOs are converted into read models. Specifically, it maps the CreateAirportMongo command and Airport entity to the AirportReadModel, utilizing NewId.NextGuid() for ID generation, and maps the CreateAirportRequestDto to the CreateAirport command using Mapster conventions.
src/Services/Flight/src/Flight/Airports/Features · high confidence
Added domain exceptions for aircraft validation
The Flight service now includes specific exception classes for aircraft-related validation errors. Users will see distinct error responses for invalid aircraft IDs, duplicate aircraft entries, and invalid model, name, or manufacturing year values, improving clarity when aircraft data validation fails.
src/Services/Flight/src/Flight/Aircrafts/Exceptions · high confidence
Aircraft and Passenger ID validation moved to factory methods
The validation logic for AircraftId and PassengerId has been refactored from the constructors to static factory methods (Of). This change ensures that invalid IDs (such as empty GUIDs) are caught and throw specific exceptions at the point of creation, rather than relying on constructor initialization, providing a more explicit and controlled way to instantiate these value objects.
Aircrafts, Passengers · high confidence
Aircraft creation mapping uses NewId for read model generation
The AircraftMappings configuration now explicitly maps incoming aircraft creation requests to the AircraftReadModel, utilizing the NewId library to generate unique identifiers for the read model instances. This ensures that when a new aircraft is created, the corresponding read model is populated with a distinct ID generated via NewId.NextGuid(), aligning the data transfer with the distributed ID generation strategy.
src/Services/Flight/src/Flight/Aircrafts/Features · high confidence
Airport value objects now enforce validation via static factory methods
The Address, Code, and Name value objects in the Airport module have been refactored to use static factory methods (Of) for creation instead of public constructors. This change centralizes validation logic, ensuring that invalid or empty values throw specific exceptions (InvalidAddressException, InvalidCodeException, InvalidNameException) at the point of creation, while maintaining implicit conversion to strings for ease of use.
src/Services/Flight/src/Flight/Airports/ValueObjects · high confidence
Booking API adopts minimal API architecture with OpenTelemetry observability
The Booking service has been refactored to use the minimal API pattern, replacing the previous startup structure with a concise Program.cs entry point that registers minimal endpoints and infrastructure. This change introduces comprehensive observability support via OpenTelemetry, allowing users to export traces and metrics to OTLP, Zipkin, Jaeger, and Aspire Dashboard endpoints. Configuration is now split across environment-specific files (development, docker, test) to manage connections for EventStore, MongoDB, RabbitMQ, and gRPC services (Flight, Passenger) securely and appropriately for each environment.
src/Services/Booking/src/Booking.Api · high confidence
Centralized infrastructure setup with Wolverine and MediatR pipeline behaviors
The Flight service now initializes its core infrastructure through dedicated extension methods in the Extensions/Infrastructure folder. The new InfrastructureExtensions.cs registers shared services (such as current user provider, event mapping, and data seeding), configures the database contexts (EF Core and MongoDB), sets up JWT authentication, and integrates Wolverine for message handling via RabbitMQ. Additionally, a new MediatRExtensions.cs file centralizes the registration of MediatR along with a standardized set of pipeline behaviors for validation, logging, database transactions, and caching, ensuring consistent request processing across the service.
src/Services/Flight/src/Flight/Extensions · high confidence
Centralized mapping configuration for flight features
The flight feature handlers now use a centralized Mapster configuration class to define how domain models, DTOs, and read models are converted. This change standardizes the mapping logic for creating, updating, and deleting flights, ensuring consistent data transformation across the vertical slice architecture.
src/Services/Flight/src/Flight/Flights/Features · high confidence
Centralized mapping configuration for user registration
The identity service now uses a centralized mapping class to handle conversions between Data Transfer Objects and internal domain models. Specifically, a new mapping is defined to convert the RegisterNewUserRequestDto into the RegisterNewUser command, ensuring consistent data transformation during the user registration process.
src/Services/Identity/src/Identity/Identity/Features · high confidence
Centralized passenger data mapping configuration
The passenger feature now uses a centralized Mapster configuration class to handle object mapping. This change consolidates the mapping logic for converting between the registration command, read models, and DTOs, ensuring consistent data transformation when processing passenger registration and retrieval operations.
src/Services/Passenger/src/Passenger/Passengers/Features · high confidence
Enforce commit message and code formatting via Husky
Husky is now configured to automatically enforce development standards before changes are committed. The pre-commit hook runs formatting scripts to ensure code consistency, while the commit-msg hook validates that commit messages adhere to the defined conventional commit style.
.husky · high confidence
Flight API adopts minimal API architecture with Postgres and OpenTelemetry
The Flight service entry point has been refactored to use the minimal API pattern, replacing the previous startup configuration with a concise Program.cs that registers minimal endpoints and infrastructure. This change introduces support for PostgreSQL as the primary write database (configured via PostgresOptions) and integrates comprehensive observability via OpenTelemetry, including exporters for OTLP, Zipkin, Jaeger, and Prometheus. The service also configures JWT authentication against an Identity Server and connects to RabbitMQ for messaging, with specific settings provided for development, Docker, and test environments.
src/Services/Flight/src/Flight.Api · high confidence
Flight and Passenger services migrate gRPC implementation from MagicOnion to gRPC-AspNetCore
The gRPC server implementations for the Flight and Passenger services have been rewritten to use the standard gRPC-AspNetCore framework instead of the previous MagicOnion library. This change introduces new Protocol Buffer definitions (flight.proto and passenger.proto) and corresponding service classes that leverage MediatR for command/query handling and Mapster for object mapping, aligning the transport layer with standard .NET gRPC practices.
src/Services/Flight/src/Flight/GrpcServer, src/Services/Passenger/src/Passenger/GrpcServer · high confidence
Flight service database schema migrated to PostgreSQL
The Flight service's initial database migration has been updated to target PostgreSQL instead of SQL Server. This change introduces new migration files (initial.Designer.cs, initial.cs, and FlightDbContextModelSnapshot.cs) that define the schema for Aircraft, Airport, Flight, and Seat entities using PostgreSQL-specific types (e.g., uuid, timestamp with time zone, text) and conventions (e.g., snake\_case column names, identity columns). Users deploying this service will now require a PostgreSQL database instance, and existing SQL Server-based deployments will need to migrate their data or re-initialize the schema.
src/Services/Flight/src/Flight/Data/Migrations · high confidence
Identity models now enforce optimistic concurrency and required properties
The identity domain models (User, Role, and their associated claims, logins, roles, and tokens) have been updated to implement the IVersion interface, adding a long Version property to each class to enable optimistic concurrency control. Additionally, the User model now uses the required keyword for FirstName, LastName, and PassPortNumber, ensuring these fields are mandatory during object initialization.
src/Services/Identity/src/Identity/Identity/Models · high confidence
Identity service database layer migrated to PostgreSQL with optimistic concurrency
The Identity service's data access layer has been restructured to use PostgreSQL instead of SQL Server, as evidenced by the new \DesignTimeDbContextFactory\ configuring \UseNpgsql\ and the \IdentityContext\ applying snake\_case naming conventions. This change introduces optimistic concurrency control via an \IVersion\ interface that automatically increments a version field on modified or deleted entities, and adds resilience features including retry execution strategies for transient failures and distributed transaction support.
src/Services/Identity/src/Identity/Data · high confidence
Identity service database schema migrated to PostgreSQL with optimistic concurrency
The Identity service's initial database migration has been updated to target PostgreSQL (using Npgsql) instead of SQL Server, introducing specific column types such as 'uuid' and 'timestamp with time zone'. Additionally, optimistic concurrency control is now enforced on the core identity entities (Users, Roles, and RoleClaims) via 'ConcurrencyStamp' and 'Version' columns, ensuring that concurrent updates to these records are detected and prevented.
src/Services/Identity/src/Identity/Data/Migrations · high confidence
Initial database schema for Passenger service using PostgreSQL
The Passenger service now uses PostgreSQL as its write database, replacing the previous SQL Server implementation. This change introduces the initial EF Core migration (20230611213031\_initial) which defines the 'passenger' table. The schema includes columns for passenger identity (UUID), type, and soft-delete status, along with embedded value objects for Name, Age, and PassportNumber stored within the same table. It also tracks concurrency via a 'version' column and audit fields (created/modified timestamps and user IDs).
src/Services/Passenger/src/Passenger/Data/Migrations · high confidence
Introduce CQRS-based aircraft creation with read-model synchronization
The aircraft creation flow now uses a vertical slice architecture with separate command and read-model handlers. The primary handler (CreateAircraft) validates input, checks for duplicates in the write store, and persists the aircraft entity. A new internal command (CreateAircraftMongo) synchronizes the read model by inserting the aircraft into the MongoDB read database, ensuring the read side is updated immediately after creation.
src/Services/Flight/src/Flight/Aircrafts/Features/CreatingAircraft · high confidence
Introduce EF Core configurations for domain entities with value objects and concurrency control
The Flight service now defines explicit Entity Framework Core mapping configurations for its core domain entities: Aircraft, Airport, Flight, and Seat. These configurations map value objects (such as Name, Model, Address, FlightNumber, Price, and Dates) to specific database columns and enforce length constraints. Additionally, the mappings establish the relational structure between entities (e.g., Flight linking to Aircraft and Airports, Seat linking to Flight) and enable optimistic concurrency control via a Version token on each entity.
src/Services/Flight/src/Flight/Data/Configurations · high confidence
Introduce structured CQRS handlers and read-model synchronization for flight deletion
The flight deletion feature now uses a dedicated vertical-slice structure with explicit result models and domain events. The write-side handler performs a soft delete on the flight entity and emits a FlightDeletedDomainEvent, while a new MongoDB read-model handler consumes that event to mark the corresponding read-model record as deleted, ensuring the available-flights query reflects the change.
src/Services/Flight/src/Flight/Flights/Features/DeletingFlight · high confidence
Introduce vertical slice architecture for passenger registration and retrieval
The passenger service now organizes features using a vertical slice architecture, introducing dedicated command and query handlers for completing passenger registration and retrieving passenger details. The registration flow now includes a specific endpoint to finalize passenger data (passport, type, age) and updates the read model via a MongoDB handler, while a new query endpoint allows fetching passenger details by ID from the read store. This change restructures the codebase to separate concerns within the feature folders, improving maintainability and clarity for these specific passenger operations.
src/Services/Passenger/src/Passenger/Passengers/Features/CompletingRegisterPassenger · high confidence
Introduces CQRS data access with PostgreSQL and MongoDB
The Passenger service now implements a CQRS data layer, separating write and read operations. The write side uses a new PassengerDbContext backed by PostgreSQL (Npgsql) with snake\_case naming conventions, replacing the previous SQL Server setup. The read side introduces a PassengerReadDbContext that queries a MongoDB collection for passenger read models. A DesignTimeDbContextFactory is also added to support EF Core tooling against the PostgreSQL instance.
src/Services/Passenger/src/Passenger/Data · high confidence
Introduces gRPC resilience and standardized infrastructure wiring for the Booking service
The Booking service now registers gRPC clients for Flight and Passenger services with built-in resilience policies, including retry (3 attempts), circuit breaking, and timeout handling via the .NET HttpResilience library. Additionally, the service's infrastructure layer has been consolidated into new extension methods that wire up core dependencies such as MediatR with validation and logging pipeline behaviors, EventStoreDB subscriptions, Wolverine message handling, and standard ASP.NET Core features like Problem Details and JWT authentication.
src/Services/Booking/src/Booking/Extensions · high confidence
Introduction of domain-specific enumerations for flights, seats, and passengers
New strongly-typed enumerations have been added to define core domain concepts within the Flight and Passenger services. The Flight service now includes FlightStatus (Unknown, Flying, Delay, Canceled, Completed), SeatClass (Unknown, FirstClass, Business, Economy), and SeatType (Unknown, Window, Middle, Aisle). The Passenger service introduces PassengerType (Unknown, Male, Female, Baby). These changes replace implicit or untyped representations with explicit, validated values for status, seating, and passenger categories.
src/Services/Flight/src/Flight/Flights/Enums, src/Services/Flight/src/Flight/Seats/Enums, src/Services/Passenger/src/Passenger/Passengers/Enums · high confidence
Introduction of strongly-typed ID value objects for Airports, Flights, and Seats
The Flight service now uses dedicated value objects (AirportId, FlightId, SeatId) to represent identifiers instead of raw Guids. These new types enforce validation by throwing specific exceptions (InvalidAirportIdException, InvalidFlightIdException, InvalidSeatIdException) when an empty Guid is passed, and support implicit conversion to Guid for compatibility. This change improves type safety and ensures that invalid identifiers are caught early in the domain logic.
Airports, Flights, Seats · high confidence
Optimistic concurrency control added to Identity entities
The Identity service now enforces optimistic concurrency for User, Role, and their associated claim, login, role, and token entities. This is achieved by configuring the Version property as a concurrency token in the Entity Framework Core model configurations, ensuring that concurrent updates to these records are detected and prevented from silently overwriting each other.
src/Services/Identity/src/Identity/Data/Configurations · high confidence
Restructure flight and seat retrieval endpoints into vertical slice architecture
The Get Flight By Id and Get Available Seats endpoints have been refactored to follow a vertical slice architecture. Each feature now encapsulates its own request record, result model, validator, handler, and minimal API endpoint definition within dedicated V1 folders. This change improves code organization and maintainability by co-locating all logic required for these specific queries, while preserving the existing authorization requirements and API versioning (v1.0).
src/Services/Flight/src/Flight/Flights/Features/GettingFlightById, src/Services/Flight/src/Flight/Seats/Features/GettingAvailableSeats · high confidence
Test coverage
Added PactNet contract tests for Booking, Flight, Identity, and Passenger services; Added end-to-end test infrastructure for the Flight service; Added end-to-end tests for flight creation and retrieval; Added integration test base and configuration for Booking service; Added integration test for aircraft creation; Added integration test for creating an airport; Added integration test for user registration; Added integration test infrastructure for the Identity service; Added integration tests for Flight service features; Added integration tests for seat availability and reservation; Added integration tests for the CreateBooking feature; Added integration tests for the Passenger service; Added k6 performance test scripts for Booking, Flight, Identity, and Passenger services; Added test fakes and API route constants for flight end-to-end tests; Added test fakes for Flight domain command validation; Added test fakes for Flight service commands; Added test fakes for booking integration tests; Added test fakes for passenger registration completion; Added test fakes for user registration; Added test infrastructure for the Flight service; Added test solution files for Booking, Flight, Identity, and Passenger services; Added unit tests for Flight DTO mapping; Added unit tests for airport and seat creation features; Added unit tests for flight creation and update domain logic; Added unit tests for the Create Aircraft feature.
Dependencies
Add BuildingBlocks submodule
The src directory now includes a new git submodule named BuildingBlocks, pointing to commit 1c0c924. This integrates the BuildingBlocks codebase as a distinct dependency within the project structure.
src · high confidence
Upgrade to .NET 10 and Aspire 13.1
The project has been upgraded to target .NET 10.0 across all service and test projects, including the Aspire AppHost and Service Defaults. The Aspire hosting packages have been updated to version 13.1.1, enabling modern cloud-native development features. Additionally, the solution now includes a Node.js \package.json\ with \husky\ and \@commitlint\ for pre-commit code quality checks, and various service-specific dependencies like gRPC and Entity Framework Core have been aligned with the new framework version.
(dependencies) · high confidence
Housekeeping
Updated architecture diagrams and branding assets
The project's visual documentation and branding have been refreshed. This includes updates to the diagrams illustrating the vertical slice architecture and the booking microservices structure, as well as changes to the main logo and booking-related images. These changes ensure that the visual representations of the system's architecture and identity remain current.
assets · high confidence · unverified
Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
How this codebase got here
Score
- CAI 62 → 62 (-0.5)
- Rubric changed (rubric-2026.10.5 → rubric-2026.11.2) — scores are not directly comparable.
Lenses
- Code Health 56 → 56 (-0.0)
- Architecture 91 → 91 (-0.1)
- Maturity 71 → 73 (+2.0)
- Readiness 65 → 65 (+0.0)
- Security 60 → 58 (-2.5)
- Performance 100 → 100 (+0.0)
Resolved (12)
- Coverage not measured — no coverage collector is wired up
- Projects may be oversized for their cohesion
- Typo in exception name: 'FlightNotFountException' contains a typo ('Fount' instead of 'Found'). While 'FlightAlreadyExistException' also uses the singular 'Exist' instead of 'Exists', the primary inconsistency is the clear typo in the former which breaks the expected vocabulary for 'not found'.
- XML-doc coverage: Booking (src/Services/Booking/src/Booking/Booking.csproj)
- XML-doc coverage: Booking.Api (src/Services/Booking/src/Booking.Api/Booking.Api.csproj)
- XML-doc coverage: Flight (src/Services/Flight/src/Flight/Flight.csproj)
- XML-doc coverage: Flight.Api (src/Services/Flight/src/Flight.Api/Flight.Api.csproj)
- XML-doc coverage: Identity (src/Services/Identity/src/Identity/Identity.csproj)
- XML-doc coverage: Identity.Api (src/Services/Identity/src/Identity.Api/Identity.Api.csproj)
- XML-doc coverage: Passenger (src/Services/Passenger/src/Passenger/Passenger.csproj)
- XML-doc coverage: Passenger.Api (src/Services/Passenger/src/Passenger.Api/Passenger.Api.csproj)
- XML-doc coverage: ServiceDefaults (src/Aspire/src/ServiceDefaults/ServiceDefaults.csproj)
New (2)
- Projects may be oversized for their cohesion (src/Services/Flight/src/Flight/Flight.csproj)
- top-level statements (cyclomatic 16) (src/Aspire/src/AppHost/Program.cs)
API surface
- Unchanged — 1 HTTP endpoints
Architecture
- Unchanged — 8 containers · 5 contexts · 3 edges
Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
Survey your own repository
meysamhadeli/booking-microservices was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.
About this page
- The score is its most recent published measurement, taken on 8 November 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
- Measured at commit 1182f4defd8c36704600c65a380b161e70bb018e — the exact code this score is about.
- Scored under rubric-2026.11.2 — the same rubric and the same method as every other entry in this index.
- Measured by Canine Code Analyzer (cca.canine.dev) using cca measure-2026.11.3+preprod-45ab2cab63de.