# Product Definitions

## Product Design Rules

A product is a reusable visual or informational unit that can be scheduled by the playlist engine or triggered by an event.

Every product should:

- accept normalized internal data
- avoid direct source-specific parsing inside the renderer
- read branding and geography from tenant configuration
- declare supported outputs
- have a safe timeout
- clean up every DOM element, timer, and map layer it creates
- allow the playlist to continue after failure

## P-003: Full-Screen Weather Alert Card

### Purpose

Give viewers the essential alert information immediately, before showing the existing map and warning polygon.

### Required fields

- alert type
- affected area
- expiration time
- primary hazard or summary
- safety instruction
- severity
- source

### Visual hierarchy

1. Brand and urgency label
2. Alert title
3. Affected area
4. Primary hazard or large numeric value
5. Expiration
6. Safety instruction

### Alert-family mapping

| Family | Accent | Default instruction |
|---|---|---|
| Tornado | Red | TAKE SHELTER NOW |
| Severe Thunderstorm | Gold | MOVE INDOORS NOW |
| Flash Flood | Green | TURN AROUND, DON'T DROWN |
| Heat | Orange | LIMIT OUTDOOR ACTIVITY |
| Dense Fog | Gray | SLOW DOWN. USE LOW BEAMS. |
| Winter | Blue | USE CAUTION WHILE TRAVELING |
| High Wind | Amber | SECURE LOOSE OBJECTS |
| Air Quality | Purple | LIMIT PROLONGED OUTDOOR ACTIVITY |
| Special Weather Statement | Cyan | STAY WEATHER AWARE |

### Broadcast sequence

```text
Alert intro card
↓
Existing warning map and popup
↓
Next alert or normal playlist
```

### Rendering modes

- `broadcast_16x9`
- `social_square`
- `social_landscape`
- `preview`

### Safety requirements

- Strip excessive NWS boilerplate.
- Never display raw CAP/XML content.
- Limit affected-area text to a readable number of lines.
- Never block the playlist indefinitely.
- Deduplicate by source ID plus update timestamp.
- Prefer official NWS instructions when concise; otherwise use approved defaults.

## Future products

### P-009: SPC Risk Summary Card

Shows risk level, timing, primary hazards, and geographic focus before the existing SPC map.

### Shelter and Civic Alert Card

Supports shelters, curfews, boil-water notices, evacuations, road closures, and emergency public information.

### Social Output Product

Takes any normalized event and renders platform-specific image dimensions and suggested post wording.
