Build guides
Step-by-step walkthroughs for shipping real features with @buildbase/sdk.
35 posts · page 1 of 3
Multi-tenant workspaces in Express, Hono and Fastify: one middleware that checks membership
Multi-tenant workspaces in Express, Hono and Fastify: take the workspace from the path, then refuse any user who is not a member, in one middleware.
Multi-tenant Remix: put the workspace in the URL, and check membership before any loader runs
Multi-tenant workspaces in Remix and React Router v7 or v8: the workspace lives in the URL, and one membership check runs before any loader can fetch.
Usage-based billing in React Router (Remix): meter in the action, never the loader
Usage-based billing in React Router (Remix): record usage in the action, not the loader, and key each form render so a retried submit bills once.
Usage metering middleware in Express: record before the handler or after the response (Hono and Fastify too)
Usage metering middleware for Express, Hono and Fastify: when to record before the handler, when to batch after the response, and the rate limit that decides it.
BuildBase on Astro: one middleware for sign-in, roles and API tokens
Astro middleware authentication with roles: one onRequest gate where admins and editors write, viewers read, strangers bounce and machines use a token.
BuildBase on Express: add authentication to an existing app and keep req.user
Add authentication to an existing Express app: hosted sign-in, a callback route, and express-session, with req.user and every protected route left untouched.
BuildBase on Fastify: authentication as a decorator plugin, tests included
Fastify authentication as a decorator plugin: hosted sign-in, @fastify/session, unchanged role checks, a fake for tests, and credits metered per request.
BuildBase on Hono: authentication and billing on Workers, Bun, Deno and Node
Hono authentication with no user table: hosted sign-in, a signed-cookie session you can still revoke, and metered credits, in one app on Node, Bun, Deno and Workers.
BuildBase on NestJS: authentication without Passport, JWTs or a refresh table
NestJS authentication without Passport or JWTs: one guard reads a Bearer session ID, RolesGuard keeps working, and ending a session actually ends it.
BuildBase on Next.js: add auth, teams and billing to the app you already have
Add auth, teams and billing to an existing Next.js app: the setup, getting the session to server components, and three popular templates swapped over.
BuildBase on React Router (Remix): hosted sign-in, your own session, no loader changes
React Router v7 authentication with hosted sign-in: a login action, a callback route that swaps the code, and your own session, so no loader changes.
BuildBase on TanStack Start: hosted sign-in without replacing better-auth
TanStack Start authentication for apps already on better-auth: add BuildBase as a better-auth plugin and keep your sessions, roles and server-function checks.