Back to list
nextblock-cms

database-management

by nextblock-cms

The open-source core of NextBlock CMS. A high-performance, developer-first CMS built with Next.js 15, Supabase, and Tailwind. Features a Notion-style block editor, native multi-language support, and perfect Lighthouse scores. The modern alternative to WordPress.

3🍴 0📅 Jan 14, 2026

SKILL.md


Database Management (Supabase)

1. Core Workflow

  • Environment: We use Supabase (PostgreSQL + Auth).
  • Local Config: supabase/config.toml manages local settings.
  • Env Vars: Ensure .env.local is populated with valid Supabase credentials.

2. Key Commands

  • Push Migrations: npm run db:push
    • This pushes schema changes to the remote Supabase instance.
    • It also pushes the local configuration.
  • Link Database: npm run db:link
    • Links the local development environment to the remote Supabase project.
  • Generate Types: npm run db:types
    • Generates TypeScript definitions from the database schema. Run this after every schema change.
  • Deploy: npm run deploy:supabase
    • Deploys migrations and config (often used in CI/CD).

3. Schema Management

  • Migrations: SQL migrations are located in libs/db/src (or supabase/migrations depending on the exact setup - check supabase/config.toml workdir).
  • Validation: Always verify schema changes locally before pushing to production.

4. Troubleshooting

  • CSP/Connection Issues: If the build fails to connect to Supabase, check the Content Security Policy (CSP) headers in next.config.js or middleware.ts.
  • Url Sync: Ensure NEXT_PUBLIC_URL matches your site_url in Supabase config to prevent redirect issues with auth.

Score

Total Score

70/100

Based on repository quality metrics

SKILL.md

SKILL.mdファイルが含まれている

+20
LICENSE

ライセンスが設定されている

+10
説明文

100文字以上の説明がある

+10
人気

GitHub Stars 100以上

0/15
最近の活動

3ヶ月以内に更新がある

0/10
フォーク

10回以上フォークされている

0/5
Issue管理

オープンIssueが50未満

+5
言語

プログラミング言語が設定されている

+5
タグ

1つ以上のタグが設定されている

0/5

Reviews

💬

Reviews coming soon