Skip to main content
友田 陽大

Category

データベース・RLS(Supabase / Postgres / 認可)の設計ガイド

データ層は、認可と整合性を「アプリの善意」ではなくDBの制約で守る場所です。PostgreSQLの行レベルセキュリティ(RLS)で認可をDBに寄せ、pgTAPで退行を止め、型安全なORMでスキーマと型を一致させる。マルチテナントのデータ分離まで、信頼境界をサーバー側に置く設計を扱います。DynamoDBに特化した設計(シングルテーブル・コスト・Streams・Global Tables・セキュリティ)は『DynamoDB』クラスタに、PostgreSQL本体のパフォーマンスチューニング・インデックス・EXPLAIN・MVCC/VACUUM・JSONB・パーティショニングは『PostgreSQL本体・性能設計』クラスタに、Prismaに特化した設計(v7のRustフリー化・driver adapters・スキーマ/リレーション設計・Migrate運用・パフォーマンス・技術選定・移行)は『Prisma』クラスタにまとめています。

14 articles in total

Foundational guide

Foundational guide (start here)

Supabase
PostgreSQL
RLS
Next.js
TypeScript

[2026 Edition] Supabase Production Operations Guide: Implementing Next.js × RLS × Realtime × Edge Functions per the Official Docs

Take Supabase from 'it works for now' to 'it withstands production.' Faithful to the official docs (as of 2026-06-24), a practical guide systematizing — with real code and decision criteria — Next.js 16 auth via @supabase/ssr, the correct way to write RLS and its performance optimization, getClaims and JWT signing keys, Realtime Broadcast, Edge Functions (withSupabase), Storage, and pgvector.

25 min read

Related practical articles