A "Top 10" quiz all about Manchester United statistics. Built with Svelte and manunited.io.
- Svelte - a really nifty JavaScript framework
- manunited.io - a GraphQL API built by Matt Adams
- urql - a GraphQL client with Svelte bindings
- MSW - Mock Service Worker, for mocking network requests locally in an unobtrusive way
- Simple CSS - A classless CSS framework that makes getting started with decent styling easy-peasy
Caveat: You need to have registered with manunited.io to gain access to the API and the relevant Authorisation details.
- Clone down the repo
- Install the dependencies via
npm i
oryarn
- Create an
.env
file containing the relevant auth details for the API (see Environment Variables) - Run
npm run dev
to get the site running in hot-reloading dev mode - Run
npm run dev:staging
to run the site in hot-reloading dev mode, but without mocking the API - Run
npm run build
to build the site in prod mode (andnpm start
to run it)
You'll need to create an .env
file containing the following necessary auth details:
CLIENT_ID=[insert client id]
CLIENT_SECRET=[insert client secret]
MANUTD_TOKEN_URL=https://manutd.auth.eu-west-2.amazoncognito.com/token
MANUTD_API_URL=https://api.manunited.io/
- Player statistics
- Top goalscorers of all time
- Player statistics
- Most yellow cards of all time
- Most red cards of all time
- Team statistics
- Seasons with most goals
- Cup winning seasons
- By individual cup (e.g. FA Cup)
- Manager statistics
- Most wins in individual competition
The following is a non-exhaustive list of questions we've thought to add, but the API in it's current form either makes these too difficult to implement, or are not supported at all.
- Player statistics
- Top goalscorers in a given competition (e.g. FA Cup)
- Most yellow carded players in a given season
- Most yellow carded players in a given competition
- Most red carded players in a given season
- Most red carded players in a given competition