GJP Cup was so great that there is GJP Cup 2 now
npm install
- Download PocketBase from https://pocketbase.io/docs/, extract it, put the binary to this directory (or somewhere else idc)
./pocketbase serve
in one terminalnpm run dev
in second terminal
To fill the database:
- Open the Týmy Google Sheet
- Download it as a CSV
- Put it to the root folder (right next to this
README.md
) astymy.csv
- Run
npm run filldb
- --> The db gets filled with players, teams and games (games are in a really shitty order). Including one game with teachers.
You can change credentials, db url and other stuff at
scripts/filldb.ts
.
We're using our own distribution of pocketbase-react
(available at https://github.com/radeksoft/pocketbase-react/tree/radeksoft), installed in the package.json
as a Github repo. The installation should still be as simple as npm install
.
Differences with upstream:
- login with admin account
- working initialCollections (fetch & subscribe by itself)
- no React Native support (200 megs of node_modules less)
Caveats:
- importing by
import { ... } from 'pocketbase-react/src';
because we can't import the package (by it'spackage.json
), but we're loading the source code directly - React StrictMode is disabled, because
pocketbase-react
is not good at unsubscribing on component unmount (caused double entries on realtime updates)
Numbering of games and teams (games.no
, teams.no
and misc.currentGameNo
) starts from 0. Do +1 when presenting to final user (probably never?)
build with npx vite build
(not npm run build
, coz we have typescript errors everywhere)
deploy by sth like rsync --info=progress2 -r dist/* [email protected]:/srv/www/gjpcup.radeksoft.cz/