A comprehensive platform framework that combines opinionated architecture, production-ready infrastructure, and developer-friendly tooling to deploy enterprise-grade B2B/B2C SaaS applications in minutes instead of months.
To understand the core of SaaS Factory, imagine a modern, high-tech automotive manufacturing plant.
When a car manufacturer launches a new model whether a compact city car (B2C) or an advanced enterprise-grade SUV they don't reinvent the wheel. Instead, they rely on a universal, modular platform. Standardized components like the chassis, battery pack, and drivetrain are seamlessly redeployed, combined, and adapted for the new vehicle variant.
SaaS Factory brings this exact level of precision and manufacturing efficiency to the software world for the .Net Ecosystem.
Instead of physical mechanical parts, SaaS Factory provides production-ready, foundational building blocks required by any modern SaaS application. You can configure and assemble these components to build for B2C, B2B, or Enterprise needs:
- The Chassis: A unified, robust database schema optimized for either B2C or B2B/Enterprise setups, ensuring clean, consistent, and multi-tenant-ready data structures.
- The Engine: Centralized, high-performance API layers, background workers, and core business logic.
- The Safety System: Deeply integrated, solid authentication and authorization services.
Just as a modern electric vehicle receives continuous over the air software updates to enhance security, performance or unlock new features without a trip to the mechanic, the architecture behind SaaS Factory is dynamically updatable.
Leveraging the power of the .NET framework, all core platform components are engineered, distributed, and maintained as centralized NuGet packages.
This allows you to ship bug fixes, security patches, and structural optimizations to the foundation of all your deployed SaaS products simultaneously without rewriting boilerplate or fracturing your application-specific logic. The result is a drastically reduced Time-to-Market, minimal technical debt, and a perfectly streamlined engineering lifecycle.
While there are many SaaS starter kits (boilerplates) on the market, SaaS Factory is built as a Platform Framework. Instead of cloning a snapshot of code and losing touch with future updates, the core of SaaS Factory is distributed via packages, keeping your underlying architecture maintainable over time.
| Framework / Platform | Ecosystem | Core Update Model | Architecture Philosophy | Infrastructure & Deployment |
|---|---|---|---|---|
| SaaS Factory | .NET (C#) | Centralized NuGet Packages (Dynamically updatable core platform) | Lightweight, pragmatic, Domain-Driven-Design (DDD), Clean Architecture and Laravel-inspired | Cloud-agnostic, cost-effective (.NET Aspire + YARP) |
| ABP Framework | .NET (C#) | Centralized NuGet Packages (Updatable framework layers) | Heavy Enterprise, strict Domain-Driven Design (DDD) | Highly abstract, enterprise-scale, steep learning curve |
| Bullet Train | Ruby on Rails | RubyGems Packages (Updatable via core framework gems) | "The Rails Way", extreme convention over configuration | Monolithic, optimized for maximum developer velocity |
| Laravel Spark / Jetstream | PHP | Composer Packages (Billing & Auth decoupled as packages) | Highly expressive, rapid application development | Traditional or serverless PHP, optimized for single-app instances |
| SaaS Pegasus | Python (Django) | Boilerplate / Scaffolding (One-time generation, manual upgrades) | Clean Django architecture, batteries included | Traditional Python stack, heavy emphasis on recent AI/LLM tooling |
Most SaaS starter kits are "clone-and-forget" boilerplates. Once you customize the code, pulling upstream security patches or features from the original template becomes a git-merge nightmare. SaaS Factory decouples the platform core into versioned NuGet packages, allowing you to update your underlying SaaS infrastructure seamlessly without breaking your unique business logic.
While alternatives like ABP Framework offer package-based architectures, they often enforce a heavy "Enterprise Tax"βrequiring extreme boilerplate abstractions, deep layered architectures, and heavy tooling that slows down startup velocity. SaaS Factory combines the structural integrity of Clean Architecture / DDD with the pragmatic developer joy of Laravel, driven by a powerful Developer CLI to keep you moving fast.
Instead of forcing you into vendor lock-in with expensive cloud providers (like Azure Container Apps or Azure AKS) or managing complex infrastructure YAMLs, SaaS Factory utilizes .NET Aspire for flawless local service discovery and orchestration. Paired with YARP (Yet Another Reverse Proxy) as a native C# API Gateway, the entire stack remains lightweight and cloud-agnosticβready to be deployed cost-effectively on modern providers like Railway, Hetzner, or DigitalOcean for a fraction of traditional enterprise hosting costs and it is easy to add other cloud providers.
The comprehensive documentation includes:
- π Getting Started Guide - Quick setup and installation
- ποΈ Architecture Overview - System design and patterns
- π Development Workflow - Building and deploying
- π§ Configuration Guide - Environment setup and customization
- π¦ Shared Modules - Reusable components and libraries
- π― Use Cases - User flows and feature guides
Deploy a fully functional, production-ready SaaS application in under 30 minutes using a single command via the Developer CLI, with all foundational features already in place - ready for you to add your application-specific features.
Inspired by Laravel's approach to developer experience and opinionated best practices, SaaS Factory brings the same philosophy to .NET - purpose-built for multi-tenant B2C and B2B SaaS application.
- Some of the key features inspired by Laravel and other modern frameworks that will be included out of the box:
- Developer CLI for scaffolding and management
- Payment integration with Stripe
- Full text search with PostgreSQL
- Social authentication with OAuth providers
- Email verification and password reset flows
- Team management, user roles and permissions and profiles
- Multitenancy support out of the box
- Background job processing with workers and a dashboard for monitoring and managing jobs centrally instead of per application such as Laravel Horizon
- Feature flag management system for gradual rollouts and A/B testing
- Comprehensive audit logging and monitoring tools
- GDPR compliance features like data export and deletion requests
Provide a production-ready platform framework that eliminates months of foundational development work. This isn't just a boilerplate - it's an integrated, battle-tested system with proven security patterns, comprehensive multi-tenancy, enterprise DevOps, and deployment automation that lets you focus on building unique features that differentiate your product.
Development Experience
- Enjoyable and productive development workflow
- Familiar tech stack (C# wherever possible)
- Minimal technical debt through standardized implementations
Infrastructure & Deployment
- Consolidated shared infrastructure across all SaaS projects
- Fast continuous deployment (automatic deployment after passing automated QA)
- Cloud-agnostic architecture (easily migrate to Digital Ocean, Hetzner, Linode, Render, Railway, etc.)
Architecture & Quality
- Monorepo structure for deployment manager and SaaS application boilerplate
- Modular, flexible structure with proper tracking of code and database migrations
- Automated processes for testing, documentation, and deployment
- Multiple environments: Dev, QA (automated), Staging, and Production
Operations
- Cost-effective infrastructure management
- Enterprise-grade security implementation
- Disaster recovery capabilities
- Comprehensive audit logging
Technical Challenges
- Maintaining consistency across multiple deployed SaaS applications to minimize technical debt
- Balancing high-level architectural vision with detailed low-level implementation
Strategic Decisions
- MVP Readiness: Defining criteria for the first production SaaS Factory deployment
- Deployment Manager: Should this be deferred to version 2.0? How to consolidate and migrate existing deployed applications?
Install prerequisites for development on Windows
-
Open a PowerShell terminal as Administrator and run the following command to install Windows Subsystem for Linux (required for Docker):
wsl --install -
Restart your computer if prompted.
-
Install .NET, Git, Docker Desktop, Node.js, Azure CLI, and GitHub CLI using winget (available only on Windows 11):
@( "Microsoft.DotNet.SDK.9", "Git.Git", "Docker.DockerDesktop", "OpenJS.NodeJS", "npm install wrangler --save-dev" "GitHub.cli" ) | ForEach-Object { winget install --accept-package-agreements --accept-source-agreements --id $_ } "gh extension install https://github.com/nektos/gh-act"
SaaS-Factory is a monorepo containing all application code, infrastructure, tools, libraries, documentation, etc. A monorepo is a powerful way to organize a codebase, used by Google, Facebook, Uber, Microsoft, etc.
π Repository Organization: See REPOSITORY_ORGANIZATION.md for details on the recent reorganization and directory structure improvements.
ββ .github # GitHub workflows, CI/CD, and Copilot instructions
ββ build-artifacts # Build output, logs, and temporary files (gitignored)
ββ Code # Contains the application source code
β ββ AppBlueprint
β ββ AppBlueprint.AppHost # .NET Aspire project starting app and all dependencies in Docker
β ββ AppBlueprint.AppGateway # YARP reverse proxy / API gateway
β ββ AppBlueprint.Web # Blazor Server app utilizing MudBlazor components
β ββ AppBlueprint.ApiService # .NET REST API
β ββ AppBlueprint.ServiceDefaults # Shared Aspire service configuration
β ββ AppBlueprint.DeveloperCli # CLI tools for scaffolding and management
β ββ AppBlueprint.Tests # Tests for all projects
β ββ Shared-Modules # Clean Architecture shared modules
β ββ AppBlueprint.Domain # Entities, value objects, aggregates, domain logic
β ββ AppBlueprint.Application # Use cases, commands, queries, DTOs (CQRS)
β ββ AppBlueprint.Infrastructure # EF Core, repositories, external service integrations
β ββ AppBlueprint.Presentation.ApiModule # Minimal API endpoints and versioning
β ββ AppBlueprint.Contracts # Shared contracts and interfaces
β ββ AppBlueprint.SharedKernel # Shared kernel code across all projects
β ββ AppBlueprint.UiKit # Reusable UI components
β ββ AppBlueprint.Api.Client.Sdk # Kiota-generated API client SDK
β ββ AppBlueprint.Tests # Shared test utilities and integration tests
ββ docs # Documentation and guides
β ββ guides # Testing guides and quick references
ββ scripts # Utility scripts
β ββ powershell # PowerShell scripts for Windows development