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, and workflow automation — integrated and production-ready.
Note
Want to see it in action before reading docs? Try the live demo app.
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
| Feature | What you get |
|---|---|
| Authentication | Sign-in, sign-out, social login, magic links |
| Workspaces | Multi-tenant workspaces with member management |
| Billing | Subscription plans, checkout, trials, seats |
| Credits | Consumption-based billing with balance tracking |
| Permissions | Role-based access control |
| Feature Flags | Gate features by plan or user |
| Pre-built UI | Drop-in settings screens and page components |
| Webhooks | Real-time event notifications |
| Push Notifications | Browser push notifications |
| 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.
- Quickstart — Build a working app with auth in 5 minutes.
- SDK README — Full API reference on npm.