Skip to content

sobstel/albicelestes

Repository files navigation

Albicelestes

Data

Database: /data/ (main file: /data/matches.json)

General rules

  • Historical data only
  • No editorials (just short notes, photos and video links)

Specific rules

  • Date: local date
  • Final score: FT or AET (if aet or pen)
  • Result: score (+ pen), eg. if score is 2-2 p. 5-4, then first team marked as winner (W) *

* - this might be reviewed soon as per statistical convention in football, matches decided in extra time should be counted as wins and losses, while matches decided by penalty shoot-out should be counted as draws

Tech

Built with: Next, Typescript, Tailwind

Development

  • yarn dev

Directory structure

  • components
  • pages
  • data
  • helpers
    • collectXXX - reduce-like
    • findXXX
    • getXXX
    • produceXXX - map-like
    • filter (rejectXXX/selectXXX)
    • sortByXXX

Testing

prod codecov

Running

  • yarn test --watch
  • yarn lint && yarn test

Structure

  • Unit tests (for functions, helpers, utility; they use mocked data)
  • React component tests (they use jsdom and mocked data)

CLI

./bin/dios

Console
  • ./bin/dios console

There are DB.*, F/functions, H/helpers, U/utility automatically included.

Deployment

Automated with github actions. See workflows.