Introduction
Everything you need to run a SaaS app - auth, billing, workspaces, permissions, and more.
BuildBase is SaaS infrastructure in one SDK. Authentication, billing, workspaces, permissions, email, workflow automation, tracking and more: 20 modules, integrated and production-ready.
Note
Want to see it in action before reading docs? Try the live demo app.
Tip
Using Claude Code? Install the BuildBase Claude skill and Claude can do the integration for you. Starting from scratch? Clone the Next.js starter, which already has everything on this page wired in.
SaaSOSProvider
Every BuildBase app starts with SaaSOSProvider - the root context provider that connects your React app to the BuildBase platform. "SaaS OS" stands for SaaS Operating System: the infrastructure layer your product runs on. Wrap your app once, and every hook and component in the SDK has access to your org, auth state, workspace, and permissions.
npm install @buildbase/sdkimport { ApiVersion } from '@buildbase/sdk';
import { SaaSOSProvider } from '@buildbase/sdk/react';
import '@buildbase/sdk/css';
export default function Providers({ children }) {
return (
<SaaSOSProvider
serverUrl="https://api.console.buildbase.app"
version={ApiVersion.V1}
orgId="your-org-id"
auth={{
clientId: 'your-client-id',
redirectUrl: 'http://localhost:3000/callback',
}}
locale="en"
>
{children}
</SaaSOSProvider>
);
}import {
useSaaSAuth,
WhenAuthenticated,
WhenUnauthenticated,
} from '@buildbase/sdk/react';
function App() {
const { user, signIn, signOut } = useSaaSAuth();
return (
<>
<WhenUnauthenticated>
<button onClick={() => signIn()}>Sign In</button>
</WhenUnauthenticated>
<WhenAuthenticated>
<p>Welcome, {user?.name}</p>
<button onClick={signOut}>Sign Out</button>
</WhenAuthenticated>
</>
);
}What's included
20 modules, all in the same SDK and console:
| Module | What you get |
|---|---|
| Authentication | Email, phone, social, passkey, wallet, and API token authentication. |
| Billing & Subscriptions | Subscriptions, trials, credits, usage metering, and invoicing via Stripe. |
| Email Campaigns | Campaign builder with templates, tracking, and compliance tools. |
| Workflow Automation | Event-driven automation with a visual builder and conditional logic. |
| Multi-Tenant Workspaces | Isolated workspaces with independent data, billing, and settings. |
| SDK & API | TypeScript SDK with React hooks, components, and server functions. |
| User & Audience Management | User profiles, smart lists, and attribute-based audience segmentation. |
| Access Control (RBAC) | Role-based permissions at the org and workspace level. |
| Credits & Usage Metering | Credit packs, a transaction ledger, expiry, and per-plan quotas with overage billing. |
| Feature Flags | Plan-tied workspace flags and user flags targeted by user, list or tag. |
| Push Notifications | Web push with VAPID keys generated for you, device subscriptions and campaign delivery counts. |
| Forms & Data Collection | Forms on a collection schema, with a public submit endpoint and workflow triggers on submission. |
| Content Management | Blog posts, docs, FAQs, testimonials, and reusable rich-content blocks. |
| Analytics & Reporting | User growth, email performance, click trends and geographic data. |
| Tracking & Tags | Analytics and ad tags configured in the console, installed by the SDK. |
| Webhooks & Events | 129 subscribable events with signatures, retries and delivery logs. |
| Short Links | Short links you can repoint, with a click log and destination safety checks. |
| Collections & Custom Data | Custom data schemas with versioned records and a token-authenticated REST API. |
| Slack & Team Notifications | Slack alerts for signups, payments, and workflow events. |
| Assets & Media | Image uploads with captured dimensions and public or private URLs. |
Across every module, the SDK also ships:
| Feature | What you get |
|---|---|
| Pre-built UI | Drop-in settings screens and page components |
| Internationalization | 8 locales with RTL support |
| Server SDK | Node.js SDK for backend operations |
Which docs do I need?
Most SaaS builders only need the SDK README on npm. It covers installation, all hooks, components, and pre-built UI - everything you need to ship.
These docs go deeper into patterns, composition, and server-side integration for teams with custom requirements.
| I want to... | Go to |
|---|---|
| Get started fast | SDK README |
| Understand a specific feature | These docs (see table above) |
| Check the full API | API Reference |
| Fix an issue | Troubleshooting |
Next Steps
- Installation - Install the SDK and configure the provider.
- Claude skill - Let Claude Code do the integration, or start from a starter repo.
- Quickstart - Build a working app with auth in 5 minutes.
- SDK README - Full API reference on npm.