refactor(dashboard): require a database and drop the solo dev mode - #68
Conversation
The dashboard could be started without Postgres through `dev:solo`, which read a checked-in `apps/dashboard/.env.solo` and turned on the in-memory Better Auth adapter plus an environment-seeded repository store. Running the app is now one path: `aube run dev` (and every deployment) needs a database, and nothing in the repository turns the in-memory stores on. Removed `apps/dashboard/.env.solo`, `code-zero.deployment.solo.yml`, the `dev:solo` scripts and turbo task, their `.gitignore` exceptions, and the `CODE_ZERO_SOLO_REPOSITORIES` seeding of `memoryRepositoryStore`, which now starts empty. The memory adapters themselves stay: `playwright.config.ts` is their only caller, so the e2e suite keeps signing up its own throwaway account through the real `/api/auth/**` endpoints instead of a live database, off the network and off mutable external state. Docs follow: the README quick start points at `db:migrate` and `dev` rather than a no-database start, and `docs/PLAN.md` keeps its Fase 0 record with a dated note saying the mode is gone. Verification: `aube run check:repo`, `aube run lint:ci`, `aube run typecheck`, `aube test` (154 dashboard tests, 27 tasks), `aube run build`. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014mjY3tgLKmA7LDJzb8JrZS
◈ PR Lens
Architecture 5 components touched across 3 lanes. Inside the changed components — 2 viewsComponent view — Repository storage Repository storage details showing in-memory unseeding and direct persistence in PostgreSQL. Component view — Authentication configuration Better Auth configuration scoping in-memory auth exclusively to Playwright end-to-end tests. Data flow
View
Tip The diagrams are links. Click one to open it on the canvas, then press W or click play to walk through the change. 🪧 More tips
Thanks for using PR Lens! It's built by Coldtea, free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
ApprovabilityVerdict: Not approved Macroscope's review found this PR not approvable — This PR removes the in-memory solo dashboard workflow, makes local dashboard startup depend on Postgres, and changes the first-account setup process. It also touches authentication configuration, a sensitive review area that warrants human validation. Not approved because:
Review your spending limits in Billing settings. You can add or adjust custom eligibility rules. Learn more. |
Self-registration (`AUTH_ENABLE_SIGNUP=true`) grants the app-wide `user` role, never `admin`; `repositories.save` requires `admin` (the same gate `audit.list` uses in packages/api/src/orpc/router.ts). The quick-start flow this README documents had the first account sign up and then add a repository from the dashboard, which that account cannot do — there is no first-user-becomes-admin bootstrap anywhere in the codebase. Verified with a Playwright request against the built dashboard: sign-up returns 200, but repositories.save returns 403 for the fresh account. Documented the one path that actually works today: promote the account with a direct `UPDATE "user" SET role = 'admin'` after signing up. This is documentation only — no code change, since inventing a bootstrap mechanism is a separate, larger change than the solo-mode removal this branch is otherwise scoped to. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014mjY3tgLKmA7LDJzb8JrZS
|
Two Vercel deployment statuses are red on this commit (6b41271) — neither is caused by this branch's diff, and I don't have a way to retrigger either from here:
Both are commit statuses, not required GitHub Actions checks — all of those (build, lint, typecheck, unit tests, unused-code, i18n, PR title, security scans) are green. I don't have a Vercel redeploy/retry tool available in this session to force a re-run, so I'm not spending a push on it; flagging here and keeping the PR watched. Generated by Claude Code |
The dashboard could be started without Postgres through
dev:solo, which read a checked-inapps/dashboard/.env.soloand turned on the in-memory Better Auth adapter plus an environment-seeded repository store. Running the app is now one path:aube run dev(and every deployment) needs a database, and nothing in the repository turns the in-memory stores on.Removed
apps/dashboard/.env.solo,code-zero.deployment.solo.yml, thedev:soloscripts and turbo task, their.gitignoreexceptions, and theCODE_ZERO_SOLO_REPOSITORIESseeding ofmemoryRepositoryStore, which now starts empty. The memory adapters themselves stay:playwright.config.tsis their only caller, so the e2e suite keeps signing up its own throwaway account through the real/api/auth/**endpoints instead of a live database, off the network and off mutable external state.Docs follow: the README quick start points at
db:migrateanddevrather than a no-database start, anddocs/PLAN.mdkeeps its Fase 0 record with a dated note saying the mode is gone.Verification:
aube run check:repo,aube run lint:ci,aube run typecheck,aube test(154 dashboard tests, 27 tasks),aube run build.Claude-Session: https://claude.ai/code/session_014mjY3tgLKmA7LDJzb8JrZS
Summary
Why
Verification
aube run check:repoaube run lint:ciaube run typecheckaube testaube run buildSafety and compatibility
observemode as read-only, or explained the policy change above.Agent context
Reviewer notes
Confidence Score: 5/5
Safe to merge.
The previously reported administrator-bootstrap issue is no longer outstanding: the setup documentation explains enabling signup, promoting the first account to administrator directly in the database, and then configuring repositories. greptile-apps[bot] manually resolved the thread without explanation.
Reviews (2): Last reviewed commit: "docs(readme): document the admin bootstr..." | Re-trigger Greptile