๐Ÿ“„ SPEC.md 1,978 bytes May 01, 2026 ๐Ÿ“‹ Raw

RTSport Build โ€” Integration Spec

Build Date

2026-05-01

Source of Truth

  • Contract: docs/contract.md (v0.2)
  • Repo: https://github.com/NightKnight64/rtsport
  • Commits:
  • 0891503 โ€” Add API & data contract v0.2
  • f666d09 โ€” Add product brief and roadmap
  • f8065ab โ€” Initial commit: frontend mock v0.1

Architecture

Backend (Socrates)          Frontend (Daedalus)
     โ”‚                              โ”‚
     โ–ผ                              โ–ผ
FastAPI + PostgreSQL          HTMX + Jinja2
     โ”‚                              โ”‚
     โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ contract โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

Integration Points

Data Flow

  1. Frontend POSTs to POST /api/v1/events/sideline-entry
  2. Backend validates against Pydantic schemas
  3. Backend writes to PostgreSQL with school_id isolation
  4. Backend returns updated athlete status
  5. Frontend re-renders HTMX partial

Contract Alignment

  • All Pydantic schemas in contract.md ยง1 are source of truth
  • Frontend mocks already aligned (per Matt)
  • No retcon needed

FERPA Gate

  • API layer strips clinical_notes for non-AT roles
  • visibility defaults to ["at"] on all writes
  • Role-based access matrix enforced via FastAPI dependency

Shared Directory Layout

shared/build-20260501/
  SPEC.md              โ† This file (integration contract)
  docs/                โ† Cloned from repo
    contract.md
    product-brief.md
    roadmap.md
  frontend/            โ† Cloned from repo
    index.html
    ...
  backend/             โ† Socrates writes here
    app/
    models/
    api/
    tests/
  integration.md       โ† Both update as they work

Status

Component Status Owner
Contract review Ready to start Socrates
Backend scaffold Not started Socrates
Frontend alignment Already aligned Daedalus (on standby)
Integration tests Not started Pending