- Create-next-app Next.js 16.2.7 with TypeScript 6.0.3, React 19, Tailwind v4, Turbopack - Install all pinned runtime deps: Clerk 7.4.3, tRPC 11.17.0, Prisma 7.8.0, Zod 4.4.3, AWS SDK 3.1062.0, Sonner 2.0.7, Upstash Redis 1.38.0 - Configure Tailwind v4 (postcss.config.mjs uses @tailwindcss/postcss; globals.css uses @import "tailwindcss") - Initialize shadcn/ui with default preset; add all Phase 1 components (button, input, form, label, textarea, select, avatar, card, dialog, dropdown-menu, sonner, progress, separator, badge, skeleton) - Set orange-500 design system: --primary: oklch(0.7024 0.1967 41.45); --background: oklch(0.9882 0 0) - Load Inter via next/font/google in root layout - Create vitest.config.ts with jsdom environment and @ path alias - Create Wave 0 test scaffolds (22 it.todo tests): auth, pet-profile, media-upload + prisma-mock helper - Create .env.example listing all required service env vars
37 lines
1.1 KiB
TypeScript
37 lines
1.1 KiB
TypeScript
/**
|
|
* Wave 0 Test Scaffold — Authentication
|
|
*
|
|
* Covers: AUTH-01 (owner row created with Clerk id, no password in app DB)
|
|
* AUTH-02 (email verification status readable)
|
|
*
|
|
* These tests will be implemented in Plan 02 when the auth pages and
|
|
* owner-upsert webhook are wired. Marked as .todo so Vitest reports them
|
|
* without failing the suite.
|
|
*/
|
|
|
|
import { describe, it } from "vitest";
|
|
|
|
describe("AUTH-01: Owner account creation", () => {
|
|
it.todo(
|
|
"creates an owner row in the DB with the Clerk userId as the primary key"
|
|
);
|
|
|
|
it.todo(
|
|
"does NOT store a password hash or any credentials in the app DB — those are Clerk-managed"
|
|
);
|
|
|
|
it.todo(
|
|
"owner row is created idempotently (upsert) when Clerk fires the user.created webhook"
|
|
);
|
|
});
|
|
|
|
describe("AUTH-02: Email verification", () => {
|
|
it.todo(
|
|
"email verification status is readable from the Clerk session (emailAddresses[0].verification.status)"
|
|
);
|
|
|
|
it.todo(
|
|
"unverified owner cannot access protected tRPC procedures — protectedProcedure requires a verified session"
|
|
);
|
|
});
|