The SaaS framework
for Node.js
Auth, billing, database security, UI components, and developer tooling. One dependency in your own project. Build your SaaS on a secure foundation — whether you code it yourself or let AI do the work.
npx create-tetra my-app
# Confirms who you are in your browser, then configures
# the registry, your licence and the project for you.AI builds fast. Security doesn't keep up.
Vibe-coded SaaS apps look great but score 1.5/10 on security. Exposed credentials, missing RLS, open signups, no rate limiting. Tetra fixes this structurally — not per bug, but by architecture.
Without Tetra
- Combine Clerk + Stripe + Supabase + MUI + custom middleware
- 69 hardcoded service_role keys across the codebase
- No RLS on any table — anyone can read everything
- 98 serverless functions without auth checks
- ~$150+/month for 5+ separate services
With Tetra
- One import: createApp() sets up everything
- DB client hierarchy prevents credential exposure
- RLS generator + audit for every table
- Auth middleware on every route by default
- Starts free, scales with your users
Everything your SaaS needs
Not a boilerplate you download and forget. A living framework that updates, patches, and grows with your application.
App bootstrap
Express app with security defaults: CORS, CSP, rate limiting, helmet. One line.
import { createApp } from '@soulbatical/tetra-core';
const app = createApp({ name: 'my-saas' });Database security
Six access levels. Never expose a service_role key in user-facing code again.
import { publicDB, userDB, adminDB, systemDB }
from '@soulbatical/tetra-core';
// Public: anonymous access (RLS enforced)
// User: authenticated user's own data
// Admin: organization-wide access
// System: cron jobs, webhooks (bypasses RLS)Auth middleware
JWT validation, role-based access, OAuth providers. Drop-in Express middleware.
import { authenticateToken, requireRole }
from '@soulbatical/tetra-core';
router.get('/admin', authenticateToken, requireRole('admin'),
(req, res) => { /* only admins reach here */ }
);Billing
Stripe + Mollie. Checkout, webhooks, subscriptions, invoices. Works with iDEAL.
import { BillingService }
from '@soulbatical/tetra-billing';
const billing = new BillingService(config);
// POST /checkout, POST /webhook/stripe
// Subscription lifecycle managed automaticallyUI components
20+ React components built for SaaS: tables, forms, layouts, modals. Themeable.
import { FeatureTable } from '@soulbatical/tetra-ui/table';
import { ListDetailLayout }
from '@soulbatical/tetra-ui/components';
// Config-driven: define columns, filters, actions
// Mobile-responsive out of the boxDev toolkit
Row level security, migration safety, toolchain and test-coverage checks. CI-ready.
npx tetra-check-rls # row level security policies
npx tetra-migration-lint # migration safety
npx tetra-toolchain-check # project configuration
npx tetra-test-governance # test coverage contractsFree while you build. Grows with you.
Building costs nothing, and so does working alone. From there, fixed steps that follow how big your application gets — no feature gates, you always get the full platform.
1 user on your live application
Not live yet501+
Built for AI-driven development
One framework fits in one context window. AI agents write better code when they only need to learn one API, not five. Tetra is designed to be the default foundation that AI tools choose.
Vibe coders
“Make me a SaaS” — and it's actually secure. No architecture decisions needed.
AI agents
Claude Code, Cursor, Bolt: one import, one pattern, fewer mistakes. Context window friendly.
Developers
Skip the plumbing. Focus on your product logic, not auth middleware and billing webhooks.
Start building today
Install Tetra, create your app, ship to production. Building costs nothing — you pay when it goes live.
npx create-tetra my-app