phenix-packagevalidation-api
.NET 8 API that validates package discount eligibility for Phenix quotes, combining supplier/flights/destination configuration, exchange rates and dynamic gross-margin checks; also publishes its own service-contract and client NuGet packages.
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 8, AutoMapper, FluentValidation |
| Runtimes | .NET 8 |
| Tests / CI | good / CI in place |
| Last commit | 2026-06-24 |
| Owner | Owner unknown (mapping to be curated) |
| Domain | Selling and quoting (system generated; curate in repo-owners.json to override) |
| Product area | Phenix |
| Hosted | On-prem Deployed to our own machines
|
| Releases | 1 release pipeline(s): phenix-packagevalidation-api |
| Integration | rest, wcf, redis, jwt |
| Source | Open in Azure DevOps |
Dependencies in context
Entanglement
loosely attached Bound into the core by 1 mechanism(s).
- Speaks WCF (client)
Detaches when its WCF surface gains a modern interface or its WCF calls move to one.
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. Calls legacy WCF endpoints as a client; stay dual-version safe on client package upgrades.
- Consumes WCF contract packages: never take a breaking client bump mid-feature, and treat obsolete warnings as migration debt
- Serialized state or messages in flight (Redis or queues): new code must deserialize objects written by the previous version
- 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.
- Audit serialized data: anything in Redis, queues or shared caches must deserialize cleanly across adjacent versions.
- 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
phenix-packagevalidation-api
Purpose
Single-controller API (PackageValidationController) exposing ValidatePackageDiscount operations that decide whether a quote qualifies for package discounting. It aggregates supplier configuration, flights configuration, destination-management data, exchange rates and gross-margin/dynamic-margin calculations, with localised resource strings (English and Dutch) for validation messages. The repo also ships Phenix.PackageValidation.ServiceContract and a client library (with Autofac and SimpleInjector integration packages) for consumers.
Tech stack
C# .NET 8 ASP.NET Core MVC with API versioning, AutoMapper, FluentValidation auto-validation, PhenixAuth JWT scheme plus TC.Cognito auth client, Swashbuckle, TravelCounsellors.ApiTools, TC.FluentResults, WebApi.Healthcheck, Nerdbank version.json and TravelCounsellors analyzer rulesets.
Deployment
prod_application with 1 release. YAML builds: azure-pipelines.yml (API, shared InternalOSS templates v1.0) plus build-api-client.yml for publishing the client packages; release pipeline phenix-packagevalidation-api. Hosted under base path /api/packagevalidation.
Dependencies
Internal: tc-connectionbroker (Api, Mongo, Redis, Wcf brokers), tc-exceptions, exchange-rate-service (TC.ExchangeRate.ServiceClient), phenix-destination-management (broker target DestinationManagement), phenix-flights (FlightsConfiguration typed HTTP client). Also consumes TC.Phenix.DynamicMargin.Api.Client, TC.Phenix.ClientApiLibrary (booking service facade), and TC.Cache.Specialised supplier/supplier-configuration caches whose source repos are not in the included list. External: AWS Cognito authentication.
Data stores
MongoDB PackageValidation database for request/response logging (TC.ScriptRunner.Mongo for setup). Redis via TC.Cache for supplier and supplier-configuration caches. No SQL Server.
Integration points
Inbound REST with JWT/Cognito auth. Outbound REST to destination-management, flights-configuration and dynamic-margin APIs through the connection broker; a WCF ConnectionBroker is registered for the legacy booking-service facade and exchange-rate service clients.
Code health
Good: unit and integration test projects (~104 test files) plus client-library tests, code-coverage runsettings, analyzer rulesets and YAML CI. Actively maintained (last commit 2026-06-24). No README at all — worse than boilerplate for a repo that publishes consumer-facing client packages.
Modernisation risks
Low priority — modern .NET 8 with strong tests and CI. Residual: WCF client edges to the booking and exchange-rate services keep legacy protocol coupling, and the discount rules depend on several specialised cache packages whose freshness is owned elsewhere. Missing README hurts discoverability of the published client packages.