v0.13.3 Functions + Encrypted Fields + Embeddable AGPLv3

Build like a startup. Comply like an enterprise. Own your backend.

SnackBase is an open-source Python backend for multi-tenant products that need real controls. Rules compile to SQL, audit trails are immutable, fields can be encrypted, and tenants can deploy their own Python functions. Run it as a server or embed it in your own Python app.

Get product updates

— GitHub stars
2,600+ tests
25 SDK services
30 API routers
sdk-example.ts
import { SnackBaseClient } from '@snackbase/sdk';

const sb = new SnackBaseClient({
  url: 'https://api.yourapp.com',
  token: session.token,
});

// Collection-centric records API with automatic tenant scoping
const { items, total } = await sb.records.list('products', {
  filter: { active: true },
  sort:   ['-created_at'],
  perPage: 20,
});
// → { items: Product[], total: 847 }

const order = await sb.records.create('orders', {
  product_id: items[0].id,
  quantity:   3,
});
// → rules enforced + audit captured + webhooks fired

// Trigger a workflow manually
await sb.workflows.trigger('wf-order-processing', {
  order_id: order.id,
});

// Invoke a tenant-deployed Python function
const result = await sb.functions.invoke('send-invoice');
CAPABILITIES

Why SnackBase is different

POST /api/v1/{collection}

Collection-Centric APIs

Define a collection once and ship CRUD APIs with filtering, pagination, and validation already wired.

account_id /* auto scoped */

Shared-Table Multi-Tenancy

One physical table per collection, many tenant accounts, and automatic row-level isolation at every layer.

checksum + previous_hash

Immutable Audit Chain

Column-level audit events are append-only and hash-linked for traceability, GxP, and CFR-style workflows.

list_rule: "@owns_record()"

SQL-Compiled Rules

Collection rules compile into SQL WHERE clauses for row-level and field-level access without policy boilerplate.

trigger → condition → action

Workflow Automation

Webhooks, API-defined hooks, multi-step workflows, and custom endpoints — all configurable via API, no backend code.

/api/v1/x/{your-slug}

Custom Endpoints

Define serverless-like HTTP endpoints that execute action pipelines with query, aggregate, and transform steps.

on_record_before_create

Stable Hook API v1.0

33+ lifecycle events with priority ordering and abort support so you can extend behavior without forking core.

