尚未检测到更新。GitHub 发布版本后会显示在这里。
个人 GitHub 账号下公开仓库的所有者可以登录并验证所有权,自行管理介绍,无需管理员批准。
登录并生成验证文件,在 30 分钟内将其提交到此仓库的默认分支。其他分支或分叉仓库中的文件无效。然后在下方检查文件,即可无需管理员批准直接管理项目。请保留文件以维持管理权限。
如需登录,将前往登录页面。登录后请回到此处,再次点击所选的验证按钮。
在项目文件夹中运行 /nomorevibe verify,即可验证所有权并自行管理介绍。
一分钟完成验证制作者的介绍仅有上面的一句话。 更多详情请阅读仓库 README。 仓库 README ↗
正在加载完整 README。
查看完整 README ↗This document explains everything you need to work on the Solarpunk Taskforce Platform:
how setup works, how Supabase integrates, and what to do for syncing, deployment, and automation.
docs/REBRAND_COMPLETE.md for the blue/brown theme coverage across components.AGENT_RULES.md first (shipping, migrations, RLS checklist). CLAUDE.md has a code map; docs/ROADMAP.md is the plan, docs/DESIGN.md the UI rules.docs/ (e.g., docs/IMPLEMENTATION.md, docs/manual-tests/); add any new Markdown docs under docs/ — only README.md stays at the repo root.docs/SECURITY_HARDENING_QUICKSTART.md and docs/SECURITY_HARDENING_SUMMARY.md; follow alongside the Supabase rules above.This project is a Next.js 15 + Supabase full-stack platform.
It uses:
All tools and credentials are automatically handled in the dev container.
You don’t need to install anything manually.
sb-sync.sh)Open http://localhost:3000 to view the app.
To run the project locally, you need to have Node.js and pnpm installed on your machine.
pnpm install
pnpm dev
The app will be available at http://localhost:3000.This project uses ESLint to enforce code quality.
pnpm lint
pnpm lint:fix
To build the project for production, use the following command:
pnpm build
This will create an optimized production build in the .next directory.
When a Codespace launches:
scripts/sb-sync.sh runs:
pnpm dev.Available via package.json:
| Script | Description |
|---|---|
pnpm dev | Start Next.js locally |
pnpm build | Build for production |
pnpm start | Start production server |
pnpm lint | Run ESLint |
pnpm lint:fix | Run ESLint and fix errors |
pnpm typecheck | Type-check with tsc --noEmit |
pnpm check:migrations | Verify migration files are strictly ordered |
pnpm sb:migration "name" | Create a new, correctly ordered migration file |
pnpm test:rls | RLS smoke test against a Supabase project (see below) |
pnpm db:test | Build a throwaway local DB from all migrations and sweep RLS (needs local Postgres binaries) |
pnpm sb:sync | Run Supabase sync script |
pnpm sb:diff | Show schema differences |
pnpm sb:login | Authenticate Supabase |
pnpm sb:link | Link local project to Supabase |
scripts/sb-sync.sh)This script keeps the local project in sync with Supabase.
It performs:
Run manually anytime:
pnpm sb:sync
This ensures your Supabase schema and types stay synchronized.
.github/workflows/ci.yml)Runs on every pull request to main. Four parallel jobs:
| Job | Command |
|---|---|
check-migrations | pnpm check:migrations (migration files strictly ordered) |
typecheck | pnpm typecheck |
lint | pnpm lint |
build | pnpm build (with dummy NEXT_PUBLIC_SUPABASE_* values) |
.github/workflows/supabase-db-auto.yml)Runs when a push to main changes supabase/** (or this workflow file), and can be started manually from the Actions tab. Only one run at a time; later runs wait in a queue (concurrency: supabase-db).
Steps:
SUPABASE_DB_URL and SUPABASE_ACCESS_TOKEN repository secrets are set.package.json (devDependencies.supabase).--include-all):
supabase db push --db-url $SUPABASE_DB_URL --yes
supabase gen types typescript --db-url $SUPABASE_DB_URL -s public -s auth -s storage > src/lib/database.types.ts
chore(types): regenerate DB types [skip ci], rebases onto the latest main and pushes. [skip ci] stops the commit from triggering the workflow again.It never generates migrations from the database: the repo is the source of truth for the schema.
Vercel automatically deploys whenever you push to main.
pnpm buildpnpm startsb-sync.sh is not executed during Vercel builds.pnpm-lock.yaml up to date with package.json to avoid:
ERR_PNPM_OUTDATED_LOCKFILE
After modifying dependencies, always run:
pnpm install
git add package.json pnpm-lock.yaml
git commit -m "update deps"
git push
This repo uses Git LFS for large files.
If you see:
This repository is configured for Git LFS but 'git-lfs' was not found.
Fix it with:
git lfs install --force
Sync everything:
pnpm sb:sync
Start local server:
pnpm dev
Reinstall dependencies:
pnpm install
Fix Git LFS hooks:
git lfs install --force
Manually regenerate Supabase types:
supabase gen types typescript --linked > src/lib/database.types.ts
Trigger the GitHub Supabase sync workflow: Go to GitHub → Actions → Supabase DB Auto → Run workflow
Configured in Codespaces and GitHub Secrets:
| Variable | Description |
|---|---|
SUPABASE_ACCESS_TOKEN | Supabase service access token |
SUPABASE_PROJECT_REF | Supabase project reference ID |
SUPABASE_DB_URL | Supabase database connection URL |
For local development you also need the Supabase client credentials that the Next.js app uses to fetch data:
NEXT_PUBLIC_SUPABASE_URL.NEXT_PUBLIC_SUPABASE_ANON_KEY..env.local (or to your deployment environment) and
restart the dev server.If either variable is missing the admin approvals page will now show a warning
instead of crashing, because the new src/lib/supabaseConfig.ts helper refuses
to create Supabase clients without a complete configuration.
The moderation tooling now relies on three Supabase-facing pieces:
src/app/api/admin/projects/unapprove/route.ts is an authenticated API route
that lets admins move a project from "approved" back to "pending". It returns
a clear error if the Supabase credentials above are not configured.src/lib/supabaseConfig.ts centralises Supabase environment validation so the
browser and server clients fail fast with actionable messages.enforce_moderation_by_admin trigger on public.projects (latest version in
supabase/migrations/20260106130000_fix_enforce_moderation_trigger.sql) only lets
admins change the moderation status and stamps the approval/rejection audit fields.Migrations are applied to production automatically when they are merged to main
(see section 9); run pnpm sb:sync locally to regenerate types. Approving a
project in the admin UI will make it visible on the public map, and unapproving
it will move it back to the pending queue.
pnpm test:rls)scripts/rls-smoke.ts signs in as two test users and checks that row level
security on follow_edges keeps each user's follows to themselves (it creates
and deletes a follow between them). Run it against a staging/test project with
dedicated test accounts:
SUPABASE_URL=... SUPABASE_ANON_KEY=... \
SUPABASE_TEST_EMAIL_1=... SUPABASE_TEST_PASSWORD_1=... \
SUPABASE_TEST_EMAIL_2=... SUPABASE_TEST_PASSWORD_2=... \
pnpm test:rls
If NEXT_PUBLIC_SUPABASE_URL / NEXT_PUBLIC_SUPABASE_ANON_KEY are set (e.g. in
.env.local exported to the shell) they take precedence over the SUPABASE_* variants. SQL-level manual tests live in supabase/tests/.
(The old db-sync.sh script has been removed; use pnpm sb:sync locally and the
GitHub Actions workflow for production.)
pnpm sb:sync
git commit -am "update schema/types"
git push