Skip to content

[BACKEND] Create FAQ collection #17

@aleckshen

Description

@aleckshen

Is your feature request related to a problem? Please describe

FAQ content is currently planned to be hardcoded in the frontend. This means any changes to questions or answers require a code deployment.

Describe the solution you'd like

Create a FAQs collection at src/payload/collections/FAQs.ts and register it in src/payload.config.ts.

Fields:

Field Type Required Notes
question text yes The FAQ question
answer richText yes The answer (supports formatting)
order number no For controlling display order
published checkbox yes Default: true. Allows hiding a FAQ without deleting it

Access control:

Operation Rule
read Public (no login required, only where published: true)
create / update / delete Admins only

Describe alternatives you've considered

A Payload global (single document) with an array field was considered, but a collection scales better if the FAQ list grows and allows individual publish/unpublish control.

Additional context

After creating the collection, run pnpm payload generate:types to regenerate payload-types.ts.

This collection has no dependencies on any other ticket.

Labels: feature, good first issue

BEFORE MERGING

  • Code generation run (hint: pnpm typegen)
  • PR Reviewed (For non-trivial changes)
  • All required PR checks passing

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions