Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

2 Commits

Folders and files

Repository files navigation

Kids Soccer Sub Manager

Mobile-friendly React app that tracks playing time and recommends fair substitutions for kids' soccer. The coach decides; the app keeps track of fairness.

Requirements

Node.js 18 or newer (https://nodejs.org) and npm.

Run locally

npm install
npm run dev        # http://localhost:5173 (also reachable from your phone on the same Wi-Fi: npm run dev -- --host)

Run the unit tests

npm test           # run once
npm run test:watch # re-run on change

Build a single file

npm run build

This produces dist/index.html: one self-contained file (JS and CSS inlined, no CDN, works offline). Open it directly in a browser, email it, or host it anywhere (GitHub Pages, Netlify, any web server). npm run preview serves the built file locally to check it.

Project structure

src/
  main.jsx            entry point
  App.jsx             UI: Setup, Match and Stats screens
  styles.css
  engine/             pure functions, no React, fully unit tested
    time.js           fmt, clockOf, played
    config.js         defaults, derive (available/bench/outfield), validate
    suggest.js        fair substitution recommendation (pure)
    match.js          doSub, closeAll, statRows, finish (history)
    engine.test.js    unit tests and full-match simulations
  state/storage.js    localStorage save/load (match state and history)

Notes

  • Match state and saved match history live in the browser's localStorage on that device only.
  • Swaps are normally capped at 2 per interval. The cap is lifted only when too few swap points remain in the half for every substitute to get on.
  • Tolerance: playing-time differences under 20 seconds count as equal.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages