docs(openspec): add workflows and baseline specs
CI Pipeline with Test Management / 🧪 Run Tests & Generate Reports (push) Canceled after 0s
Test Reporting & Gherkin Analysis / 🧪 Run Tests & Generate Reports (push) Canceled after 0s
CI Pipeline with Test Management / 🐳 Docker Integration Tests (push) Canceled after 0s
CI Pipeline with Test Management / 🏗️ Build Docker Image (push) Canceled after 0s
CI Pipeline with Test Management / 📊 Generate Test Summary (push) Canceled after 0s
Test Reporting & Gherkin Analysis / 📊 Analyze Test Coverage (push) Canceled after 0s
Test Reporting & Gherkin Analysis / 🔄 Sync with Linear (push) Canceled after 0s
Test Reporting & Gherkin Analysis / ⚡ Performance Monitoring (push) Canceled after 0s

This commit is contained in:
Do Siki
2026-09-28 00:24:21 +02:00
parent d699bf4787
commit 2ad3e75c87
23 changed files with 2910 additions and 1 deletions
View File
@@ -0,0 +1,81 @@
# Contact Submissions Specification
## Purpose
A publikus kapcsolatfelvételi végpont validálását, visszajelzéseit és a beküldött
üzenetek Payload CMS-ben történő, adminisztrálható tárolását írja le.
## Requirements
### Requirement: Validate and protect contact submissions
The contact endpoint SHALL accept contact submissions through `POST /api/contact`
only when name, email, subject, message, and affirmative GDPR consent are present.
It SHALL reject invalid email addresses, values longer than 100 characters for name,
254 for email, 200 for subject, or 5000 for message, and content matching its
configured spam keywords. It SHALL trim input and remove angle brackets before
persistence.
#### Scenario: Submit valid contact details
- **WHEN** a visitor submits all required fields, a valid email address, and consent
within the configured length limits without matching spam content
- **THEN** the endpoint SHALL sanitize the submitted text and continue to persistence
#### Scenario: Submit invalid or disallowed contact details
- **WHEN** a required field or consent is missing, the email is invalid, a field
exceeds its length limit, or the content matches a configured spam keyword
- **THEN** the endpoint SHALL reject the request with HTTP 400 and SHALL NOT persist
the submission
#### Scenario: Exceed the contact rate limit
- **WHEN** a client IP submits more than three requests during a 60-second rate-limit
window
- **THEN** the endpoint SHALL reject the excess request with HTTP 429
### Requirement: Persist accepted submissions
The endpoint SHALL persist each accepted submission in the Payload
`contact-submissions` collection with GDPR consent set to true and initial status
`new`. It SHALL return success only after persistence succeeds.
#### Scenario: Persist an accepted submission
- **WHEN** a valid submission is accepted and Payload persistence succeeds
- **THEN** the endpoint SHALL return HTTP 200 with a success message, creation
timestamp, and submission identifier
#### Scenario: Payload persistence fails
- **WHEN** Payload cannot persist an otherwise valid submission
- **THEN** the endpoint SHALL return HTTP 500 and SHALL NOT report success
### Requirement: Restrict and manage submitted records
Contact submission records SHALL be available to authenticated administrators in the
Payload admin. Unauthenticated API access SHALL NOT allow reading or changing those
records. Administrators SHALL be able to manage the processing status using `new`,
`read`, `replied`, and `archived` values.
#### Scenario: Administrator reviews a submission
- **WHEN** an authenticated administrator opens a stored submission in Payload
- **THEN** the administrator SHALL be able to review its contact fields and update
its processing status
#### Scenario: Unauthenticated user attempts to access stored submissions
- **WHEN** a request without an authenticated user attempts to read or modify a
submission through the Payload API
- **THEN** Payload SHALL deny the operation
### Requirement: Reject unsupported contact methods
The contact endpoint SHALL reject methods other than `POST` with HTTP 405.
#### Scenario: Submit using an unsupported method
- **WHEN** a client calls the contact endpoint using `GET`, `PUT`, or `DELETE`
- **THEN** the endpoint SHALL return HTTP 405
+94
View File
@@ -0,0 +1,94 @@
# Content Management Specification
## Purpose
Leírja a weboldal Payload CMS-alapú tartalomszerkesztését, admin hozzáférését,
publikálását és az adminisztrált média/partner tartalmak kezelését.
## Requirements
### Requirement: Protected Payload administration
The CMS SHALL require an authenticated user for administration and protected Users
collection operations. The current user model SHALL treat every authenticated user as
an administrator.
#### Scenario: Unauthenticated user attempts a protected admin operation
- **WHEN** a request without an authenticated user attempts to read or modify a
protected Users or content record through the Payload API
- **THEN** Payload SHALL deny the operation
#### Scenario: Login attempts exceed the configured limit
- **WHEN** an account reaches five failed login attempts
- **THEN** Payload SHALL lock that account for ten minutes
### Requirement: Editable site content
The CMS SHALL provide editable Home, About, Services, Contact, and Common globals,
and LegalPages, Partners, Media, ContactSubmissions, and Users collections. Public
page content SHALL be obtained from these Payload records rather than hard-coded into
page components.
#### Scenario: An administrator edits a public page global
- **WHEN** an authenticated administrator saves a supported global
- **THEN** the CMS SHALL persist the global and make its published values available to
the public site
#### Scenario: An administrator manages legal pages or partners
- **WHEN** an authenticated administrator creates or updates a LegalPages or
Partners record
- **THEN** the CMS SHALL persist the record for use by the corresponding public page
### Requirement: Draft and versioned publishing
The site globals and the LegalPages and Partners collections SHALL support drafts and
version history, with a maximum of 50 retained versions per global or document.
Publishing SHALL be an explicit administrator action. Public content reads SHALL
return published data rather than drafts.
#### Scenario: Save an unpublished draft
- **WHEN** an administrator saves a draft of a supported global, legal page, or
partner record
- **THEN** the draft SHALL be retained in version history and SHALL NOT replace the
published content rendered publicly
#### Scenario: Publish a draft
- **WHEN** an administrator explicitly publishes a saved draft
- **THEN** subsequent public requests SHALL be able to render the newly published
content without an application redeployment
### Requirement: Hungarian and English locale support
The CMS SHALL configure Hungarian (`hu`) and English (`en`) locales, use Hungarian as
the default locale, and enable fallback to Hungarian for localized fields with no
English value. This requirement applies only to fields configured as localized; it
does not imply that every current content field has a translation.
#### Scenario: Read a localized field without an English translation
- **WHEN** the public site requests a localized field in English and that field has
no English value
- **THEN** Payload SHALL fall back to the Hungarian value
### Requirement: Public partner media
The CMS SHALL allow authenticated administrators to manage partner records and image
media. Partner logos SHALL be optional in the CMS, but the public site SHALL render a
partner only when a usable logo is available. Media reads required by public pages
SHALL be publicly accessible; media writes SHALL remain protected.
#### Scenario: Public page loads a partner logo
- **WHEN** the public site requests an uploaded partner image
- **THEN** the media endpoint SHALL allow the read without an administrator session
#### Scenario: An unauthenticated user attempts to change media
- **WHEN** an unauthenticated user attempts to create, update, or delete media
- **THEN** the CMS SHALL deny the operation
+46
View File
@@ -0,0 +1,46 @@
# Health Check Specification
## Purpose
A futó Next.js alkalmazás állapotát és build-/környezet-azonosító adatait szolgáltató
`/api/health` végpont jelenlegi szerződését írja le. A végpont jelenleg nem végez
MongoDB-kapcsolatellenőrzést.
## Requirements
### Requirement: Report application health metadata
The health endpoint SHALL provide a non-cacheable JSON response to `GET /api/health`
with HTTP 200 when the handler completes successfully. The response SHALL include
`status: "ok"`, an ISO timestamp, process uptime, application version, deployment
version (nullable), and runtime environment.
#### Scenario: Read health metadata
- **WHEN** a client sends `GET /api/health` and the handler completes successfully
- **THEN** the endpoint SHALL return HTTP 200 with the application metadata and
`Cache-Control: no-cache, no-store, must-revalidate`
#### Scenario: Health handler fails
- **WHEN** the handler encounters an unexpected error
- **THEN** the endpoint SHALL return HTTP 503 with `status: "error"`, a timestamp,
and a generic health failure message
### Requirement: Support lightweight HEAD health checks
The health endpoint SHALL support `HEAD /api/health` without a response body and with
HTTP 200 and a non-cacheable response header.
#### Scenario: Probe health using HEAD
- **WHEN** a client sends `HEAD /api/health`
- **THEN** the endpoint SHALL return HTTP 200, no response body, and
`Cache-Control: no-cache, no-store, must-revalidate`
## Open Questions
- The current response is a direct status object, while `.agent/steering/architecture.md`
and other documentation describe a shared `{ success, data, error }` response
envelope. The contact endpoint also uses endpoint-specific response objects. Should
these endpoint contracts or the shared convention be changed in a future change?
+65
View File
@@ -0,0 +1,65 @@
# Public Site Specification
## Purpose
A mozdIT Bt. publikus, magyar és angol nyelvű weboldalának útvonalait, tartalmát és
megjelenítési viselkedését írja le.
## Requirements
### Requirement: Locale-prefixed routes
The public site SHALL serve the Hungarian and English locales under `/hu` and `/en`
URL prefixes respectively. The bare root URL SHALL redirect to the default Hungarian
home route `/hu`.
#### Scenario: Open the home page in a supported locale
- **WHEN** a visitor opens `/hu` or `/en`
- **THEN** the site SHALL render the home page in the requested locale
#### Scenario: Open a localized content page
- **WHEN** a visitor opens a supported page using its locale-specific slug, such as
`/hu/rolunk` or `/en/about`
- **THEN** the site SHALL resolve and render that page in the URL locale
### Requirement: CMS-backed public content
The public site SHALL read editable page content from the Payload CMS through the
server-side content adapter. It SHALL render the home, about, services, contact,
privacy, and terms pages, and SHALL include partner entries with usable logos on the
home page.
#### Scenario: An administrator publishes page content
- **WHEN** a published page or global is read by a public request
- **THEN** the site SHALL render the current published Payload content without
requiring an application rebuild or redeployment
#### Scenario: A partner has no usable logo
- **WHEN** a partner has no uploaded logo URL
- **THEN** the public home page SHALL omit that partner from the rendered partner list
### Requirement: Unknown public routes return not found
The public site SHALL return its not-found page for unsupported locale prefixes and
unknown or unsupported page slugs.
#### Scenario: Open a route with an unsupported locale or slug
- **WHEN** a visitor requests a locale outside `hu` and `en`, or a slug not mapped to
a supported page in that locale
- **THEN** the site SHALL render the not-found response
### Requirement: Locale-specific page metadata
The public site SHALL generate page titles, descriptions, and Open Graph locale
metadata for the requested locale where page metadata is available.
#### Scenario: Request metadata for a localized page
- **WHEN** metadata is generated for a supported page and locale
- **THEN** its title and description SHALL use that locale's page content or configured
localized fallback text