backoffice-eventlog
REST Web API and SQL Server databases for recording and querying back-office application events (event log and archive), with a published NuGet client for consumers.
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, sql |
| Frameworks | ASP.NET Core 8, Autofac 8, Dapper (TC.Repository.Dapper), Swashbuckle/NSwag |
| Runtimes | .NET 8 |
| Tests / CI | good / CI in place |
| Last commit | 2026-04-03 |
| Owner | Owner unknown (mapping to be curated) |
| Domain | Data and insight (system generated; curate in repo-owners.json to override) |
| Product area | Phenix |
| Hosted | On-prem Deployed to our own machines
|
| Releases | 8 release pipeline(s): \finance\backoffice\[DEPRECATED] backoffice-eventlog Database Dev; \finance\backoffice\[DEPRECATED] backoffice-eventlog Database release; \finance\backoffice\[DEPRECATED] backoffice-eventlog release; \finance\backoffice\[DEPRECATED] backoffice-eventlogArchive Database Dev; \finance\backoffice\[DEPRECATED] backoffice-eventlogArchive Database release; \finance\backoffice\backoffice-eventlog CI; \finance\backoffice\backoffice-eventlog Database CI; \finance\backoffice\backoffice-eventlog stealth |
| Integration | rest |
| Source | Open in Azure DevOps |
Dependencies in context
Entanglement
loosely attached Bound into the core by 1 mechanism(s).
- Shares core database sqlserver:EventLog
Detaches when the shared database group it belongs to gains an owned API or completes schema separation (sqlserver:EventLog).
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. Shares sqlserver:EventLog: expand and contract is mandatory for any schema change.
- 1 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
- Shares sqlserver:EventLog with 13 system(s): destructive schema change is prohibited in a single release; expand and contract only
- 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
Blocked by a shared core databasesqlserver:EventLog 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:EventLog, sqlserver:EventLogArchive: tables, stored procedures, triggers, cross-database joins and anything else engine-specific.
- Confirm the target: MongoDB (the data is event or log shaped, and the estate already operates MongoDB).
- 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
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
backoffice-eventlog
Purpose
Central event-logging service: TC.EventLog.WebApi exposes versioned REST endpoints (v1/v2, Swagger-documented) for writing and reading application events (e.g. app events, sent payment links, flight extras), backed by EventLog and EventLogArchive SQL Server databases. A TC.EventLog.WebApiClient NuGet package is generated (NSwag) for other estate services to consume.
Tech stack
- .NET 8 ASP.NET Core Web API with Autofac DI, Asp.Versioning, Swashbuckle 6.6 and NSwag client generation.
- Data access via Dapper (
TC.Repository.Dapper) andSystem.Data.SqlClient; connection strings resolved at runtime through TC.ConnectionBroker. - SQL database projects (
db/EventLogDatabase,db/EventLogArchiveDatabase) with Create/Change script folders for tables, views and stored procedures. - Nerdbank.GitVersioning for versioning; New Relic APM configured per environment.
Deployment
Prod application with 8 releases. Numerous build pipelines (API CI plus separate EventLog and EventLogArchive database pipelines, several marked DEPRECATED) and release pipelines under \finance\backoffice\, indicating separately released API and database components hosted under /services/backoffice-eventlog (Phenix Services).
Dependencies
- Internal:
tc-connectionbroker(TC.ConnectionBroker.* packages for connection-string brokering),tc-exceptions(TC.Exceptions.WebApiClient packages). Also consumes TC.Repository and TC.Diagnostics.HealthChecks NuGet packages from the internal Azure Artifacts feed. - External: New Relic monitoring; NuGet.org and internal
uktcProduction feed.
Data stores
SQL Server EventLog (primary) and EventLogArchive (archive) databases, deployed via dedicated database pipelines. Views such as SalesPersonView suggest cross-database reads by reporting consumers.
Integration points
- REST/JSON API (versioned v1/v2) consumed via the generated WebApiClient package.
- Health-check endpoints (database health check included).
Code health
- Good test coverage layers: unit tests (
TC.EventLog.WebiApi.UnitTests), client tests, and end-to-end tests with per-environment runsettings. - Modern CI via shared
azure-pipelines-templates; actively maintained (last commit 2026-04-03).
Modernisation risks
- Low risk overall: current runtime, tests and CI in place.
- Stored-procedure-heavy database with separate archive DB adds operational coupling; other systems may read the DB directly via views.