Co-authored-by: manoel freitas <manoel.josefneto@gmail.com> Co-committed-by: manoel freitas <manoel.josefneto@gmail.com>
2.4 KiB
2.4 KiB
MODIFIED Requirements
Requirement: Site settings singleton is manageable by admin only
The system SHALL persist site-wide settings in a site_settings table as a typed singleton (SPEC WEB-06, §8.2). Fields MUST include brand name, optional logo path and logo alt text, hero copy (eyebrow, title, subtitle, primary CTA label, optional secondary CTA label, optional hero note), manifesto copy (title, lead, body), method steps (structured typed data for four editorial steps), principles (structured typed list), about summary, optional about hero image path and alt text, optional founder image path and alt text (Michele portrait for /sobre), contact email/phone/city, social links (jsonb), default meta title/description, default OG image path and alt text, and optional analytics fields disabled by default.
Scenario: Admin updates site settings
- WHEN an admin saves the site settings form in Filament
- THEN the singleton record is updated
- AND labels and validation messages are in pt-BR
Scenario: Founder image upload requires alt text
- WHEN an admin uploads a founder image without alt text
- THEN validation MUST fail with a pt-BR error message
- AND alt text MUST remain optional when no founder image is present
Scenario: Assistant cannot access site settings
- WHEN an assistant navigates to site settings in Filament
- THEN access MUST be denied with HTTP 403
Scenario: Default OG image requires alt text
- WHEN an admin uploads a default OG image without alt text
- THEN validation MUST fail with a pt-BR error message
- AND alt text MUST remain optional when no default OG image is present
Scenario: Logo upload requires alt text
- WHEN an admin uploads a brand logo without alt text
- THEN validation MUST fail with a pt-BR error message
- AND alt text MUST remain optional when no logo is uploaded
Scenario: Singleton avoids generic key-value store
- WHEN site settings are stored
- THEN the system MUST use typed columns on
site_settings - AND MUST NOT introduce a generic key/value configuration table
Scenario: Editorial defaults remain available when optional fields are empty
- GIVEN manifesto, method steps or principles fields are empty
- WHEN the home is rendered
- THEN the page MUST still render those sections using safe editorial defaults
- AND MUST NOT error