This repository was archived by the owner on Sep 25, 2026. It is now read-only.
Phase 1: Foundation implementation plan - #4
Merged
Merged
Conversation
Task-by-task plan for Phase 1 (Foundation) derived from the approved design spec (PR #3). Covers Next.js scaffold, Prisma multi-tenant model, Auth.js database sessions, registration/login/verify/reset, Zod boundary validation, Vitest/RTL/Playwright, pino+Sentry, /health, Railway staging deploy. Self-review fixed three correctness issues before committing: - Task 1: hand-write the Next.js scaffold instead of `create-next-app` (unreliable in a non-empty dir; would clobber Phase 0's package.json). - Route-group conflict: `app/(public)/page.tsx` and `app/(app)/page.tsx` both resolve to `/` in Next.js. Dashboard moved to `/dashboard`; Task 1 uses a temporary `app/page.tsx` that Task 13 deletes when `(public)` lands. - E2E capture gate: `__capturedEmails` is gated on `CAPTURE_EMAILS=1` (explicit flag) not `NODE_ENV !== "production"`, because Playwright runs a production build where the NODE_ENV gate would disable capture. Added `MOCK_EMAIL_SEND=1` so E2E runs without a configured Resend sending domain. Prisma `generate` added to CI before typecheck. Co-Authored-By: Claude <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The task-by-task implementation plan for Phase 1 (Foundation), derived from the approved design spec (PR #3). 20 tasks covering scaffold → Prisma multi-tenant model → auth flows → validation → test harness → observability →
/health→ Railway staging deploy →todo.mdcheckboxes.Self-review fixes (before this PR)
create-next-app .into a non-empty directory is unreliable and can clobber Phase 0'spackageManager/engines. Config files (next/tsconfig/eslint/postcss/tailwind/components.json) are written explicitly; Tailwind v3 pinned for shadcn/ui stability.app/(public)/page.tsxandapp/(app)/page.tsxboth resolve to/in Next.js (route groups don't affect URL) → build error. Dashboard moved to/dashboard(app/(app)/dashboard/page.tsx); Task 1 ships a temporaryapp/page.tsxthat Task 13 deletes in the same commit it creates(public)/page.tsx. Login redirect + E2E assertions updated to/dashboard.__capturedEmailsis gated onCAPTURE_EMAILS=1(explicit flag), notNODE_ENV !== "production"— because Playwright runspnpm build && pnpm start(production build) where a NODE_ENV gate would disable capture and the E2E could never read the verification link. AddedMOCK_EMAIL_SEND=1so E2E runs without a configured Resend sending domain.prisma generateadded to CI before typecheck (needed forlib/session.ts'sRoleimport to compile).This is a docs-only change (no code, no CI impact). After merge, Phase 1 executes against this plan.
🤖 Generated with Claude Code