Legacy .NET Framework monolith โ Azure microservices modernization
Travel Booking is the architectural blueprint and reference implementation for migrating a monolithic .NET Framework application (~40,000 users, ~600-table database) to a cloud-native, event-driven microservices architecture on Azure using .NET 9.
Status: Pre-Phase 1 โ Phase 1 runs May 2026 to January 2027. Service scaffolding, shared libraries, and architecture design documents are complete; awaiting Phase 1 kickoff.
The modernization follows the Strangler Fig pattern with Azure API Management (APIM) as the facade, progressively routing traffic from the legacy monolith to five bounded-context microservices.
graph TB
Client["๐ React 18 SPA"]
APIM["๐ Azure APIM<br/>(Gateway)"]
Travel["โ๏ธ Travel Booking"]
Event["๐
Event Management"]
Payment["๐ณ Payment"]
Reporting["๐ Reporting"]
Notification["๐ Notification"]
Bus["๐ฎ Azure Service Bus<br/>(Topics & Queues)"]
Client -->|All requests| APIM
APIM -->|Route & Feature Flags| Travel
APIM -->|Route & Feature Flags| Event
APIM -->|Route & Feature Flags| Payment
APIM -->|Route & Feature Flags| Reporting
APIM -->|Route & Feature Flags| Notification
Travel -->|Domain Events| Bus
Event -->|Domain Events| Bus
Payment -->|Domain Events| Bus
Reporting -->|Subscribe Events| Bus
Notification -->|Subscribe Events| Bus
Travel -.->|Command Query| Bus
Event -.->|Command Query| Bus
Payment -.->|Command Query| Bus
| Pattern | Implementation |
|---|---|
| Strangler Fig | APIM routes traffic to new services or legacy, with feature-flag-controlled progressive rollout |
| Transactional Outbox | Domain state + outbox message written in a single SQL transaction; MassTransit publishes to Service Bus |
| Saga Orchestration | MassTransit State Machine in Travel Booking for multi-step booking workflows with compensation |
| CQRS | Write services (Travel, Event, Payment) separated from read-optimized Reporting Service |
| Anti-Corruption Layer | Payment Service wraps the legacy payment system in Phase 1 |
| Event-Driven Messaging | Service Bus Topics for pub/sub, Queues for point-to-point commands |
| Service | Responsibility | Key Patterns |
|---|---|---|
| Travel Booking | Search, itinerary management, booking lifecycle | Saga orchestrator, transactional outbox |
| Event Management | Event CRUD, scheduling, attendee registration | Domain events, pub/sub |
| Payment | Payment processing, refunds, reconciliation | Anti-corruption layer (legacy wrapper in Phase 1) |
| Reporting | Dashboards, analytics, data exports | Read-only materialized views from domain events |
| Notification | Email, SMS, push notifications | Event subscriber, template-based delivery |
Each service follows Clean Architecture: API โ Application โ Domain โ Infrastructure, with its own Azure SQL database.
| Component | Technology |
|---|---|
| Runtime | .NET 9 / ASP.NET Core 9 |
| ORM | Entity Framework Core 9 |
| Messaging | MassTransit 8.3 + Azure Service Bus |
| CQRS/Mediator | MediatR 12.4 |
| Resilience | Polly 8.5 (circuit breakers, retries) |
| Validation | FluentValidation 11.11 |
| Mapping | Mapster 7.4 |
| Logging | Serilog 9.0 โ Application Insights |
| Auth | JWT Bearer + API Key |
| API Docs | Swashbuckle/Swagger 7.3 |
| Testing | xUnit 2.9 ยท Moq 4.20 ยท FluentAssertions 7.2 ยท Coverlet 6.0 |
| Component | Technology |
|---|---|
| Framework | React 18.3 + TypeScript 5.7 |
| Build | Vite 6.0 |
| Routing | TanStack Router 1.92 |
| Server State | TanStack Query 5.62 |
| Client State | Zustand 5.0 |
| Forms | React Hook Form 7.54 + Zod 3.24 |
| Styling | TailwindCSS 4.0 + Radix UI |
| Real-time | SignalR 8.0 |
| Charts | Tremor 3.18 |
| i18n | i18next 24.2 |
| Testing | Vitest 3.0 ยท Testing Library 16.1 ยท Playwright 1.49 |
Azure App Service ยท Azure SQL Database ยท Azure Service Bus ยท Azure API Management ยท Azure Front Door (CDN + WAF) ยท Application Insights ยท Azure Key Vault ยท Azure DevOps CI/CD
TravelBooking/
โโโ src/
โ โโโ Common/ # Shared NuGet libraries
โ โ โโโ TravelBooking.Common.Events/ # Base IntegrationEvent, event contracts
โ โ โโโ TravelBooking.Common.Logging/ # Serilog config, correlation ID middleware
โ โ โโโ TravelBooking.Common.HealthChecks/ # SQL + Service Bus health check extensions
โ โ โโโ TravelBooking.Common.Security/ # JWT Bearer + API Key auth handlers
โ โ
โ โโโ Services/ # Microservices (Clean Architecture per service)
โ โ โโโ TravelBooking/
โ โ โ โโโ TravelBooking.API/ # REST endpoints, middleware
โ โ โ โโโ TravelBooking.Application/ # MediatR handlers, DTOs, validators
โ โ โ โโโ TravelBooking.Domain/ # Entities, value objects, domain events
โ โ โ โโโ TravelBooking.Infrastructure/ # EF Core, repositories, outbox
โ โ โ โโโ TravelBooking.Tests/ # Unit + integration tests
โ โ โโโ EventManagement/ # (same 5-project structure)
โ โ โโโ Payment/ # (same 5-project structure)
โ โ โโโ Reporting/ # (same 5-project structure)
โ โ โโโ Notification/ # (same 5-project structure)
โ โ
โ โโโ Frontend/ # React 18 SPA
โ โโโ src/
โ โ โโโ app/ # Layout, router setup
โ โ โโโ features/ # Feature-sliced modules (bookings, events, etc.)
โ โ โโโ shared/ # Reusable components, hooks, utilities
โ โ โโโ mocks/ # MSW mock server for testing
โ โโโ e2e/ # Playwright E2E tests
โ
โโโ Directory.Build.props # Shared .NET build settings
โโโ Directory.Packages.props # Central NuGet version management
โโโ TravelBooking.slnx # Solution file
โ
โโโ Technical_Assessment_Solution_Final_Version5.md # Latest architecture design
โโโ Technical_Assessment_Solution_Final_Version4.md # Previous architecture revision
โโโ [Nhan.Nguyen]Technical_Assessment_Solution.md # Candidate's primary deliverable
โโโ TechSpec.md # Detailed technical specifications
โโโ PRD-Frontend-React18-SPA.md # Frontend PRD (51 user stories)
โโโ Diagrams.md # Mermaid diagram sources
โโโ plan-travelBookings.prompt.md # AI-assisted planning prompt
โโโ CLAUDE.md # AI agent configuration
- .NET SDK 9.0+
- Node.js 18+
- SQL Server 2019+ or Azure SQL Database
- Azure Service Bus namespace (or local emulator)
# Restore and build all services
dotnet restore TravelBooking.slnx
dotnet build TravelBooking.slnx
# Run tests
dotnet test TravelBooking.slnx
# Run a specific service
cd src/Services/TravelBooking/TravelBooking.API
dotnet runEach service requires configuration in appsettings.json:
| Key | Purpose |
|---|---|
ConnectionStrings:DefaultConnection |
Azure SQL connection string |
AzureServiceBus:ConnectionString |
Service Bus connection |
Authentication:Authority |
OAuth2/OIDC authority (Azure AD) |
Authentication:SigningKey |
JWT signing key |
ApplicationInsights:InstrumentationKey |
Telemetry key |
cd src/Frontend
npm install # Install dependencies
npm run dev # Dev server at http://localhost:5173
npm run build # TypeScript check + production build โ dist/
npm run test # Vitest (single run)
npm run test:watch # Vitest in watch mode
npm run test:coverage # Vitest with coverage
npm run test:e2e # Playwright E2E tests
npm run typecheck # TypeScript type checking (tsc --noEmit)
npm run lint # ESLint + Prettier check
npm run lint:fix # ESLint + Prettier auto-fix| Layer | Tool | Scope |
|---|---|---|
| Backend Unit | xUnit + Moq + FluentAssertions | Domain logic, handlers, validators |
| Backend Integration | WebApplicationFactory | API endpoints, EF Core + in-memory DB |
| Code Coverage | Coverlet | Target: โฅ80% on domain/application layers |
| Frontend Unit | Vitest + Testing Library | Components, hooks, utilities |
| Frontend E2E | Playwright | Full user journeys (booking, events, payments, dashboards, notifications) |
| API Mocking | MSW (Mock Service Worker) | Frontend tests against mocked backend |
- Structured Logging โ Serilog with JSON output to Azure Application Insights
- Correlation IDs โ Propagated across all services via
CorrelationIdMiddleware - Distributed Tracing โ W3C Trace Context (
traceparentheader) across HTTP and Service Bus - Health Checks โ
/healthendpoint per service (SQL connectivity, Service Bus reachability) - Metrics & Dashboards โ Azure Monitor for response time, error rate, throughput
- Alerting โ Dead-letter queue monitoring, circuit breaker state changes, health check failures
| Milestone | Period | Focus |
|---|---|---|
| MS1 โ Foundation | MayโJun 2026 | IaC, CI/CD, APIM facade, observability, shared libraries |
| MS2 โ Reporting | JulโAug 2026 | First service extraction (read-only, lowest risk) |
| MS3 โ Events + Notifications | AugโOct 2026 | Event-driven messaging backbone |
| MS4 โ Travel Booking | Nov 2026โJan 2027 | Saga orchestrator, core booking workflow |
| MS5 โ Payment + Stabilization | Dec 2026โJan 2027 | Payment isolation, end-to-end testing, hardening |
Team: 5 backend engineers + frontend and DevOps resources.
| Document | Description |
|---|---|
| Technical Assessment Solution (Latest) | Complete architecture design with diagrams and ADRs (v5) |
| Technical Assessment Solution (v4) | Previous architecture revision |
| Candidate Deliverable | Primary technical assessment submission (2026-03-21) |
| Technical Specification | Event payloads, error handling, retry strategies, API contracts |
| Frontend PRD | 51 user stories, acceptance criteria, UX specifications |
| Architecture Diagrams | Mermaid source for all architecture diagrams |
| Original Assessment Brief | Requirements, constraints, and evaluation criteria |
Not yet specified.