SB Sommar – Project Documentation

SB Sommar – Requirements: Event Data

Event data: source-of-truth YAML, locations, archive policy, naming convention, derived active camp, QA isolation, the camps.yaml validator.

Part of the requirements index. Section IDs (02-§N.M) are stable and cited from code; they do not encode the file path.


16. Archive

Past camps must remain accessible.



18. Participant Event Editing

Participants who submit events should be able to edit those events for as long as the event is in the future. This uses a lightweight, cookie-based ownership model that requires no login.

18.3 Expiry management

18.5 Edit form

18.6 Event data API

18.10 Server-side edit endpoint

18.9 Edit form API mechanics



21. Archive Timeline

The archive page (/arkiv.html) presents past camps as an interactive vertical timeline. Each camp is a point on the timeline that expands to show details.

21.1 Timeline layout

21.2 Accordion interaction

21.3 Accordion content

Each expanded accordion shows, in order:

Date range and location are already displayed in the accordion header (§21.4) and must not be repeated inside the panel.

Fields that are empty or absent must not produce blank rows or placeholder text.

21.4 Header layout

The accordion header must display the camp name as the primary text, followed by the date range and location in subdued (gray) text to the right.

21.5 Active camp indicator

21.7 Event list in archive

Each expanded accordion must display the camp’s events below the description and Facebook link. Events are loaded from the camp’s event YAML file at build time.

21.8 Visual consistency



28. Upcoming Camps on Homepage

The homepage must show a list of upcoming (and recently past) camps so that visitors can see what is planned and what has already happened this year.

28.1 Filtering

28.2 Sorting

28.3 Past-camp marking

28.4 Section placement

28.5 Camp item content

28.6 Client-side date logic

28.7 Implementation constraints



29. Camp Naming Convention

The name field in camps.yaml follows a fixed format so that camp titles are consistent across the archive, upcoming camps section, and any other display.



34. Derived Active Camp

The active camp must be derived automatically from camp dates at build time and at API request time. The manual active field is removed from the data model. This ensures exactly one camp is active at all times without manual intervention.

34.1 Derivation rules

Exactly one camp is active at any time, selected by a date-based priority applied at both build time and at API request time — today on dates → nearest future start_date → latest end_date, with the earlier start_date winning any overlap. See 03-architecture/data-layer.md §2 "Metadata Layer" for the canonical rules and the shared resolver (source/scripts/resolve-active-camp.js).

34.2 Data model changes

34.3 Build-time resolution

34.4 API resolution

34.5 Validation



37. camps.yaml Validator

A validation and sync tool that enforces camps.yaml as the single source of truth for camp metadata, ensures referenced camp files exist, and keeps camp headers in sync.

37.1 camps.yaml validation

37.2 Camp file creation

37.3 Camp header sync

37.4 Integration



42. QA Camp Isolation

QA and Production share the same camps.yaml registry and the same git branch. A dedicated QA camp allows testing the full event flow without polluting production data: it is invisible to production builds and APIs, and is always the active camp in QA environments. See 03-architecture/data-layer.md §2 "QA camp isolation" for the canonical filter mechanism (driven by BUILD_ENV) and the seasonal QA-camp model. The subsections below capture the operational requirements that flow from that design.

42.1 Data model (data requirements)

42.2 QA camp entry (data requirements)

42.3 Production filtering (site requirements)

42.4 QA resolution (site requirements)

42.5 Environment signal (site requirements)

42.6 Resolve function changes (site requirements)

42.7 Validation (site requirements)

42.8 Yearly maintenance (operational)

42.9 Seasonal QA camp model (data requirements)

42.9.1 Context

The active QA camp must close before the upcoming real camp’s pre-camp preparation period and reopen after the real-camp season ends, so QA testing never overlaps the real-camp window. See 03-architecture/data-layer.md §2 "QA camp isolation" for the spring/autumn camp descriptions and the off-season window.

42.9.2 Requirements