Commit Graph

123 Commits

Author SHA1 Message Date
Chandler Copeland
0cdf3e5f7d docs(02): research phase - marketing site
Research covering Next.js App Router patterns, Nodemailer SMTP contact form,
pure-React testimonials carousel, honeypot spam protection, and React 19
useActionState API for the public marketing homepage phase.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-19 14:50:36 -06:00
Chandler Copeland
0167c00462 docs(02): add placeholder assets guidance to context 2026-03-19 14:46:01 -06:00
Chandler Copeland
8b9163eda3 docs(02): capture marketing site phase context 2026-03-19 14:45:43 -06:00
Chandler Copeland
6590e5fcf5 docs(phase-1): complete phase execution — Foundation ✓
All 3 plans executed, 4/4 requirements satisfied, 5/5 must-haves verified.
Auth flow human-approved. Switching to local PostgreSQL + home Docker server.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-19 14:34:56 -06:00
Chandler Copeland
0ca13987f5 docs(01-03): complete local env setup and auth flow verification
All 7 auth flow tests passed (human verified). Fixed Edge Runtime
middleware incompatibility and (protected) route group split.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-19 14:23:20 -06:00
Chandler Copeland
39af0f19ba fix(auth): resolve middleware Edge Runtime + layout redirect loop
Two bugs:
1. auth.ts imported postgres (Node.js TCP) which crashes in Edge Runtime,
   causing Auth.js to silently fall back to redirecting all requests to login.
   Fix: split into auth.config.ts (Edge-safe, no DB) used by middleware,
   and auth.ts (full, with DB) used by server components.

2. /agent/layout.tsx applied to /agent/login, so unauthenticated login page
   visits redirected to themselves in an infinite loop.
   Fix: moved dashboard + layout into (protected) route group so login page
   has no auth layout.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-19 14:08:04 -06:00
Chandler Copeland
0a75442af3 fix(db): swap @neondatabase/serverless for postgres.js (local dev support)
Neon serverless driver requires remote WebSocket — incompatible with local
PostgreSQL. Replaced with postgres.js (drizzle-orm/postgres-js) in db/index.ts,
scripts/seed.ts, and drizzle.config.ts.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-19 14:00:32 -06:00
Chandler Copeland
8bc09e4ea7 docs: switch infrastructure to local PostgreSQL + home Docker server (no Vercel/Neon) 2026-03-19 13:51:49 -06:00
Chandler Copeland
410fc10e9b docs(01-02): complete login pages and auth UI plan
- 01-02-SUMMARY.md: branded login page, password toggle, dashboard stub, logout
- STATE.md: advanced to plan 2/3, added three new auth UI decisions
- ROADMAP.md: updated phase 01 progress to 2/3 plans complete
- REQUIREMENTS.md: AUTH-04 marked complete (logout with signed-out confirmation)
2026-03-19 13:41:19 -06:00
Chandler Copeland
32dc2d3ee5 feat(01-02): build agent portal layout, dashboard stub, and logout mechanism
- LogoutButton: client component with server action calling signOut to ?signed_out=1
- AgentLayout: defense-in-depth auth() check, header with email and sign-out button
- DashboardPage: belt-and-suspenders auth() check, welcome message with agent email
- HomePage: updated to Teressa Copeland Homes placeholder (Phase 2 marketing site)
- npm run build and npx tsc --noEmit both pass with zero errors
2026-03-19 13:39:25 -06:00
Chandler Copeland
f221597677 feat(01-02): build branded login page with password toggle and error handling
- Split-screen layout: agent photo left (lg+), login card right
- loginAction server action: signIn credentials, redirects on AuthError
- PasswordField client component: show/hide toggle with eye/eye-off SVG
- Signed-out confirmation banner on ?signed_out=1
- Error banner on ?error=invalid with generic message
- Brand colors: gold #C9A84C accent, navy #1B2B4B text, off-white #FAF9F7 bg
- Copied /Users/ccopeland/Downloads/red.jpg to public/red.jpg
2026-03-19 13:38:42 -06:00
Chandler Copeland
7fdce32d0d docs(01-01): complete foundation scaffold plan 2026-03-19 13:36:14 -06:00
Chandler Copeland
e5db79a8f0 feat(01-01): configure Auth.js v5 JWT + Credentials, route protection middleware
- Created src/lib/auth.ts with NextAuth JWT strategy, 7-day rolling session, Credentials provider
- Created src/app/api/auth/[...nextauth]/route.ts with GET/POST handlers and force-dynamic
- Created middleware.ts at project root (not src/) protecting /agent/* routes
- Fixed db/index.ts: lazy Proxy singleton prevents neon() crash during Next.js build
- npm run build passes; /api/auth/[...nextauth] renders as Dynamic route
2026-03-19 13:33:15 -06:00
Chandler Copeland
f46e7027a5 feat(01-01): define DB schema, configure Drizzle Kit, write seed script
- Created src/lib/db/schema.ts with users table (id, email, password_hash, created_at)
- Created src/lib/db/index.ts exporting db singleton via Drizzle + Neon HTTP driver
- Created drizzle.config.ts pointing to schema.ts with postgresql dialect
- Created scripts/seed.ts reading AGENT_EMAIL/AGENT_PASSWORD to create hashed user row
- Generated drizzle/0000_milky_black_cat.sql migration (committed per user decision)
- db:migrate and db:seed pending user Neon database setup
2026-03-19 13:30:52 -06:00
Chandler Copeland
dac1bc817b feat(01-01): scaffold Next.js 16.2.0 project with all Phase 1 dependencies
- Created teressa-copeland-homes with TypeScript, Tailwind, ESLint, App Router, src dir
- Installed next-auth@5.0.0-beta.30 (pinned exact version), drizzle-orm, @neondatabase/serverless
- Installed bcryptjs, @vercel/blob, zod, drizzle-kit, tsx, dotenv
- Added db:generate, db:migrate, db:seed, db:studio npm scripts
- Verified npm run build passes with zero TypeScript errors
2026-03-19 13:29:56 -06:00
Chandler Copeland
41703bf74b docs(01-foundation): create phase 1 plan 2026-03-19 13:24:04 -06:00
Chandler Copeland
e1c6e3cce7 docs(01): research phase foundation — Next.js 15 Auth.js v5 Drizzle Neon Vercel 2026-03-19 13:16:29 -06:00
Chandler Copeland
e286536ef8 docs(01): capture phase context 2026-03-19 13:04:31 -06:00
Chandler Copeland
e7faaa5fd9 docs: create roadmap (7 phases) 2026-03-19 12:25:02 -06:00
Chandler Copeland
498ee47445 docs: define v1 requirements 2026-03-19 12:08:52 -06:00
Chandler Copeland
3b13815d68 docs: add domain research 2026-03-19 11:50:51 -06:00
Chandler Copeland
ac1ff1a7db chore: add project config 2026-03-19 11:35:34 -06:00
Chandler Copeland
d435ac97a5 docs: initialize project 2026-03-19 11:33:02 -06:00