apptension/saas-boilerplate

repository·master·Indexed 25 days ago

https://github.com/apptension/saas-boilerplate

A complete SaaS starter kit version 5.0.0 designed to accelerate development using React, Django, and AWS. It features a battle-tested stack including a frontend, backend API, admin panel, and workers. Key capabilities include Enterprise SSO (SAML 2.0, OIDC), SCIM 2.0 user provisioning, WebAuthn/Passkeys authentication, a dynamic AI-powered translation system, and a comprehensive rate-limiting framework for GraphQL, REST, and WebSockets.

Tokens
168.8K
Snippets
401
Records
1.3K
Agent score
80%

What's inside apptension-saas-boilerplate

  1. Overview of Additional Features

    master

    Additional built-in capabilities include:

    • Translations & i18n: Dynamic i18n with cloud publishing, AI-powered translation, and build-time sync.
    • CMS Integration: Contentful integration for managing marketing content and blog posts.
    • Admin Panel: Django admin with custom actions for user and system administration.
    • Asset Management: S3-based file storage with secure upload/download and CDN distribution.
    • CRUD Generator: Plop-based generators for scaffolding new features and components.
  2. Overview of Built-in SaaS Features

    master

    The SaaS Boilerplate comes with several production-ready features pre-configured:

    • Authentication: Supports email/password, social login, 2FA, and email verification.
    • Multi-tenancy: Includes team workspaces with role-based access control (RBAC).
    • Payments: Integrated with Stripe for subscriptions and one-time payments.
    • Notifications: Real-time in-app notifications system.
    • GraphQL API: Type-safe API with automatic code generation.
    • CI/CD Pipeline: Automated deployment workflows to AWS.
  3. Overview of Core SaaS Features

    master

    The SaaS Boilerplate includes several production-ready core features for building modern applications:

    • Authentication: Complete system with email/password, social login, 2FA, and role-based access control.
    • Multi-tenancy: Team workspaces with invitations, member management, and tenant-scoped data isolation.
    • Payments: Stripe integration supporting subscriptions, one-time payments, and webhook handling.
    • Email System: Transactional emails using React-based templates with local development preview support.
    • Notifications: Real-time in-app notifications via WebSockets and a notification center UI.
    • AI Integration: Ready-to-use OpenAI integration for AI-powered features.
    • RBAC Permissions: Fine-grained role-based access control with custom roles and permissions.
    • Activity Logs: Comprehensive audit trails for user and system actions with export capabilities.
    • Management Dashboard: Financial management module with forecasting and multi-currency support.
    • AI Agent (MCP): Intelligent assistant utilizing the Model Context Protocol for natural language data access.
    • Session Management: Cross-origin auth, Safari/iOS fallback, and multi-device session tracking.
    • Storage Backends: Flexible file storage supporting AWS S3, Cloudflare R2, and others.
  4. Overview of SaaS Boilerplate Features

    master

    The SaaS Boilerplate provides a comprehensive set of ready-to-use features for building multi-tenant applications. Key capabilities include:

    • Authentication & Authorization: User registration/login (including Google/Facebook OAuth), WebAuthn/Passkeys, Enterprise SSO (SAML 2.0, OIDC) with SCIM 2.0, 2FA, and active session management.
    • Multi-tenancy: Support for multiple entities within a single account with default roles (Owner, Admin, Member) and tenant-scoped data isolation.
    • Payments & Subscriptions: Stripe integration for recurring or immediate payments, subscription plan management, and a superadmin panel for customer management (e.g., refunds).
    • Tenant Management: Per-tenant XML backups and restores with encryption (via AWS Secrets Manager or BACKUP_MASTER_KEY) and configurable schedules.
    • Communication: Transactional email support with scheduling, internationalization, and real-time in-app notifications via WebSockets.
    • Content & AI: Contentful CMS integration, OpenAI integration for AI-powered features, and Model Context Protocol (MCP) integration for AI assistants.
    • Developer Tools: Plop-based CRUD generators for scaffolding forms, tables, and GraphQL operations, and flexible storage backends (AWS S3, Cloudflare R2, Backblaze B2).
    • Security & Compliance: Fine-grained RBAC (Role-Based Access Control), comprehensive activity logs with field-level change tracking, and cross-origin cookie support for separate frontend/backend domains.
  5. Overview of Core Services

    master

    The architecture consists of three primary services:

    1. Web Application: A React/TypeScript/Vite frontend using Apollo Client for GraphQL state management and shadcn/ui (via webapp-core) for components.
    2. Backend API: A Django-based service using Graphene for GraphQL, PostgreSQL for data, and JWT for authentication. The admin panel is accessible at admin.localhost:5001 during local development.
    3. Async Workers: Handles background tasks. Locally, this uses Celery with a Redis broker. In production, it uses AWS Lambda triggered by EventBridge.
  6. Overview of In-app Notifications

    master

    The SaaS Boilerplate includes a built-in in-app notification system designed to inform users of important updates and actions.

    Key features include:

    • Notification Icon: A visual indicator in the top right corner of the application that shows unread notification counts.
    • Notification List: A customizable list view where users can view notifications and mark all as read.
    • Real-time Updates: The notification status and list are synchronized in real-time using GraphQL subscriptions over WebSocket communication.
  7. Overview of Infrastructure & DevOps Features

    master

    The boilerplate provides built-in infrastructure and DevOps capabilities:

    • Infrastructure as Code (IaC): AWS CDK-based infrastructure definitions for reproducible, version-controlled deployments.
    • CI/CD Pipeline: Automated testing, building, and deployment via GitHub Actions or BitBucket Pipelines.
    • Async Workers: Celery-based background job processing for emails, webhooks, and heavy computations.
    • GraphQL API: Type-safe API featuring automatic TypeScript code generation and Apollo Client integration.
  8. Overview of Enterprise SSO capabilities

    master

    The SaaS Boilerplate provides a comprehensive Enterprise SSO solution including:

    • SAML 2.0: Industry-standard protocol (Okta, Azure AD, OneLogin).
    • OpenID Connect (OIDC): Modern OAuth-based SSO.
    • SCIM 2.0: Automated user provisioning and directory synchronization.
    • Just-in-Time (JIT) Provisioning: Automatic user creation upon first SSO login.
    • Group-to-Role Mapping: Mapping IdP groups to tenant roles.
    • Session Management: Viewing and revoking active sessions.
    • Device Management: Tracking and managing trusted devices.
    • WebAuthn/Passkeys: Passwordless authentication using biometrics or security keys.
  9. Overview of SaaS Boilerplate

    master

    SaaS Boilerplate is a production-ready codebase designed to accelerate SaaS development by providing battle-tested components for common functionalities. It uses a modular monorepo architecture that separates concerns across Frontend, Backend, Infrastructure, and Integrations.

    Architecture & Technology Stack

    Frontend

    • Technologies: React 19, TypeScript, GraphQL, Apollo Client, shadcn/ui, Tailwind CSS.
    • Focus: Modular monorepo structure with accessible UI components.

    Backend

    • Technologies: Python, Django, Graphene (GraphQL), Celery, PostgreSQL, Redis.
    • Focus: GraphQL API, built-in admin panel, and async task processing.

    Infrastructure & DevOps

    • Technologies: AWS (ECS, RDS, S3, CloudFront), Docker, AWS CDK, GitHub Actions / BitBucket Pipelines, Sentry.
    • Focus: Infrastructure as Code (IaC), automated CI/CD pipelines, and production-ready deployment.

    Integrations

    • Pre-built services: Stripe, Contentful, OpenAI, and Sentry.