← All projects

Multi-tenant CRM SaaS API

CRM System

ASP.NET Core 8 Clean Architecture CRM backend—HotChocolate GraphQL for contacts, leads, opportunities, and accounts, plus tenant/subscription management on SQL Server.

CRM System

The challenge

Teams needed a multi-tenant CRM API foundation—identity, pipeline objects, and subscription plans—without shipping an unfinished full CRM suite or inventing a frontend that the repo does not contain. Without a coherent multi-tenant crm saas api foundation, CRM System stakeholders faced fragmented tools, slow handoffs, and limited visibility—classic failure modes Tekvers designs against.

The solution

CRM System: ASP.NET Core 8 Clean Architecture CRM backend—HotChocolate GraphQL for contacts, leads, opportunities, and accounts, plus tenant/subscription management on SQL Server. Production-shaped CRM + identity + subscription API cores without a fake frontend claim. Tekvers delivered a maintainable multi-tenant crm saas api system for CRM System using ASP.NET Core 8, HotChocolate GraphQL, EF Core, Dapper, with phased rollout, operator workflows, and documentation suited to long-term ownership.

Approach

Clean Architecture + dual data access

Domain contracts in Core; services in Application; EF + Dapper repositories in Infrastructure; HotChocolate types/queries/mutations as the API edge—filtering, sorting, and projections enabled on the GraphQL server.

Ship the CRM + SaaS cores first

End-to-end Identity, CRM pipeline (including lead qualify/convert and opportunity stage/close aggregates), and Subscription (tenants, plans, tenant users, feature gates) before expanding scaffold-only modules.

Tenant context at the host edge

`TenantContextMiddleware` resolves multi-part hostnames to `HttpContext.Items["TenantId"]`; Serilog logs to console and rolling files; Swagger is available in Development.

Deliverables

  • ▸ASP.NET Core 8 Clean Architecture Web API (`net8.0`)
  • ▸HotChocolate GraphQL API at `/graphql` (CRM + auth + subscription operations)
  • ▸Contact, Lead, Opportunity, and Account CRUD/query/mutation surfaces via ~46 SQL stored procedures
  • ▸Lead qualify/disqualify/convert and opportunity stage/close + pipeline value aggregates
  • ▸JWT Bearer auth with BCrypt password hashes; user/role GraphQL mutations
  • ▸Multi-tenant tenants, subscription plans, subscribe/cancel/upgrade/downgrade via EF Core
  • ▸Subdomain tenant middleware and plan feature-flag helpers
  • ▸Serilog structured logging and Development Swagger UI

Outcomes

  • ▸Production-shaped CRM + identity + subscription API cores without a fake frontend claim
  • ▸GraphQL-first contract suitable for future web/mobile clients
  • ▸Clear backlog: wire Activities/Helpdesk/Sales scaffolds and Stripe DI only when ready
  • ▸Documented gaps (hardcoded user id, refresh tokens, limit enforcement) for honest handoff

Impact

Organizations get a real SaaS CRM backend to extend—pipeline objects and tenancy completed—while Tekvers refuses to market scaffold entities or Stripe helpers as finished product modules.

Tech stack

ASP.NET Core 8HotChocolate GraphQLEF CoreDapperSQL ServerJWTBCryptSerilog

Want something similar?

I build production systems like CRM System—from architecture through launch. Tell me what you need.

Contact me →