Read this case study on its own page
Challenge
The site's original Node.js API had grown to carry real complexity — database connection management, OAuth against Google Ads, Graph email, circuit breakers, rate limiting — and needed the type safety and structured testing a compiled language gives. It also made sense for the business's own backend to be a working example of the C#/.NET practice it sells.
Approach
A full rewrite to C# on the .NET 10 isolated worker. The shared behaviour was extracted first into a library — a database connection factory that supports credential-free managed identity, typed analytics services, the attribution recorder, Graph email with HTML templates, the Google Ads conversion service with token refresh and an exponential-backoff circuit breaker, GA4 reporting, bot-check verification, rate limiting, an email-domain classifier and asynchronous mail-server enrichment for contact submissions. Unit tests were written before the port, and the new API was delivered through the existing artifact-promotion pipeline without disrupting live traffic. The library has since grown to cover the CV request flow, YouTube authentication and contact identity resolution.
Outcome
- Type safety across the whole API layer and several hundred unit tests covering validators, services and handlers
- Contact submissions enriched with domain type and mail-server checks before they reach the inbox
- Credential-free database access — no connection strings to rotate
- A circuit breaker on the Google Ads API stops quota pressure cascading
- Duplication between endpoints reduced to near zero
Where judgement mattered
- Extract the shared library before porting anything, so the port had something to test against
- Tests first, then migration, then cut-over — with the old implementation still serving until the new one proved itself
- Same pipeline, same environments: the rewrite changed the runtime, not the delivery process
Technology stack
C# / .NET 10 isolated worker · Azure Functions · Azure SQL with managed identity · Microsoft Graph SDK · Google Ads and GA4 APIs · xUnit and Moq · Azure DevOps CI/CD