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.2f666d09โ Add product brief and roadmapf8065abโ Initial commit: frontend mock v0.1
Architecture
Backend (Socrates) Frontend (Daedalus)
โ โ
โผ โผ
FastAPI + PostgreSQL HTMX + Jinja2
โ โ
โโโโโโโโโโโ contract โโโโโโโโโโโ
Integration Points
Data Flow
- Frontend POSTs to
POST /api/v1/events/sideline-entry - Backend validates against Pydantic schemas
- Backend writes to PostgreSQL with
school_idisolation - Backend returns updated athlete status
- 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_notesfor non-AT roles visibilitydefaults 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 |