Issue 136
tech-debt: Directory module: FAQ, resources and team with typed category lists
Back to our planDone
frontendcmstech-debtpriority: low
Type
tech-debt
Summary
Give the neighborhood reference content (FAQ, resources directory, team members) one home, with its category lists defined once and checked by the type system so a typo can't silently break a page.
Problem
app/(frontend)/faq/page.tsxandapp/(frontend)/resources/page.tsxeach copy their category labels into an untypedRecord<string, string>, separate from the collection's select options, so the two can drift without any error.- Both pages query Payload directly.
Proposed fix
Create src/modules/directory/ (FAQ, Resources, TeamMembers): domain/ with typed category lists used by both the collections and the pages, data/ queries, cms/ collections, ui/ parts.
Acceptance criteria
- Not done: Each category list exists once, typed from the collection; a missing label is a type error.
- Not done:
/faqand/resourcesrender as before. - Not done: Unit tests for category labeling and grouping.
Depends on
#129 and #130. Step 11 of #127. Can run in parallel with steps 6–9.
Area
frontend, cms
Priority
low
Generated by Claude Code, opens in a new tab