Database & Drizzle ORM
Firebreak uses PostgreSQL hosted on Neon Serverless as its authoritative persistence engine, accessed through Drizzle ORM for compile-time type safety.
4 min read
•Production Verified
Serverless Connection Pooling
Using @neondatabase/serverless over secure WebSockets (wss://), Firebreak multiplexes thousands of incoming queries from serverless functions across a managed pool, preventing connection exhaustion.
Relational Entity Map
The schema defines 17 tables organized into clear functional domains:
PostgreSQL Relational Schema: Workspaces, Integrations, Services, Telemetry, and Mitigation Actions
Table Inventory Overview
| Category | Tables | Primary Purpose |
|---|---|---|
| Identity & Tenancy | user, session, account, workspaces, workspace_members | Authentication (Better Auth), multi-tenant organization boundaries. |
| Integrations | github_installations, vercel_connections | AES-256-GCM encrypted tokens for GitHub App and Vercel. |
| Telemetry | services, alerts | Monitored production apps and incoming raw error payloads. |
| Incidents & Mitigation | incidents, suspects, analyses, actions, probes, timeline_events | State machine tracking active outages, ranked culprit commits, staged proposals, canary probes, and immutable audit logs. |
| Auxiliaries | mcp_api_keys, processed_webhooks, email_deliveries | Hashed API keys for AI agents, webhook dedup, and Resend audit logs. |