Files
webdev-pipeline/backlog/tasks/task-1 - Scaffold-the-Next.js-MVP-foundation.md

64 lines
3.5 KiB
Markdown

---
id: TASK-1
title: Scaffold the Next.js MVP foundation
status: Done
assignee: []
created_date: '2026-06-03 19:12'
updated_date: '2026-06-04 07:05'
labels:
- mvp
- foundation
- nextjs
dependencies: []
references:
- PRD.md
priority: high
ordinal: 1000
---
## Description
<!-- SECTION:DESCRIPTION:BEGIN -->
Set up the application foundation for the WebDev Pipeline MVP: Next.js App Router, TypeScript, Tailwind, shadcn/ui, base routing, environment structure, and deployment-aware project conventions for Coolify. This task creates the technical base that all later feature work depends on.
<!-- SECTION:DESCRIPTION:END -->
## Acceptance Criteria
<!-- AC:BEGIN -->
- [x] #1 Next.js App Router project exists with TypeScript and a working local dev script
- [x] #2 Tailwind and shadcn/ui are configured and at least one shared UI component renders correctly
- [x] #3 Base routes exist for dashboard, login placeholder, and public audit placeholder
- [x] #4 Environment variable conventions are documented for Coolify, Convex, Google, OpenRouter, SMTP, and Rybbit
- [x] #5 A basic smoke test or build command verifies the scaffold compiles
<!-- AC:END -->
## Implementation Plan
<!-- SECTION:PLAN:BEGIN -->
1. Migrate package manager to pnpm
2. Verify scaffold
3. Replace starter UI
4. Add base routes
5. Document env conventions
6. Run lint and build
<!-- SECTION:PLAN:END -->
## Implementation Notes
<!-- SECTION:NOTES:BEGIN -->
Implemented pnpm-based Next.js MVP foundation on branch task-1-scaffold-foundation.
Verified pnpm install, pnpm lint, pnpm build, and local route smoke checks for /, /dashboard, /login, and /audit/example.
Note: pnpm requires approved build scripts for msw, sharp, and unrs-resolver, recorded in pnpm-workspace.yaml. Build needs network access for next/font/google unless fonts are later self-hosted.
Extending TASK-1 foundation with mock-cookie auth gate, sign in/sign up entry, protected dashboard sidebar shell, and pipeline overview per user request. TASK-1 remains In Progress until explicit manual confirmation.
Implemented mock-cookie auth extension: / and /login render sign in/sign up for guests, sign in/sign up set a secure httpOnly mock session cookie and redirect to /dashboard, sign out clears the cookie, dashboard routes are guarded by Next proxy plus dashboard layout guard, /audit/[slug] remains public. Added sidebar dashboard shell, placeholder dashboard child routes, pipeline overview, route guard/dashboard model/proxy behavior tests, and ESLint ignore for test build output. Verified pnpm test, pnpm lint, pnpm build with network access for Google Fonts, and browser smoke for guest auth, dashboard redirect, logout, public audit route, desktop layout, and mobile layout.
Final polish: replaced the hard-coded personal email in the mock session with matthias@webdev-pipeline.local. Re-ran pnpm test, pnpm lint, and pnpm build successfully; build still reports only the existing Next workspace-root warning and Node module.register deprecation warning.
<!-- SECTION:NOTES:END -->
## Final Summary
<!-- SECTION:FINAL_SUMMARY:BEGIN -->
Shipped the Next.js MVP foundation extension: mock-cookie sign in/sign up, secure httpOnly mock session, protected dashboard via proxy and layout guard, public audit route preserved, sidebar dashboard shell with pipeline overview and placeholder child routes, plus behavior tests and verification scripts. Verified pnpm test, pnpm lint, pnpm build, and browser smoke for auth, dashboard, logout, audit, desktop, and mobile.
<!-- SECTION:FINAL_SUMMARY:END -->