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¶
-
Set up your local development environment with Docker or native installations. Perfect for developers getting started.
-
Clone the repo, install dependencies, and start building in minutes.
Core Documentation¶
-
Complete developer guide covering setup, workflows, coding standards, testing, and best practices.
-
System architecture, design patterns, multi-tenancy implementation, and technical specifications.
-
Deploy to staging environment using PM2 without Docker. Production-ready deployment guide.
-
Learn how to use 16 specialized AI agents to automate frontend and backend development.
-
Industry-standard branching strategy with GitHub Flow, release management, and commit conventions.
🎯 Quick Links¶
For Developers¶
- Local Setup Guide - Set up your development environment
- Development Workflow - Daily development process
- Git Workflow - Branching strategy and commit standards
- Using AI Agents - Accelerate development with AI
- Coding Standards - Code style and patterns
- Testing Guide - Unit and E2E testing
For DevOps¶
- Staging Deployment - PM2 + NGINX setup
- Docker Setup - Containerized development
- Environment Configuration - Env variables
For Architects¶
- System Architecture - High-level design
- Multi-Tenancy Design - Tenant isolation patterns
- Database Schema - Entity relationships
- Security Considerations - Security best practices
🤖 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:
Output: 12+ production-ready files
Backend Agents (6)¶
Create complete backend APIs with entities, DTOs, services, controllers, and tests:
Output: 8+ production-ready files
🏗️ 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¶
- Setup Issues: Check the Troubleshooting section
- Development Help: See Contributing Guide
- Architecture Questions: See Architecture Documentation
- AI Agent Help: See Agent System Guide
- Issues: Open an issue on GitHub
- Discussions: Use GitHub Discussions
📝 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