Files
amare/openspec/changes/build-content-cms/specs/portfolio-cases/spec.md
manoel freitas 8da8d19504 feat: CMS de conteúdo do site (WEB-02/03/04/06)
Implementa gestão Filament de configurações, serviços, portfólio e depoimentos com policies admin-only, upload validado e seed determinístico.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-28 23:16:25 -03:00

32 lines
1.4 KiB
Markdown

## ADDED Requirements
### Requirement: Portfolio cases support editorial content and ordered gallery
The system SHALL allow admins to manage portfolio cases (SPEC WEB-03) with title, unique slug, summary, event type, optional city/venue/event date, challenge, solution, optional result, cover image with alt text, featured flag, sort order, `published_at`, and optional SEO meta fields. Each case MUST support an ordered gallery via `portfolio_images` (path, alt text, optional caption, sort order).
#### Scenario: Draft case is not publicly visible
- **WHEN** a portfolio case has `published_at` null
- **THEN** the `published()` scope MUST exclude it
#### Scenario: Published case meets acceptance criteria
- **WHEN** an admin fills required fields and sets `published_at`
- **THEN** the case MUST be included in the `published()` scope
- **AND** cover and gallery images MUST have alt text when present
#### Scenario: Gallery images maintain order
- **WHEN** an admin reorders gallery images in Filament
- **THEN** `sort_order` MUST reflect the chosen order per `portfolio_case_id`
#### Scenario: Assistant cannot manage portfolio
- **WHEN** an assistant attempts to access portfolio cases
- **THEN** access MUST be denied with HTTP 403
#### Scenario: Cascade delete removes gallery images
- **WHEN** a portfolio case is deleted
- **THEN** associated `portfolio_images` records MUST be removed (FK cascade)