tc-api-gateway
YARP-based reverse proxy on .NET 10 that fronts Phenix APIs (currently only the Accommodation V2 API), applying CORS, cookie filtering and health checks at the edge.
Health score
0 to 100 across seven weighted factors; nothing is hidden. Green is 75 and above, amber 50 to 74, red below 50. How scoring works.
Facts
| Languages | csharp |
| Frameworks | ASP.NET Core 10, YARP 2.3 |
| Runtimes | .NET 10 |
| Tests / CI | good / CI in place |
| Last commit | 2026-06-24 |
| Owner | Owner unknown (mapping to be curated) |
| Domain | Platform services (system generated; curate in repo-owners.json to override) |
| Product area | Shared platform |
| Hosted | On-prem Deployed to our own machines
|
| Releases | 1 release pipeline(s): \commercial\tc-api-gateway |
| Integration | rest |
| Source | Open in Azure DevOps |
Dependencies in context
Entanglement
loose No binding mechanisms apply: this system needs no untangling work.
Depends on / used by
Migration playbooks
Generated from this repo's assessment data: what is feasible, what blocks it, and the steps in order. Ratings: green means actionable now, amber means sequence other work first, red means blocked, grey means not applicable.
ZDD adoption
No excuseNothing technical is holding this repo on the three-week release. It either already deploys without downtime (AWS) or is a modern, well-tested service the automated stealth path can carry today. Modern runtime, good tests, no hosted legacy transport: the automated stealth path can carry it today.
- Adopt the four-stage discipline from the ZDD engineering standard: pre-deployment compatibility, deployment, feature activation behind a flag, post-release cleanup.
- Make every change dual-version safe: backwards-compatible APIs (new major version for breaking wire changes), expand and contract for any schema change, and consumers tolerant of unknown fields.
- Wrap behaviour changes in feature flags so code deploys dark and release becomes a business decision, not a deployment event.
- Route deployments through the Workflow Engine's automated drain, deploy, health-check, return cycle (the path proven by the first automated production run in mid-2026).
- Verify with area-scoped regression rather than the whole-platform cycle, and watch error rates after rollout with automated rollback on alert.
SQL Server exit
Not applicableNo SQL Server dependency is recorded for this repo. Nothing to migrate.
Containerisation
Ready to containeriseModern runtime, no hosted legacy transport: this service can follow the estate's proven container path (Dockerfile, shared pipeline template, ECS via Terraform).
- Add a Dockerfile and make the app read all configuration from environment variables and the secrets manager, never from machine-local files.
- Log to stdout and expose a health check endpoint so ECS can supervise it.
- Adopt the shared ci.yml pipeline template with the container parameters (awsRegion, containerAfterBuild, ecsTerraformRepo), which is exactly how the estate's existing AWS services deploy.
- Define the service in the Terraform repo, deploy to a non-production environment, then shift traffic and disarm the deployment-group release pipeline.
Recommended actions
No specific actions for this repo. It either needs only normal maintenance, or its work is covered by an estate-level action. See the full programme.
Assessment notes
tc-api-gateway
Purpose
An API gateway built on Microsoft YARP, intended as the estate's edge proxy for Phenix APIs. Today it defines a single route (/AccommodationV2API/* to the Phenix accommodation API per environment), with a request transform that strips cookies not matching an allow-list of prefixes (.tcCookie, jwtCookie).
Tech stack
C# on .NET 10 (single TC.Api.Gateway web project in an .slnx solution with central package management). Yarp.ReverseProxy 2.3 with config-driven routes/clusters, OpenTelemetry (OTLP exporter plus AspNetCore/Http/Runtime/StackExchangeRedis instrumentation), Scalar/OpenAPI, TC.Diagnostics health checks and TravelCounsellors.ApiTools.Cors for TC-domain CORS. Analyzers (Sonar, SecurityCodeScan, NetAnalyzers) enabled repo-wide.
Deployment
Included as prod_application with 1 release. YAML build.yml uses the shared InternalOSS/azure-pipelines-templates CI template (SDK 10.x); build pipeline tc-api-gateway, release pipeline \commercial\tc-api-gateway. Per-environment appsettings for Development, QA, liveproviderqa, Training, Preproduction and Live; the Live config sets a New Relic app name, implying IIS/agent-based hosting.
Dependencies
Internal packages: TravelCounsellors.ApiTools.Cors (tc-api-tools) and TC.Diagnostics.HealthChecks.AspNetCoreExtensions (no matching estate repo). External: New Relic APM. Downstream it proxies to the Phenix accommodation API (phenix-accomm.travelcounsellors.com in Live).
Data stores
None. Redis OpenTelemetry instrumentation is referenced but no Redis connection is configured.
Integration points
Inbound and outbound REST only — it is a pass-through HTTP reverse proxy.
Code health
Good for its size: an xunit.v3 integration test project spins the gateway up via WebApplicationFactory against WireMock, covering proxying, header forwarding, CORS and error handling. YAML CI, central package management, analyzers, CLAUDE.md agent notes. README is untouched boilerplate. Actively developed (last commit 2026-06-24).
Modernisation risks
Low — this is one of the most modern repos in the estate (.NET 10, YARP, OpenTelemetry, tested). The main observation is adoption: only one route is configured, so the gateway pattern is barely used yet; expanding it would centralise cross-cutting edge concerns for the many Phenix APIs currently exposed directly.