Skip to content

Commit 97183fa

Browse files
committed
chore: update supabase config, docs, deps, and security overrides
1 parent f89bca4 commit 97183fa

File tree

8 files changed

+139
-134
lines changed

8 files changed

+139
-134
lines changed

apps/api/README.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ Type-safe REST API built with Fastify & OpenAPI. Routes in `src/routes/` are the
66

77
Start database first (`pnpm db:start`), then `pnpm dev`. Uses Supabase CLI for PostgreSQL, or `PGLITE=true` for in-memory. Dev server at [http://localhost:3000](http://localhost:3000).
88

9+
**Switching project_id:** If you change `project_id` in `supabase/config.toml` (e.g. after a rebrand), run `pnpm db:stop` before `pnpm db:start`—only one Supabase instance runs per host.
10+
911
## Vercel
1012

1113
Uses `framework: "fastify"` in vercel.json. Vercel auto-detects `server.ts` as the entrypoint. PostgreSQL migrations run at build time; PGLite migrations run at runtime.
@@ -30,9 +32,9 @@ Copy `.env.test.example` to `.env.test` (gitignored) for unit tests. Vitest load
3032
- `pnpm test:e2e:debug` — Debug E2E tests
3133
- `pnpm checktypes` — Type-check
3234
- `pnpm db:start` — Start Supabase (local)
33-
- `pnpm db:stop` — Stop Supabase
34-
- `pnpm db:reset` — Reset Supabase database (recreates from scratch)
35-
- `pnpm db:reset-and-migrate` — Reset DB then run Drizzle migrations
35+
- `pnpm db:stop` — Stop Supabase (run before switching to another project’s Supabase)
36+
- `pnpm db:reset` — Reset Supabase database (drops and recreates; no Supabase seed.sql)
37+
- `pnpm db:reset-and-migrate` — Reset DB, then run Drizzle migrations. Seeding via Drizzle (no Supabase seed.sql)
3638
- `pnpm db:migrate` — Run migrations (skips when PGLITE=true; use `RUN_PG_MIGRATE=true` to force PostgreSQL)
3739
- `pnpm db:generate` — Generate migrations from schema
3840
- `pnpm db:push` — Push schema (dev only)

apps/api/supabase/config.toml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# https://supabase.com/docs/guides/local-development/cli/config
33
# A string used to distinguish different Supabase projects on the same host. Defaults to the
44
# working directory name when running `supabase init`.
5-
project_id = "basilic-fastify"
5+
project_id = "basilic-api"
66

77
[api]
88
enabled = true
@@ -59,10 +59,8 @@ schema_paths = []
5959

6060
[db.seed]
6161
# If enabled, seeds the database after migrations during a db reset.
62-
enabled = true
63-
# Specifies an ordered list of seed files to load during db reset.
64-
# Supports glob patterns relative to supabase directory: "./seeds/*.sql"
65-
sql_paths = ["./seed.sql"]
62+
# Disabled — seeding via Drizzle (db:reset-and-migrate, seed script)
63+
enabled = false
6664

6765
[db.network_restrictions]
6866
# Enable management of network restrictions.

apps/docu/content/docs/adrs/008-database.mdx

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,16 @@ All platforms use the same build command pattern:
192192
- **Railway/Fly.io/Render**: `build: pnpm build` (runs migrations)
193193
- **Local dev**: PostgreSQL migrations run at build time (via `pnpm dev``pnpm db:migrate`), PGLite migrations run at runtime
194194

195+
### Local database reset (Supabase + Drizzle)
196+
197+
For local Postgres via Supabase CLI (`project_id: basilic-api` in `apps/api/supabase/config.toml`):
198+
199+
1. **`pnpm db:reset`** — Drops and recreates the Supabase database. Supabase seeds are disabled; no `seed.sql` is used.
200+
2. **`pnpm db:reset-and-migrate`** — Reset, then run Drizzle migrations. Use this for a fresh schema.
201+
3. **Seeding** — Via Drizzle (seed script if configured), not Supabase `seed.sql`.
202+
203+
Run `pnpm db:stop` before switching to another project's Supabase instance (e.g. different repo); only one Supabase runs per host.
204+
195205
### Key Benefits
196206

197207
- **Host-agnostic**: No platform-specific code, standard npm scripts work everywhere

apps/docu/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
"fumadocs-ui": "16.6.0",
2323
"lucide-react": "^0.564.0",
2424
"mermaid": "^11.12.2",
25-
"next": "16.1.6",
25+
"next": "16.1.7",
2626
"next-themes": "^0.4.6",
2727
"react": "^19.2.4",
2828
"react-dom": "^19.2.4",

apps/web/.env.development

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,6 @@ LOG_ENABLED=true
99
LOG_LEVEL=debug
1010

1111
# Google One Tap (client-side). Same value as Fastify GOOGLE_CLIENT_ID.
12-
NEXT_PUBLIC_GOOGLE_CLIENT_ID=767744818103-5vme8soap4h1p6hmactlv4gr54n0qvbd.apps.googleusercontent.com
12+
NEXT_PUBLIC_GOOGLE_CLIENT_ID=767744818103-5vme8soap4h1p6hmactlv4gr54n0qvbd.apps.googleusercontent.com
13+
14+

apps/web/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
"import-in-the-middle": "^3.0.0",
5757
"jose": "^6.1.3",
5858
"lucide-react": "^0.564.0",
59-
"next": "16.1.6",
59+
"next": "16.1.7",
6060
"next-themes": "^0.4.6",
6161
"nuqs": "^2.8.8",
6262
"react": "^19.2.4",

package.json

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,13 @@
6161
],
6262
"overrides": {
6363
"lightningcss": "1.30.1",
64+
"flatted@<3.4.2": "3.4.2",
65+
"h3@<1.15.9": "1.15.9",
66+
"socket.io-parser@4.2.5": "4.2.6",
67+
"undici@5.28.4": "6.24.0",
68+
"undici@6.23.0": "6.24.0",
69+
"undici@7.22.0": "7.24.0",
70+
"next@16.1.6": "16.1.7",
6471
"tar@<7.5.11": "7.5.11",
6572
"basic-ftp@<5.2.0": "5.2.0",
6673
"bn.js@4.12.2": "4.12.3",
@@ -83,7 +90,7 @@
8390
"@isaacs/brace-expansion@5.0.0": "5.0.1",
8491
"esbuild@<0.25.0": ">=0.25.0",
8592
"path-to-regexp@<6.3.0": ">=6.3.0",
86-
"next@<16.1.5": ">=16.1.5",
93+
"next@<16.1.7": ">=16.1.7",
8794
"lodash@<4.17.23": ">=4.17.23",
8895
"lodash-es@<4.17.23": ">=4.17.23",
8996
"@tootallnate/once@<3.0.1": "3.0.1"

0 commit comments

Comments
 (0)