everystack-backend

Enforce Drizzle ORM patterns for multi-tenant PostgreSQL backend services.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/stevenandteresa-maker/EveryStack --skill everystack-backend
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: everystack-backend
Source: https://github.com/stevenandteresa-maker/EveryStack/tree/main/docs/skills/backend
Command: npx skills add https://github.com/stevenandteresa-maker/EveryStack --skill everystack-backend

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) and scripts (resource) components.

What problem does it solve?

This Skill provides a comprehensive set of conventions and patterns for backend development within the EveryStack multi-tenant SaaS platform, ensuring consistency, maintainability, and adherence to best practices.

Core Features & Use Cases

  • Database Schema & Access: Enforces Drizzle ORM patterns for PostgreSQL, including UUIDv7 primary keys, tenant isolation columns, and canonical JSONB storage.
  • Migrations & RLS: Guides the creation of safe, zero-downtime migrations and robust Row-Level Security policies.
  • Testing & Error Handling: Mandates tenant isolation testing, use of test factories, and structured error reporting with Zod validation.
  • Sync Engine & CockroachDB: Outlines patterns for the sync engine and essential safeguards for CockroachDB compatibility.
  • Use Case: When developing a new feature that involves storing tenant-specific user data, this Skill will guide the creation of the Drizzle schema, ensure the tenant_id column is present, set up the necessary RLS policy, and dictate how data access functions should be written and tested.

Quick Start

Use the everystack-backend skill to define a new Drizzle schema for user profiles, ensuring it includes a tenant_id and uses UUIDv7 for the primary key.

Frequently Asked Questions about everystack-backend

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I set up multi-tenant database schemas with Drizzle ORM and PostgreSQL?

Multi-tenant database schemas with Drizzle ORM require UUIDv7 primary keys, tenant isolation columns, and canonical JSONB storage. This approach enforces consistent data access and secure operations across all backend services for SaaS platforms.

What is the best way to enforce tenant isolation in PostgreSQL for a multi-tenant SaaS?

Tenant isolation in PostgreSQL is enforced using Row-Level Security policies alongside mandatory tenant_id columns in your schema. This ensures data segregation and secure operations across all backend services.

How do I create safe, zero-downtime database migrations for CockroachDB compatibility?

Safe, zero-downtime database migrations require following specific patterns and essential CockroachDB compatibility safeguards. This ensures robust schema changes without disrupting multi-tenant backend operations.

Does CockroachDB support Row-Level Security policies for tenant isolation?

CockroachDB compatibility safeguards are required when implementing Row-Level Security policies for tenant isolation. The Skill enforces specific patterns to ensure RLS policies function correctly across PostgreSQL and CockroachDB environments.

How do I test tenant isolation and data access patterns in a multi-tenant backend?

Testing tenant isolation requires using test factories and structured error reporting with Zod validation. This methodology mandates verifying that data access functions maintain strict tenant boundaries.

Why do I need UUIDv7 primary keys in a multi-tenant PostgreSQL schema?

UUIDv7 primary keys are required in multi-tenant PostgreSQL schemas to ensure consistent data access and maintainable code. They provide time-ordered unique identifiers that support distributed database operations.