T
Tetra
Now on npm — @soulbatical/tetra-core

The SaaS framework
for Node.js

Auth, billing, database security, UI components, and developer tooling. One npm install. Build your SaaS on a secure foundation — whether you code it yourself or let AI do the work.

npm install @soulbatical/tetra-core
215+
Unit tests
20+
UI components
12
Security checks
0
Network calls for license

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-core/billing';

const billing = new BillingService(config);
// POST /checkout, POST /webhook/stripe
// Subscription lifecycle managed automatically

UI 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 box

Dev toolkit

Security audit, migration lint, test scaffolding, smoke tests. CI-ready.

npx tetra-audit          # 12 security checks
npx tetra-migration-lint # SQL safety
npx tetra-init-tests     # scaffold test suite
npx tetra-smoke --url https://your-app.com

Free to start. Grows with you.

First 10 users free. After that, pay per seat. Volume discounts as you grow. No feature gates — you always get the full framework.

€3,90/user/month

Starting price. Drops to €0,90 at 500+ users.

See full pricing

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. First 10 users are on us.

npm install @soulbatical/tetra-core
npx create-tetra-app my-saas