Skip to content
SprecherEast
Issue 136

tech-debt: Directory module: FAQ, resources and team with typed category lists

Back to our plan
Done
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.tsx and app/(frontend)/resources/page.tsx each copy their category labels into an untyped Record<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: /faq and /resources render 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

See it on GitHub, opens in a new tab