crm-reporting-api
ASP.NET Core API exposing CRM reporting data (corporate leads / prospective email-domain lookups) from a replicated Dynamics CRM reporting database in Azure SQL.
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 2.2, Entity Framework Core 2.2, MediatR 7 |
| Runtimes | .NET Core 2.2 |
| Tests / CI | some / CI in place |
| Last commit | 2019-12-05 |
| Owner | Owner unknown (mapping to be curated) |
| Domain | Contact centre and CRM (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): \crm-reporting-api\crm-reporting-api |
| Integration | rest |
| 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.
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
Not applicableNot a deployed service (libraries, database definitions, desktop apps) or a retirement candidate not worth the investment. Retirement or consolidation candidate; do not invest in ZDD adoption.
SQL Server exit
Retire insteadThis repo is a retirement or consolidation candidate. Do not invest in a database migration; execute the retirement and the SQL Server dependency disappears with it.
Containerisation
Retire insteadThis repo is a retirement or consolidation candidate; containerising it would be investment in something we intend to switch off.
Recommended actions
Rotate the credentials committed to crm-reporting-api
Risk flags indicate credentials or keys in source (secrets-in-source). 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
proposedReview crm-reporting-api for retirement
Dormant (last commit 2019-12-05) yet still release-linked, and nothing depends on it. Confirm remaining use, then retire and disarm its pipeline.
Impact: Shrinks the estate before the expensive work begins
proposedAssessment notes
crm-reporting-api
Purpose
A small read-only REST API over a CRM reporting database. The single controller (CorporateLeadsController) answers queries such as whether a prospective email domain already exists among CRM accounts/contacts/leads — used for corporate-lead qualification. The DAL is an EF Core scaffold of Dynamics CRM-shaped tables (Account, Contact, Lead, BusinessUnit, etc.).
Tech stack
C# on .NET Core 2.2 (ASP.NET Core, Microsoft.AspNetCore.App), MediatR query handlers, EF Core 2.2 SqlServer provider, TC.Swagger.Versioning, TC.Exceptions.WebApiClient.Middleware, health checks (URIs + EF Core). SDK-style projects with Directory.Build.props, StyleCop/Sonar/FxCop analyzers.
Deployment
Included as a prod application with 1 release; build pipeline crm-reporting-api CI using the shared azure-pipelines-templates dotnet-core job, release pipeline \crm-reporting-api\crm-reporting-api. Per-environment appsettings for qa, datafixqa, liveproviderqa, preproduction, training, live.
Dependencies
Internal: exception reporting posts to the webapi-exceptions service via TC.Exceptions middleware; builds on shared TC.Swagger.Versioning packaging. External: the underlying data originates from Dynamics CRM (replicated into the reporting database); no direct calls to other TC services.
Data stores
sqlserver:crmreporting on the Azure SQL server aznesqlrecruitmentprod.database.windows.net (sandbox catalog crmreportingsandbox in dev). Note: SQL credentials, including the live password, are committed in appsettings*.json.
Integration points
REST/JSON API with Swagger; health-check endpoints. Read-only SQL access via EF Core; no message bus.
Code health
Unit tests for the query handler plus a SpecFlow/xUnit integration-test project — reasonable for its size. CI via shared templates. Last commit 2019-12-05: dormant for over six years.
Modernisation risks
.NET Core 2.2 has been end-of-life since December 2019 (eol-runtime, legacy-framework). Plain-text production credentials in source are a security exposure (secrets-in-source). Long dormancy suggests it should be verified as still needed; if so, a lift to .NET 8 with secrets moved to a vault is straightforward given the tiny surface area.