← Back to Projects

01

SendStack Email API

Multi-tenant email infrastructure in Go

PostgreSQLRLSREST APIMulti-tenant

!The Problem

Most email APIs offer no true multi-tenancy — they filter data at the app layer, which is vulnerable to bugs and leakage. Organizations building SaaS products need guaranteed data isolation at the lowest level possible.

✓The Solution

SendStack enforces tenant isolation using PostgreSQL Row-Level Security (RLS) — the same pattern used by Supabase. Each tenant's data is physically separated at the database layer, not just filtered in queries. A unified provider abstraction layer means tenants can switch email providers without changing their integration.

Stack & Why Each Technology

PostgreSQL

Selected over MongoDB because RLS (Row-Level Security) is a PostgreSQL-native feature that enables true database-layer multi-tenancy — impossible to replicate cleanly in document databases.

Row-Level Security (RLS)

Enforces data isolation at the database layer rather than the application layer, eliminating an entire class of data leakage bugs common in multi-tenant apps.

REST API

Simple, well-understood interface that integrates easily with any language or framework a tenant might use.

Key Features

  • —Multi-tenant architecture via PostgreSQL RLS
  • —Unified email provider abstraction (SendGrid, Mailgun, SMTP)
  • —API key authentication with scoped permissions
  • —Per-tenant rate limiting
  • —Email delivery logging and status tracking
  • —Tenant provisioning endpoints

Tech Stack

PostgreSQLRLSREST APIMulti-tenant

Next →

Givitec CBT Platform