Example
Todo App
Auth · REST API · Realtime — built with @motherbase/ui and @motherbase/client
Todo App
Sign in to scope your own todos
Sign in above to view and manage your todos.
'use client'
import { MotherbaseProvider } from '@motherbase/ui'
import { getBrowserClient } from '@/lib/motherbase/browser'
// One provider at the root: every component below reads the session from context.
export function Providers({ children }) {
return <MotherbaseProvider client={getBrowserClient()}>{children}</MotherbaseProvider>
}
// Anywhere below — no props to pass down:
const user = useUser()Backend setup
Add the Todo model to your Motherbase project and add an owner-scoped RLS policy so each signed-in user sees only their own rows.
