v0.7.0 Workflows + Webhooks + Custom Endpoints 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, and the automation engine handles webhooks, workflows, and custom endpoints without writing backend code.

GitHub stars
1,161 tests
23+ SDK services
26 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,
});
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.

STACK

Built for regulated multi-tenant SaaS

Your Product
React / Vue / Svelte Internal Tools Agent Workflows
SDK Layer
@snackbase/sdk @snackbase/react Typed Service Clients
API Surface
/api/v1/{collection} /api/v1/auth/* /api/v1/webhooks/* /api/v1/x/{endpoint}
SnackBase Engine
Rules → SQL Workflow Automation Hook System v1.0 Background Job Queue Audit Integrity Chain
Storage Layer
PostgreSQL MySQL SQLite (dev)
QUICKSTART

From clone to running instance

Clone
git clone https://github.com/lalitgehani/snackbase.git
Install
cd SnackBase && uv sync
Initialize
uv run python -m snackbase init-db
Serve
uv run python -m snackbase serve --reload
// NEXT STEP

Ship product logic, not backend plumbing.

SnackBase gives you startup velocity with enterprise controls: collection rules, multi-account isolation, immutable audit history, and a built-in automation engine for webhooks, workflows, and custom endpoints.