4.7 KiB
4.7 KiB
Status
Approved
Story
As a prospect, I want a Reel and clear Case Studies, so that I can assess capability fast.
Acceptance Criteria
/projectsindex offers Reel + Case Studies tabs with filters.- Case Study detail template with hero, problem, approach, pipeline, results, credits, CTA.
- Media player wrapper standardized.
- Reel asset source uses explicit priority order: prefer
projects.reel.video→ thenprojects.reel.embed→ then fallbackprojects.hero.image. - Defaults are clear and testable: initial tab = Case Studies; filters default to All (no category/year/search applied); selected tab and filters reflected in URL query params.
Tasks / Subtasks
-
Projects Index: Tabs + Filters (AC: 1)
- Update
src/app/projects/ProjectsPageClient.tsxto render two tabs: "Reel" and "Case Studies"; default tab = Case Studies - Reel tab: show a featured hero reel using asset priority:
projects.reel.video→projects.reel.embed→projects.hero.image(fallback), via MediaPlayer wrapper - Case Studies tab: grid/list using existing
ProjectGridor current card layout; integrate filters: Category, Year (fromcreatedAt), and a text Search; default filters = All - Persist selected tab and filters in URL query params (e.g.,
?tab=case-studies&category=...&year=...&q=...) - Ensure server data fetch in
src/app/projects/page.tsxstill passes through; client filters run on received data without extra queries
- Update
-
Case Study Detail Template Enhancements (AC: 2)
- In
src/app/projects/[id]/ProjectPageClient.tsx, introduce section layout: Hero → Problem → Approach → Pipeline Highlights → Results → Credits → CTA - Map to existing fields without schema changes: use
infofor Problem/Approach/Pipeline/Results via subheadings if markdown; keep Credits as is - Add a CTA block at end (e.g., Link to
/contact) styled with token classes - Replace inline video/embed rendering with MediaPlayer wrapper component
- Maintain existing SEO metadata in
[id]/page.tsx
- In
-
Media Player Wrapper (AC: 3)
- Create
src/components/media/MediaPlayer.tsxthat accepts:{ video?: string; embed?: string; poster?: string; className?: string } - Standardize controls, aspect ratio, poster overlay, and mute/autoplay policy; integrate
useAutoplayVideosfor in-view playback when muted - Support iframe embeds safely with required attributes; fall back to poster image
- Replace usages in Project detail and Reel tab
- Create
-
Quality and Integration Verification
- Lint/build pass:
npm run lint/npm run build - IV1: Existing project data remains valid; no runtime errors if fields missing
- IV2: SEO titles/descriptions preserved or improved (no regressions in
generatePageMetadata) - IV3: Page LCP/TTFB within current budgets; avoid heavy client work on first paint; lazy-load media
- Lint/build pass:
Dev Notes
- Context
- PRD Story 1.4. No DB schema changes; use current fields (
category,tags,createdAt,video,embed,thumbnail,info,credits). - Standardize media with a wrapper used in both index (Reel) and detail.
- PRD Story 1.4. No DB schema changes; use current fields (
- Relevant Source Tree
- Index:
src/app/projects/page.tsx,src/app/projects/ProjectsPageClient.tsx - Detail:
src/app/projects/[id]/page.tsx,src/app/projects/[id]/ProjectPageClient.tsx - Components:
src/components/ProjectGrid.tsx,src/components/ScrollEnhancements.tsx,src/components/motion/useAutoplayVideos.ts - Assets/Metadata:
src/lib/metadata.ts,src/lib/assets.ts, Prisma models inprisma/*
- Index:
- Implementation Guidance
- Tabs can be simple client state with tokens; no dependency on heavy UI libs necessary.
- Filters operate on the in-memory list from server; for Year, derive from
createdAt. - If markdown present in
info/credits,MarkdownContentalready used in detail; leverage for subheadings. - Keep accessibility: keyboard focus, visible focus rings, no scroll-jacking.
Testing
- Manual
/projects: switching tabs does not remount unnecessarily; URL reflects current tab/filters.- Filters: combining Category + Year + Search updates the grid correctly; clearing filters resets view.
- Detail page: sections render with meaningful headings; CTA routes to
/contact.
- Regression
- Deep-links to existing
/projects/[id]still function. - No console errors/warnings introduced.
- Media playback behaves consistently and does not auto-play with sound.
- Deep-links to existing
Change Log
| Date | Version | Description | Author |
|---|---|---|---|
| 2025-09-24 | v1 | Initial draft from PRD Story 1.4 | Scrum Master |
Dev Agent Record
Agent Model Used
{{agent_model_name_version}}
Debug Log References
Completion Notes List
File List
QA Results