{s.h}
{s.p}
{s.aside}// app/app.jsx — Fightlytics landing: the fight as the model sees it. const { useEffect: aEffect, useState: aState } = React; const APP_URL = 'https://app-fightlytics.duckdns.org'; // Same-origin: Caddy (deploy/Caddyfile) and dev_server.py forward this one path to the backend. const WAITLIST_URL = '/api/auth/waitlist'; // Umami custom events. Each stored property also counts against the free plan's monthly cap. function track(name, data) { if (window.umami) window.umami.track(name, data); } function Nav() { return ( ); } // Sign-in is invite-only, so the page's call to action is the waitlist. The email never goes to analytics. function WaitlistForm({ from, joined, onJoined }) { const [email, setEmail] = aState(''); const [phase, setPhase] = aState('form'); // form | sending | leaving const [error, setError] = aState(null); const submit = async (e) => { e.preventDefault(); const value = email.trim(); if (!value.includes('@')) { setError('Enter a valid email address.'); e.target.querySelector('input').focus(); return; } setError(null); setPhase('sending'); try { const res = await fetch(WAITLIST_URL, { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ email: value }), }); if (res.status === 422) throw new Error('Enter a valid email address.'); if (!res.ok) throw new Error('Something went wrong. Try again in a moment.'); track('waitlist', { from }); if (window.matchMedia('(prefers-reduced-motion: reduce)').matches) { onJoined(value); return; } setPhase('leaving'); setTimeout(() => onJoined(value), 200); // the length of .wl-out } catch (err) { setError(err instanceof TypeError ? 'Something went wrong. Try again in a moment.' : err.message); setPhase('form'); } }; if (joined) { return (
You’re on the list.
We’ll email {joined} when Fightlytics opens to everyone.
{error}
}Invite-only for now. Already invited?{' '} Sign in
); } const STEPS = [ { mode: 'detect', id: 'how', h: 'Two fighters, 17 points each.', p: 'A pose model finds both fighters in every frame and places 17 keypoints on each. The referee is filtered out.', aside:Hollow points are joints the pose model was unsure about.
, }, { mode: 'corners', h: 'Red corner, blue corner, every frame.', p: 'Corners are read from glove tape and torso colour, not from which side of the cage a fighter is on.', aside:Try it: click a row in the log.
, }, ]; function Story({ joined, onJoined }) { const [mode, setMode] = aState('full'); // the layer is worked out from the scroll position each time, so a fast flick or a scroll back to the top // never leaves a stale layer behind aEffect(() => { const els = [...document.querySelectorAll('.story [data-mode]')]; const nav = document.querySelector('.nav'), stage = document.querySelector('.story .stage'); let raf = 0; const pick = () => { raf = 0; // wide: the section that holds the middle of the screen. Narrow: the replay is pinned on top, so the step // whose heading has risen past the middle of the free space below it const narrow = window.matchMedia('(max-width: 899px)').matches; const top = narrow ? nav.offsetHeight + stage.offsetHeight : 0; const line = (top + window.innerHeight) / 2; let m = els[0].dataset.mode; els.forEach((el) => { if ((narrow ? el.firstElementChild : el).getBoundingClientRect().top < line) m = el.dataset.mode; }); setMode(m); }; const onScroll = () => { if (!raf) raf = requestAnimationFrame(pick); }; window.addEventListener('scroll', onScroll, { passive: true }); window.addEventListener('resize', onScroll); // narrow: each step is sized to the screen space left below the pinned replay, so CSS needs the replay's height const ro = new ResizeObserver(() => { document.documentElement.style.setProperty('--pin-h', stage.offsetHeight + 'px'); onScroll(); }); ro.observe(stage); pick(); return () => { cancelAnimationFrame(raf); ro.disconnect(); window.removeEventListener('scroll', onScroll); window.removeEventListener('resize', onScroll); }; }, []); return (Feed it fight video. Fightlytics tracks both fighters, reads the rounds and logs strikes by type, target and fighter.
{s.p}
{s.aside}Real data: 3.7 seconds of one fight, replayed from the pipeline’s pose output. Strikes shown are hand-verified labels.
Pipeline output for one three-round fight. Rounds come from the broadcast scoreboard, and walkouts, breaks and replays are left out of the count.
Red corner, above the lineBlue corner, belowEach bar: strikes in 10 seconds of the round clock
{p}
Today Fightlytics works on recorded fights. A version that runs on a live feed, for broadcasters, is on the way.
Fightlytics is invite-only while it’s in early access. Join the waitlist and we’ll email you when it opens to everyone.