/api/v1/auth/*

Enterprise Auth Surface

Email/password, OAuth, SAML, API keys, and multi-account users are built in for real production requirements.

NEW IN v0.8 – v0.13
/api/v1/f/{account}/{slug}

SnackBase Functions

Deploy multi-file Python handlers per tenant with versioned releases, isolated virtual environments, write-only secrets, and an in-browser editor.

encrypted: true

Encrypted Fields

Fernet-encrypt text and JSON fields at rest. Values stay redacted in normal responses and are revealed only to API keys with the records:secrets:read scope.

snackbase backup create

Backup and Restore

Instance-level archives to local disk or S3 with cron schedules, retention, key-fingerprint checks on restore, and a CLI that works without a running server.

pip install snackbase

Embeddable Runtime

Mount SnackBase inside your own Python app and call it in-process. Every request still passes routing, auth, collection permissions, and audit logging.

pip install snackapp

SnackApp

A Python app framework with SnackBase embedded. Declare collections, write pages as Python modules, and run a multi-user app from one process.

sb.codelists.getValues()

Codelists

Operator-managed value lists with per-account overrides, import and export, and validation on record fields.

POST /api/v1/migrations/plan

Declarative Migrations

Diff a declared schema against live collections, review destructive changes, then generate and apply an Alembic revision.

SNACKBASE_PLATFORM_ISSUER

Platform OIDC and Cloud Studio

Accept RS256 or ES256 tokens from a trusted issuer, including your own OIDC provider. Unset by default, so nothing changes until you opt in.

SECURITY

Hardened, tested, and audited

VAPT REMEDIATION

Every Critical, High, and Medium finding fixed

v0.11.0 closed all findings from the 2026-08-09 penetration test and shipped a dedicated security test suite.

TENANT ISOLATION

Tenant takeover paths closed

OAuth state is server-generated, SAML flow context is single-use and server-side, and new members never join as admin.

SECRETS

Encrypted at rest, redacted by default

Encrypted fields, webhook signing secrets, and function secrets are never returned in plaintext through normal APIs.

EGRESS

SSRF-safe outbound requests

Webhooks, functions, and automation actions share one policy: address validation, connection pinning, and no redirects.

ABUSE CONTROL

Rate limiting on by default

Login throttling and rate limits key on the real client address behind trusted proxies instead of one shared bucket.

RECOVERY

Verified backups

Archives carry a manifest with key fingerprints. Restore refuses a mismatched encryption key before touching data.

ACCESS CONTROL

Automation gated to admins

Hooks, endpoints, webhooks, and workflows need an account admin. Expanded references enforce the target collection view rules.

DEPENDENCIES

Clean dependency audits

pip-audit reports no known vulnerabilities, and npm audit passes at the high level as of v0.13.1.

AI AND AGENTS

Built to work with your tools and your agents

@snackbase/mcp

MCP Server

Let Claude, Cursor, and other MCP clients query data and manage users, webhooks, workflows, and endpoints through API-key authentication.

@snackbase/skills

Agent Skills

An Agent Skills package that teaches coding agents to use the SDK for auth, records, collections, automation, realtime, and access control.

create-snackbase-app

Scaffolding

Start a new project from the command line with the SDK wired in.

supabase-compat · pocketbase-compat

Compat SDKs

Compatibility layers for moving existing Supabase and PocketBase client code onto SnackBase.

app.* on SnackBase Cloud

AI App Builder

Chat-driven app building on Cloud projects, with live preview sandboxes and production deploys.

STACK

Built for regulated multi-tenant SaaS

Your Product
React / Vue / Svelte Internal Tools Agent Workflows Embedded Python App
SDK Layer
@snackbase/sdk @snackbase/react @snackbase/mcp Supabase / PocketBase compat In-process Python client
API Surface
/api/v1/{collection} /api/v1/auth/* /api/v1/webhooks/* /api/v1/x/{endpoint} /api/v1/f/{account}/{fn}
SnackBase Engine
Rules → SQL Workflow Automation Functions Runtime Encrypted Fields Hook System v1.0 Background Job Queue Audit Integrity Chain Backup + Restore
Storage Layer
PostgreSQL MySQL SQLite S3 (files + backups)
QUICKSTART

From install to running instance

Install
pip install snackbase
Initialize
python -m snackbase init-db
Serve
python -m snackbase serve
Open the admin panel
open http://localhost:8000/_/
Run from source instead
git clone https://github.com/lalitgehani/SnackBase.git && cd SnackBase
uv sync && (cd ui && npm install)
cp .env.example .env
uv run python -m snackbase init-db
uv run python -m snackbase serve --reload

Requires Python 3.14, Node.js 18+, and uv. See the full quickstart.

WHAT'S NEW

Recent releases

v0.13.3 Nov 2026

Security patch

Closes OAuth and SAML tenant takeover, expand-reference bypass, and automation data exposure.

v0.13.0 Sep 2026

Embeddable SnackBase

PyPI install, in-process client, admin panel at /_/, user fields, declarative migrations.

v0.12.0 Sep 2026

Backup and restore

Local and S3 destinations, cron schedules, CLI, and default-on rate limiting.

v0.11.0 Aug 2026

Security and platform

VAPT remediation, trusted-issuer OIDC auth, Cloud Studio, and Python 3.14.

v0.10.0 Aug 2026

SnackBase Functions

Tenant-deployed Python handlers with versioned deployments and a built-in editor.

v0.9.0 Aug 2026

Encrypted fields

Field-level encryption, encrypted webhook secrets, and scoped secret reveal.

// NEXT STEP

Ship product logic, not backend plumbing.

SnackBase gives you startup velocity with enterprise controls: collection rules, multi-account isolation, immutable audit history, encrypted fields, tenant Functions, and a built-in automation engine.