tc-communications
ASP.NET Web API app that sends templated birthday and anniversary emails to Travel Counsellors, pulling recipients from the tcdb database and relaying via SMTP when a LaunchModule endpoint is hit.
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 MVC 5, ASP.NET Web API 2, SimpleInjector |
| Runtimes | .NET Framework 4.7.2 |
| Tests / CI | some / CI in place |
| Last commit | 2026-04-10 |
| Owner | Owner unknown (mapping to be curated) |
| Domain | Customer communications (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): \marketing\tc-communications |
| Integration | rest, smtp |
| Source | Open in Azure DevOps |
Risk flags
Each flag links to its glossary definition.
Dependencies in context
Entanglement
loose No binding mechanisms apply: this system needs no untangling work.
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
Needs workFeasible through the Workflow Engine's rolling drain, but real preparation is needed: dual-version discipline, better tests, or schema care before at-will release is sensible. Legacy runtime: the rolling drain works (stealth releases prove it) but relies on fix-forward risk rather than dual-version safety.
- 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 databasesqlserver:tcdb is shared, so this system cannot change engine on its own: every sharer moves in convoy. Either agree the move with all sharers as one programme, or first split this system's data out behind an owned API, then follow the steps below.
- Inventory the schema and query surface of sqlserver:tcdb: 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
Feasible after replatformingAppropriate, but the .NET Framework runtime has to go first; container work rides along with the replatform rather than preceding it.
- .NET Framework only runs on Windows; practical (Linux) containers need modern .NET
- Replatform to modern .NET first (see the recommended actions). Containerising then becomes routine.
- 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
Rotate the credentials committed to tc-communications
Risk flags indicate credentials or keys in source (plaintext-credentials). Rotate now and enable secret scanning in CI; this is independent of all other work.
Impact: Closes a live security exposure at near-zero cost
proposedReplatform tc-communications to modern .NET
Runs on .NET Framework 4.7.2, out of mainstream support. No pinning dependency blocks it; sequence by fan-in (providers before consumers).
Impact: Reduces the end-of-life runtime count
proposedAssessment notes
tc-communications
Purpose
A "communications modules" host: GET api/Email/LaunchModule/{companyCode}/{moduleName} runs a named module (Birthday or Anniversary), which queries tcdb for that day's recipients per company, applies per-country HTML templates (GB/IE/NL/BE/AE/ZA resources, first vs later anniversary variants) and sends each email via SMTP, returning delivery statuses. Presumably invoked by a scheduler; a test mode redirects all mail to a named test address.
Tech stack
C# on .NET Framework 4.7.2 across six legacy-format projects (host, Core, Behaviour, Email, Shared, Templating) with packages.config. ASP.NET MVC 5 + Web API 2 with OWIN and the auto-generated HelpPage area, SimpleInjector DI, log4net file logging, raw ADO.NET data access in Shared, System.Net.Mail.SmtpClient for delivery, and country-specific HTML templates embedded as resources.
Deployment
Included as prod_application with 1 release (build pipeline tc-communications, release pipeline \marketing\tc-communications). YAML azure.pipelines.yml uses the shared templates repo with a VS 16.0 build, plus a daily-midnight scheduled build. Hosted on IIS with Windows authentication.
Dependencies
Internal: TC.Phenix.CompanyInfo (company-info-api) for company metadata. External: none beyond the internal SMTP relay (smtp appSetting).
Data stores
SQL Server: the shared tcdb database, accessed with a plaintext SQL username and password committed in the Web.config connection string (pointing at the TestQaSQL server).
Integration points
Inbound REST (the LaunchModule/test endpoints); outbound SMTP for the emails themselves.
Code health
Two MSTest projects (Birthday and Anniversary module tests) give some coverage of the core logic. README is untouched boilerplate; commented-out [Authorize] on the controller means the mail-sending endpoint is unauthenticated beyond IIS Windows auth. Still receiving commits (last 2026-04-10) despite the legacy shape.
Modernisation risks
.NET Framework 4.7.2 MVC/Web API with packages.config has no direct path to modern .NET, and credentials sit in source. Functionally it overlaps the estate's mail-service/mailtemplate-service stack — the sensible move is to fold birthday/anniversary sends into that pipeline (or a scheduled job calling mail-service) rather than modernising this host in place. Medium priority: low business risk, but plaintext credentials and the open trigger endpoint deserve earlier attention.