phenix-place-repository
Multi-solution repo for Phenix place/destination data: an in-memory place-tree NuGet library over the Phenix SQL database, a .NET 10 FastEndpoints Place API with hybrid Redis caching, a .NET 8 Mongo-backed Place Queries API, and client packages plus a SQL-to-Mongo data loader.
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, ASP.NET Core 10, FastEndpoints, Dapper |
| Runtimes | .NET 8, .NET 10, .NET Framework 4.7.2, .NET Framework 4.8.1 |
| Tests / CI | some / CI in place |
| Last commit | 2026-07-06 |
| Owner | Owner unknown (mapping to be curated) |
| Domain | Content and destinations (system generated; curate in repo-owners.json to override) |
| Product area | Phenix |
| Hosted | AWS + on-prem Ships artefacts to both AWS and on-prem machines (see evidence below)
|
| Releases | 1 release pipeline(s): \commercial\phenix-place-api |
| Integration | rest, wcf, redis |
| Source | Open in Azure DevOps |
Dependencies in context
Entanglement
kernel Bound into the core by 2 mechanism(s).
- Speaks WCF (client)
- Shares core database sqlserver:Phenix
Detaches when its WCF surface gains a modern interface or its WCF calls move to one; and when the shared database group it belongs to gains an owned API or completes schema separation (sqlserver:Phenix).
Capability duplication
Part of the Location lookup family (survivor): Modern successor
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
Ready with guardrailsClose: the deployment path exists, but specific checks are needed first, typically raising tests, auditing serialized data, or respecting a shared schema with expand and contract. Already deploys as a container to AWS, which releases without downtime today. Some artefacts still deploy on-prem; they follow the on-prem path. Shares sqlserver:Phenix: code can ship at will, schema cannot.
- 4 system(s) depend on this repo; during a rolling deploy they will talk to old and new versions at once, so responses must stay compatible
- Consumes WCF contract packages: never take a breaking client bump mid-feature, and treat obsolete warnings as migration debt
- Shares sqlserver:Phenix with 21 system(s): destructive schema change is prohibited in a single release; expand and contract only
- 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.
- Raise automated test coverage first: ZDD trades the end-of-sprint manual gate for continuous automated confidence, so the tests are the entry ticket.
- 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
Blocked by a shared core databasesqlserver:Phenix is shared, so this system cannot change engine on its own: every sharer moves in convoy. The stage 4 work (named owner, declarative schema, owned API) has to land first; after that, the steps below apply to whatever slice this system ends up owning.
- Inventory the schema and query surface of sqlserver:Phenix: tables, stored procedures, triggers, cross-database joins and anything else engine-specific.
- Confirm the target: PostgreSQL (relational model; keep transactions and joins, swap the engine).
- Replatform to modern .NET first (see the recommended actions): current PostgreSQL and MongoDB drivers and EF Core providers target modern .NET, and doing one risky change at a time is cheaper than doing two.
- Data access is not through an ORM, so port the SQL by hand: translate T-SQL constructs, replace stored procedures with application code or target-native equivalents, and add integration tests around the queries that matter first.
- Stand up the target alongside SQL Server, backfill with an ETL pass (pgloader or an export/import job), then dual-write or replicate until parity is proven.
- Move reads to the target, watch correctness and latency, then cut writes over and keep SQL Server read-only until confidence is earned.
- Decommission the SQL Server database and remove the connection strings and firewall paths that pointed at it.
Containerisation
Partially containerisedPart of this repo already builds containers for AWS while other artefacts still deploy to on-prem machines. Finish the job by moving the remaining artefacts (see the hosting evidence on this page) through the same pipeline template.
- Identify the artefacts still deploying through deployment-group release pipelines (listed in the hosting evidence).
- Move each to the shared ci.yml pipeline template with the container parameters, as the already-containerised artefacts in this repo do.
- Disarm the old release pipelines once traffic is confirmed on the new deployment.
Recommended actions
Replatform phenix-place-repository to modern .NET
Runs on .NET 8, .NET 10, .NET Framework 4.7.2, .NET Framework 4.8.1, out of mainstream support. No pinning dependency blocks it; sequence by fan-in (providers before consumers). Shares sqlserver:Phenix, so batch it with its database group (stage 4).
Impact: Unblocks 4 dependent system(s)
proposedAssessment notes
phenix-place-repository
Purpose
The estate's place/destination data platform, four deliverables in one repo: TC.Phenix.PlaceRepository (NuGet library holding a periodically-refreshed in-memory place tree loaded from Phenix stored procedures such as dbo.Place_SELECT, with a hosted refresh service); TC.Phenix.Place.Api (FastEndpoints API exposing Places and Countries lookups); TC.Phenix.Place.Queries (query API over a MongoDB Places database, with its own client package and a DataLoad console that imports from the Phenix SQL database); and TC.Phenix.Place.Api.Client for consumers.
Tech stack
Modern C#: the Place API and DataLoad target .NET 10, the Queries API .NET 8, and the PlaceRepository/client libraries multi-target net472/net481/net8.0/net10.0 so legacy Framework consumers keep working. FastEndpoints with Swagger, Dapper + Microsoft.Data.SqlClient, MongoDB.Driver, Microsoft.Extensions.Caching.Hybrid backed by StackExchange Redis, central package management, Nerdbank GitVersioning, StyleCop/Sonar/SecurityCodeScan analysers, xUnit v3.
Deployment
Included with 1 release via build pipeline phenix-place-api and release pipeline \commercial\phenix-place-api. Five YAML build definitions exist in the repo (api, api-client, queries-api, queries-api-client, repository) publishing the various apps and NuGet packages; only the Place API is release-linked in the trace. New Relic app names configured per environment.
Dependencies
Internal: tc-connectionbroker (Sql, Mongo, Redis, Wcf, Api brokers) and backoffice via TC.Phenix.Services.Client (WCF service references used by the PlaceRepository library, with CoreWCF System.ServiceModel.* packages for the modern targets). External: New Relic.
Data stores
Reads the shared Phenix SQL database (broker target Phenix, stored-procedure access, including a cross-database call to PhenixRepository.dbo.DestinationSearch_ByAirportCode). The Queries API owns MongoDB database Places (seeded by the DataLoad importer). Redis backs the hybrid cache (Cache connection).
Integration points
Inbound REST on both APIs. Outbound SQL/Mongo via connection brokers, Redis for distributed caching, and legacy WCF calls through TC.Phenix.Services.Client in the library code paths.
Code health
Four test projects (~13 test files) — coverage is thin relative to four deliverables. Analysers and rulesets are enforced and CI is YAML throughout. Actively developed (last commit 2026-07-06). README is untouched boilerplate, unhelpful for a repo publishing multiple packages. The DataLoad tool references a webuser SQL account by name (credential itself resolved via the broker, not committed).
Modernisation risks
Low priority — this is where place data is going: .NET 8/10, FastEndpoints, Mongo read models. Residual risks: continued read coupling to the shared Phenix SQL database and the PhenixRepository cross-database stored procedure; multi-targeting down to net472 keeps legacy consumers alive; and it overlaps/supersedes the dormant phenix-locationservice-api, which should be retired onto these APIs.