Skip to content

lourosscs50/ClientForge

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ClientForge

ClientForge is a modular multi-tenant SaaS platform foundation built with .NET.

The system provides authentication, tenant isolation, and membership-based authorization designed for building scalable SaaS applications.


Core Features

  • JWT Authentication
  • Tenant Resolution Middleware
  • Membership Authorization Guard
  • Owner Assignment on Tenant Creation
  • Modular Monolith Architecture
  • Architecture Boundary Tests
  • Clean Domain / Application / Infrastructure Separation

Architecture

ClientForge follows a modular monolith architecture.

Each module contains:

Domain
Application
Infrastructure
Contracts

Modules currently implemented:

  • Identity
  • Tenants

Future modules may include:

  • Billing
  • Analytics
  • Notifications
  • Websites
  • Bookings

Request Pipeline

Request ↓ TenantMiddleware ↓ Authentication (JWT) ↓ MembershipGuard ↓ Endpoint

This ensures:

User → Tenant → Membership → Authorization


Example Flow

Register a user: POST /auth/register

Login: POST /auth/login

Create a tenant: POST /tenants Authorization: Bearer TOKEN

Access tenant resources: GET /me x-tenant-id: bella-salon Authorization: Bearer TOKEN


Running the Project

dotnet build dotnet test dotnet run --project src/ClientForge.Api

Swagger is available at: http://localhost:5273/swagger


Testing

The project includes:

  • Unit tests
  • Integration tests
  • Architecture boundary tests

Architecture tests enforce rules such as:

  • Domain must not depend on Infrastructure
  • Application must not depend on API
  • Shared modules must not depend on feature modules

License

Apache License 2.0

About

Modular multi-tenant SaaS platform foundation built with .NET. Includes JWT authentication, tenant isolation middleware, membership-based authorization, modular architecture, and automated architecture tests for enforcing clean boundaries.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages