feat(phase2): backend integration — Prisma schema, 15 API routes, frontend wiring#15
Merged
feat(phase2): backend integration — Prisma schema, 15 API routes, frontend wiring#15
Conversation
…seed, frontend wiring, CI fix - Prisma schema (6 models, 6 enums) migrated to Neon DB - lib/db.ts, api-response.ts, stage-transitions.ts, auth-helpers.ts, api.ts, validations/* - 15 REST API routes under app/api/v1/ with full business logic - Database seed: 4 brands, 5 creators, 8 deals, 2 submissions, 3 briefs - All 12 pages wired to real API (replaced lib/mock/ imports with fetch()) - 19 new unit tests (stage-transitions + api-response); 120 total passing - CI: removed Clerk env vars, added NEXT_PUBLIC_APP_URL - Port changed from :3000 → :3001 throughout - Pre-existing lint errors fixed (React Compiler purity + setState-in-effect) - All quality gates pass: typecheck ✓ lint ✓ test ✓ build ✓ Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
app/api/v1/with full business logic (deal pipeline, creator roster, briefs, partnerships)lib/mock/imports replaced withfetch()server-side callslib/__tests__/) — 120 total passingNEXT_PUBLIC_APP_URL=http://localhost:3001API_BASEuse:3001throughoutKey architectural decisions
lib/auth-helpers.tsuses hardcodedtest_agency_001 / test_creator_001 / test_brand_001IDs; all functions tagged// TODO(phase3):Decimal(10,2)), API returns dollars (÷100);creatorPayoutalways server-computedPENDING_APPROVAL(on submission create) andLIVE(on submission approve) are auto-advanced; blocked inPOST /stageTest plan
npm run typecheck→ 0 errorsnpm run lint→ 0 errorsnpm run test→ 120/120 passingnpm run build→ successful (15 API routes + 18 app pages)npx prisma db seed→ seeds 4 brands, 5 creators, 8 dealsGET http://localhost:3001/api/v1/deals→ returns seeded deals/dashboard→ Kanban board populated with real dataPOST /api/v1/deals/[id]/submissions→ deal auto-advances toPENDING_APPROVALPATCH /api/v1/deals/[id]/submissions/[sid]withAPPROVED→ deal auto-advances toLIVE🤖 Generated with Claude Code