Skip to content
This repository was archived by the owner on Sep 25, 2026. It is now read-only.

Phase 1: Foundation implementation plan - #4

Merged
tommyqhoang merged 1 commit into
mainfrom
phase-1/implementation-plan
Jul 29, 2026
Merged

tommyqhoang merged 1 commit into
mainfrom
phase-1/implementation-plan

Conversation

@tommyqhoang

Copy link
Copy Markdown
Contributor

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.md checkboxes.

Self-review fixes (before this PR)

  • Task 1 — hand-written scaffold: create-next-app . into a non-empty directory is unreliable and can clobber Phase 0's packageManager/engines. Config files (next/tsconfig/eslint/postcss/tailwind/components.json) are written explicitly; Tailwind v3 pinned for shadcn/ui stability.
  • Route-group conflict: app/(public)/page.tsx and app/(app)/page.tsx both 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 temporary app/page.tsx that Task 13 deletes in the same commit it creates (public)/page.tsx. Login redirect + E2E assertions updated to /dashboard.
  • E2E capture gate: __capturedEmails is gated on CAPTURE_EMAILS=1 (explicit flag), not NODE_ENV !== "production" — because Playwright runs pnpm build && pnpm start (production build) where a NODE_ENV gate would disable capture and the E2E could never read the verification link. Added MOCK_EMAIL_SEND=1 so E2E runs without a configured Resend sending domain. prisma generate added to CI before typecheck (needed for lib/session.ts's Role import 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

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>
@tommyqhoang
tommyqhoang merged commit 65d2547 into main Jul 29, 2026
3 checks passed
@tommyqhoang
tommyqhoang deleted the phase-1/implementation-plan branch July 29, 2026 02:50
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant