From 4608ff19f0e91f0abcec78e21b0b1c584c195106 Mon Sep 17 00:00:00 2001 From: neodk2004 Date: Fri, 5 Jun 2026 16:46:47 +0200 Subject: [PATCH] docs(01): UI design contract for Phase 1 Foundation Locks spacing, typography, color, copywriting, and design system decisions for the owner auth and pet profile screens before execution begins. Co-Authored-By: Claude Sonnet 4.6 --- .planning/phases/01-foundation/01-UI-SPEC.md | 424 +++++++++++++++++++ 1 file changed, 424 insertions(+) create mode 100644 .planning/phases/01-foundation/01-UI-SPEC.md diff --git a/.planning/phases/01-foundation/01-UI-SPEC.md b/.planning/phases/01-foundation/01-UI-SPEC.md new file mode 100644 index 0000000..b733e2c --- /dev/null +++ b/.planning/phases/01-foundation/01-UI-SPEC.md @@ -0,0 +1,424 @@ +--- +phase: 1 +slug: foundation +status: approved +shadcn_initialized: false +preset: default +created: 2026-06-05 +--- + +# Phase 1 — UI Design Contract + +> Visual and interaction contract for Phase 1: Foundation (owner auth + pet profile creation). Generated from user design decisions. Covers all screens introduced in AUTH-01 through PET-05. + +--- + +## Design System + +| Property | Value | +|----------|-------| +| Tool | shadcn/ui | +| Preset | `default` (neutral gray base, standard radius) | +| Component library | Radix UI (via shadcn) | +| Icon library | Lucide React (bundled with shadcn) | +| Font | Inter — loaded via `next/font/google` | + +### shadcn Init Command + +```bash +npx shadcn@latest init +# Preset: default +# Base color: neutral +# CSS variables: yes +``` + +### Components Required in Phase 1 + +From the shadcn registry (official only — no third-party blocks): + +| Component | Used For | +|-----------|---------| +| `button` | All CTAs, form submissions | +| `input` | Email, password, text fields | +| `form` | Clerk-backed auth forms, pet profile form | +| `label` | All form field labels | +| `textarea` | Pet bio, adoption origin story | +| `select` | Species selector (Dog / Cat / Bird), breed selector | +| `avatar` | Pet avatar display in nav and pet card | +| `card` | Pet profile card in multi-pet switcher | +| `dialog` | Delete pet confirmation, add pet modal trigger | +| `dropdown-menu` | Active pet switcher in top nav | +| `toast` | Success/error feedback (profile saved, upload failed) | +| `progress` | Avatar photo upload progress indicator | +| `separator` | Section dividers in forms and profile pages | +| `badge` | Species label on pet card (Dog / Cat / Bird) | +| `skeleton` | Loading states for pet profile and avatar | + +--- + +## Spacing Scale + +All values are multiples of 4px. Implemented via Tailwind v4 spacing utilities. + +| Token | Value | Tailwind Class | Usage | +|-------|-------|----------------|-------| +| xs | 4px | `gap-1` / `p-1` | Icon gaps, inline badge padding | +| sm | 8px | `gap-2` / `p-2` | Compact element spacing, input icon padding | +| md | 16px | `gap-4` / `p-4` | Default element spacing, card inner padding | +| lg | 24px | `gap-6` / `p-6` | Section padding, form group spacing | +| xl | 32px | `gap-8` / `p-8` | Layout column gaps, page section spacing | +| 2xl | 48px | `gap-12` / `p-12` | Major section breaks, auth card vertical padding | +| 3xl | 64px | `gap-16` / `p-16` | Page-level top/bottom spacing | + +Exceptions: none + +### Layout Containers + +- Auth pages (sign up, log in, password reset): centered card, max-width `448px`, horizontal padding `md` (16px) +- App shell (post-auth): sidebar navigation `240px` wide on desktop; full-width on mobile with bottom nav +- Content area: max-width `640px` centered, padding `lg` (24px) horizontal +- Pet profile setup flow: single-column, max-width `512px` + +--- + +## Typography + +Font: **Inter** — loaded once via `next/font/google` in `layout.tsx`, applied as `font-sans` on ``. + +| Role | Size | Weight | Line Height | Tailwind | +|------|------|--------|-------------|----------| +| Display | 30px | 700 | 1.2 | `text-3xl font-bold` | +| Heading 1 | 24px | 700 | 1.3 | `text-2xl font-bold` | +| Heading 2 | 20px | 600 | 1.4 | `text-xl font-semibold` | +| Heading 3 | 16px | 600 | 1.5 | `text-base font-semibold` | +| Body | 14px | 400 | 1.6 | `text-sm` | +| Label | 14px | 500 | 1.4 | `text-sm font-medium` | +| Caption | 12px | 400 | 1.5 | `text-xs` | +| Button | 14px | 500 | 1 | `text-sm font-medium` | + +### Usage Rules + +- Pet name on pet card: Heading 2 (`text-xl font-semibold`) +- Form section headings: Heading 3 (`text-base font-semibold`) +- Field labels: Label (`text-sm font-medium`) — rendered via shadcn `