SaaS HRM with Multi-Tenancy — Complete Source Code
A production-ready multi-tenant SaaS HRM application to manage workforce across multiple organizations from a single deployment. Built with .NET 10, ASP.NET Core, Blazor Server, MudBlazor, and Vertical Slice Architecture. Complete tenant isolation with EF Core global query filters.

HRM Multitenant: The Next-Gen People Engine: Built for Scale, Engineered for Excellence.
Running separate HRM instances for each client is costly. Blazor HRM Multi-Tenant allows multiple organizations to share one deployment with complete workforce data isolation via TenantId global query filters. Add new client organizations in seconds.
Employee data is highly confidential. Without proper isolation, one client's workforce data could leak to another. EF Core global query filters automatically scope every query. Tenant A's employees, salaries, and leave records are invisible to Tenant B.
Each tenant needs their own leave policies and attendance tracking. Blazor HRM Multi-Tenant provides tenant-scoped leave management with approval workflows, attendance logging, and calendar views — all isolated per organization.
HR service providers need per-tenant dashboards and reports. Blazor HRM Multi-Tenant includes tenant-aware workforce dashboards with headcount, department distribution, leave balances, and attendance metrics — all scoped per organization.
Complete end-to-end business features with multi-tenant isolation — every module is a complete vertical slice with endpoint, handler, validator, and EF Core queries.
Personal Info, Password, Avatar, Session
Leave Request, Leave Categories, Leave Balance
Evaluation, Appraisal, Promotion, Transfer
Branches, Departments, Designations, Employees
Salary Grades, Income, Deduction
Database log, File log
Users, Currencies, Auto Number
full inspection mode for appsettings.json
| Layer | Technology |
|---|---|
| Framework | .NET 10 |
| Web Framework | ASP.NET Core 10 |
| UI Rendering | Blazor Server (SignalR-based real-time UI) |
| UI Library | MudBlazor (Material Design for Blazor) |
| Architecture | Vertical Slice Architecture (VSA) + CQRS via MediatR |
| Multi-Tenancy | EF Core Global Query Filters with TenantId isolation |
| API Style | ASP.NET Core Minimal APIs with Swagger/OpenAPI |
| Data Access | Entity Framework Core 10 (Code-First, Migrations, Compiled Queries) |
| Database | SQL Server (fully tested) / PostgreSQL (scaffolded) |
| Validation | FluentValidation |
| Authentication | ASP.NET Core Identity + JWT Bearer Token |
| Authorization | Role-Based (RBAC) + Policy-Based Authorization |
| Real-Time | SignalR (built into Blazor Server) |
Blazor HRM Multi-Tenant uses Vertical Slice Architecture (VSA) with CQRS via MediatR and EF Core global query filters for complete tenant isolation across all workforce features.
Each feature (Create Employee, Approve Leave, etc.) lives in its own folder with endpoint, MediatR handler, validator, and EF Core queries — all in one place. Every handler automatically applies tenant filtering.
Tenant isolation via EF Core global query filters. Every entity has TenantId; EF Core auto-applies .Where(e => e.TenantId == currentTenantId) to all queries. Zero data leakage by design.
The entire multi-tenant HRM application lives in one .NET 10 project. No distributed complexity. Single F5 to run. Deploy as one unit. Perfect for SaaS HR service providers.
BlazorHRMMultiTenant/
├── Features/
│ ├── Tenants/
│ ├── Employees/
│ ├── Departments/
│ ├── Designations/
│ ├── LeaveManagement/
│ ├── Attendance/
│ ├── Payroll/
│ └── Dashboard/
├── Infrastructure/ # Auth, Audit, Tenant Resolution, EF Core
├── Migrations/
├── SeedData/ # Demo tenants, users, employee sample data
├── Components/
└── Program.cs
Blazor HRM Multi-Tenant ships with tenant-aware security. ASP.NET Core Identity manages users per tenant. JWT protects REST API, cookies protect Blazor UI. Both are tenant-scoped.
Role-based access control is fully tenant-scoped — each tenant has their own Admin, Manager, and User roles. EF Core global query filters guarantee employee data never leaks between tenants.
With Blazor Server, all employee data, source code, and database credentials never leave the server.
Same pattern for: Departments, Designations, Leave Requests, Attendance, Payroll.
/swagger
Complete, unrestricted C# source code. Single .NET 10 project. Clone, F5, serve multiple organizations.
Secure checkout via Lemon Squeezy. Lifetime access. No subscription.