Skip to content

MMR SaaS Platform Documentation

Welcome to the MMR Multi-Tenant SaaS Platform documentation!

🚀 Overview

MMR SaaS is a production-ready, enterprise-grade multi-tenant SaaS platform foundation designed to accelerate the development of modern web applications with built-in multi-tenancy, authentication, and AI-powered development tools.

✨ Key Features

  • 🏢 Multi-Tenancy: Automatic row-level tenant isolation with zero-configuration
  • 🤖 AI Agent System: 16 specialized agents for automated code generation
  • 🔒 Enterprise Auth: JWT authentication with role-based access control
  • 📦 Monorepo: Turborepo + PNPM for optimized builds and caching
  • 🎨 Modern Stack: NestJS backend + Next.js 15 frontend with full TypeScript
  • ✅ Test Coverage: Comprehensive unit and E2E tests with multi-tenant validation
  • 🚀 Developer Experience: Hot reload, type safety, automated workflows

🛠️ Technology Stack

Backend

  • NestJS 10 - Enterprise TypeScript framework
  • TypeORM - Database abstraction with migrations
  • MySQL 8.0 - Relational database
  • Redis 7.x - Session storage & caching
  • JWT + Passport - Token-based authentication

Frontend

  • Next.js 15 - React with App Router (SSR/SSG)
  • TypeScript - Strict mode enabled
  • Tailwind CSS 3.4 - Utility-first CSS
  • Shadcn/UI - Accessible component library
  • TanStack Query v5 - Server state & caching
  • Zustand - Lightweight state management

AI Agent System

  • 16 Total Agents (10 Frontend + 6 Backend)
  • 6-Step Frontend Workflow - Automated UI module generation
  • 5-Step Backend Workflow - Automated API generation

📚 Documentation

Getting Started

  • Local Setup


    Set up your local development environment with Docker or native installations. Perfect for developers getting started.

  • Quick Start Guide


    Clone the repo, install dependencies, and start building in minutes.

Core Documentation

  • Contributing Guide


    Complete developer guide covering setup, workflows, coding standards, testing, and best practices.

  • Architecture


    System architecture, design patterns, multi-tenancy implementation, and technical specifications.

  • Staging Setup


    Deploy to staging environment using PM2 without Docker. Production-ready deployment guide.

  • AI Agent System


    Learn how to use 16 specialized AI agents to automate frontend and backend development.

  • Git Workflow


    Industry-standard branching strategy with GitHub Flow, release management, and commit conventions.

For Developers

For DevOps

For Architects

🤖 AI-Powered Development

The platform includes 16 specialized AI agents that automate code generation:

Frontend Agents (10)

Create complete frontend modules with types, schemas, services, hooks, components, and pages:

@orchestrate create products module

Output: 12+ production-ready files

Backend Agents (6)

Create complete backend APIs with entities, DTOs, services, controllers, and tests:

@backend-orchestrate create products module

Output: 8+ production-ready files

Learn more about AI Agents →

🏗️ Project Structure

MMR_SAAS_LAB/
├── apps/
│   ├── backend/              # NestJS API (Port 3001)
│   │   ├── src/
│   │   │   ├── common/       # Shared utilities (BaseEntity, TenantContext)
│   │   │   ├── modules/      # Feature modules (users, tenants)
│   │   │   └── database/     # Migrations
│   │   └── test/             # E2E tests
│   │
│   └── web/                  # Next.js Frontend (Port 3000)
│       ├── src/
│       │   ├── app/          # App Router pages
│       │   ├── components/   # Shared components + Shadcn/UI
│       │   ├── modules/      # Feature modules
│       │   └── store/        # Zustand stores
│       └── public/
├── packages/
│   ├── types/                # Shared TypeScript types
│   └── schemas/              # Shared Zod schemas
├── .claude/
│   └── agents/               # AI Agent System (16 agents)
│       ├── frontend/         # 10 frontend agents
│       └── backend/          # 6 backend agents
├── docs/                     # Documentation (this site)
└── docker-compose.yml        # MySQL + Redis

🚦 Getting Help

📝 License

Private - All Rights Reserved

🙏 Acknowledgments

Built with modern technologies and best practices: - NestJS - Backend framework - Next.js - Frontend framework - TypeORM - Database ORM - TanStack Query - Server state management - Shadcn/UI - UI component library - Turborepo - Monorepo build system


Version: 2.0.0 | Last Updated: 2026-06-17 | Maintained By: MMR SaaS Team