TS-01Client-side only, static hosting, no backend (OV-01). The only network traffic permitted at runtime is map tile loading.
TS-02Charting MUST use TradingView's open-source lightweight-charts library (candles, MAs, crosshair events for map linking).
TS-03Build: Vite + vanilla TypeScript. No UI framework. Mapping: Leaflet (MP-03).
TS-04Output MUST be a static bundle deployable on any static host; npm run build → dist/.
Repository
TS-10The code MUST be pushed to git@github.com:Piotr12/runcandles.com.git on branch v1_1 (the build container has SSH keys exchanged). Commit in coherent increments with meaningful messages and push the branch when done.
Demo data
TS-05The bundled demo GPX MUST be a synthetic but realistic ~8 km run over a plausible route, scripted for drama: warm-up, strong middle, one traffic-light full stop (the crash), negative-split finish — so every feature shows off on arrival (OV-03).
Testing & acceptance
TS-06Unit tests (Vitest) MUST cover: haversine distance, the canonical speed curve including the worked example in chapter 2 as a fixture, candle aggregation incl. the 1500 m/500 m→3-candles and short-run→1-candle cases (CH-03), MA computation, and ticker derivation (GX-05).
TS-07Malformed input MUST fail gracefully: non-GPX files, GPX without timestamps (GX-03), and empty tracks each produce a clear in-app error, never a blank screen or console-only failure.
TS-08The repo MUST include a README covering the concept, the spec URL, dev/build/test commands, and deployment notes.
Definition of done
TS-09Done means: demo run renders on load with candles, both MAs, volume panel, header stats, coloured segmented route and bidirectional linking all working; all seven window sizes, three chart types and both themes switchable live; a real phone-recorded GPX drag-and-dropped in behaves correctly; all tests green; build clean; branch v1_1 pushed (TS-10).