# Changelog

All notable changes to the SOSRoute API Platform will be documented in this file.

Format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).  
This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

> **Maintenance Rule:** This changelog MUST be updated with every weekly release. At minimum, review and update every Monday.

---

## [1.1.0] — 2026-10-03

### Added
- **Guaranteed core contacts** — `GET /v1/contacts/nearest` accepts `ensure_types=hospital,fire,law_enforcement` (or `per_type=1`). The nearest facility of each category is always returned, at any distance (`radius_expanded: true` beyond `radius`). If it has no phone, the nearest one with a phone is added (`nearest_with_phone`); for law enforcement the nearest sheriff is added when the nearest agency is a city/state agency (`nearest_sheriff`).
- **Law enforcement coverage** — ~20,000 local police, sheriff, state police, and tribal agencies (DOJ/BJS list via HIFLD) plus OpenStreetMap police and EMS stations. Previously the database had no law enforcement records.
- **Fire department phones** — 32,000+ fire stations now carry their department's phone from the USFA National Fire Department Registry (`phone_type: department`).
- **Phone provenance** — `phone_e164`, `phone_display`, `phone_type`, `phone_source`, `phone_verified_at`, `dispatch_phone_e164`, `county`, `google_place_id`, stable `id`s (`hifld-le-*`, `osm-*`, UUID).
- **Corrections** — `POST /v1/contacts/{id}/corrections` queues phone/address/name/location/closed reports for review (202, `status: pending`).
- `meta.ensured`, `meta.missing_categories`, `meta.phone_coverage`; radius accepts `km`, `mi`, or `m`.

### Changed
- Records from federal data and OpenStreetMap are merged when they describe the same facility (same category, similar name, within 400 m). For law enforcement the fresher OSM phone wins over the 2018-era HIFLD phone.
- Documented NM 505 → 575 area-code corrections are applied for unambiguous counties (`phone_source` suffix `+areacode_fix`).
- `distance_km` is deprecated; use `distance_m`.
- Facility count corrected to 80,000+ geocoded US facilities (earlier "220,000+" figure was inaccurate).

### Removed
- Phone "borrowing": a facility no longer inherits a phone from a different facility in the same city or chain. Unknown phones are `null`.

## [1.0.0-beta.4] — 2026-07-14

### Added
- **Branded Favicon Set** — Custom SVG favicon (shield + radar pulse in brand gradient), apple-touch-icon, `site.webmanifest`, and `theme-color` meta across all pages
- **Glowing SVG Module Icons** — 6 new transparent SVG icons with neon glow filters for Hazard Alerts, Incident Reporting, Geofence Zones, Location Intelligence, Emergency Contacts, and Webhooks — sized at 96px (2× previous)
- **AR Glasses Use Cases** — Two new use case cards: "AR Glasses & Spatial Computing" and "First Responder HUDs"
- **Gradient Text Highlights** — "Safety data" and "location-aware apps" colorized with brand gradient in the 2015/HTTPS inevitability section

### Fixed
- **Agency Count Consistency** — Standardized all references to "8 federal sources" across meta tags, OG tags, Twitter cards, JSON-LD, trusted strip, and body copy (was inconsistently saying 6 in some places)
- **Dashboard Favicon Path** — Fixed broken `/images/favicon.svg` reference to `/favicon.svg`
- **Company Domain** — Updated all `sandboxsynergy.com` references to `sandboxsynergy.org` across index, MCP server, and docs

### Changed
- **Hero Text** — Reverted gradient styling on hero heading to original "Developers Depend On." treatment
- **Module Icon CSS** — Updated `.module-icon` with explicit `width: 96px; height: 96px` and `img` child styles

---

## [1.0.0-beta.3] — 2026-07-14

### Added
- **App Showcase Carousel** — 10 use case mockup images with auto-rotate (5s), swipe/touch support, keyboard navigation, and dot indicators
- **Developer Dashboard** (`dashboard.html`) — Post-login experience with sandbox API key display, 3-step quickstart, interactive endpoint explorer, and copyable code snippets (cURL, JS, Python)
- **Hero Redesign** — "200M+ safety data points from 8 federal sources" positioning with stat bar (99.95% uptime, 8 sources, 220K+ facilities, <50ms response)

### Changed
- **Carousel Section Title** — "Built with SOSRoute" → "Endless Developer Uses" per marketing directive

---

## [1.0.0-beta.2] — 2026-07-14

### Added
- **Facility Expansion** — 220,000+ emergency facilities covering US, Canada, and Mexico
  - Hospitals, fire stations (including volunteer), EMS, police, urgent care, pharmacies, poison control, 911 centers
  - Added `country` field to contacts schema (US/CA/MX)
- **Poison Control** — Added as a facility type to the contacts module
- **Volunteer Fire Departments** — Verified and included in the 220K+ count

### Changed
- **Landing Page Stats** — Updated to reflect 8 data sources, 7 facility types, North America coverage

---

## [1.0.0-beta.1] — 2026-07-14

### Added
- **Complete Backend API Server** — 17 endpoints across 6 modules
  - `GET /v1/alerts` — Real-time hazard alerts (FEMA, NOAA, USGS, NIFC, EPA)
  - `POST /v1/incidents` — Community incident reporting with FSM status tracking
  - `POST /v1/geofences` — Virtual safety perimeters (circle + polygon)
  - `GET /v1/location/risk-score` — Composite 0–100 safety score from 7 factors
  - `GET /v1/contacts/nearest` — Nearest emergency facilities by type
  - `POST /v1/webhooks` — Push notification subscriptions with HMAC-SHA256
- **Authentication** — API key auth with SHA-256 hash verification, prefix-based fast lookup, environment separation (live/test)
- **Rate Limiting** — Tier-based sliding window via Upstash Redis (sandbox: 100/min → enterprise: 100K/min)
- **Data Ingestion Pipeline** — Live workers for NOAA Weather, USGS Earthquake, EPA AirNow, NIFC Wildfire, FEMA IPAWS
- **Premium DX Layer** — `X-Request-ID`, `X-Response-Time`, `X-SOSRoute-Version` headers on every response
- **Database Schema** — 8 tables with PostGIS geography columns, spatial indexes (GiST), deduplication constraints
- **Sandbox Key Endpoint** — Zero-friction `GET /v1/sandbox` for instant onboarding

---

## [0.1.0] — 2026-07-14

### Added
- **Initial Release** — SafeSignal API Platform (later rebranded to SOSRoute)
  - Marketing landing page with dark premium theme (Stripe/Vercel quality target)
  - OpenAPI 3.1 specification (70KB, 17 endpoints)
  - MCP Server for AI agent integration
  - AI discoverability layer (`llms.txt`, `llms-full.txt`, `.well-known/ai-plugin.json`)
  - SEO infrastructure (sitemap, robots.txt, JSON-LD structured data)
  - Documentation suite (architecture, security framework, go-to-market, maintenance playbook)

### Changed
- **Rebrand** — SafeSignal → SOSRoute + complete marketing psychology overhaul
- **Removed** provider/vendor names from landing page per marketing directive
