This repo implement V2 of the MYC Lasers Scoring System
Currently linux and macos are supported.
Install docker and rust/cargo for your platform. Then install deno, node, pnpm, and adl into a repo local directory by sourcing the local setup script:
. deno/local-setup.sh
Check installed tool versions with:
deno --version
node --version
adlc show --version
When you've changed any ADL, regenerate rust/typescript/sql code with
deno task genadl
(cd platform/dev; docker compose up -d db)
(
cd rust/server
export DB_CONNECTION_URL=postgresql://postgres:xyzzy@localhost:5432/appdb
cargo test -- --test-threads=1
)
(
cd rust/server
export MYCSCORES_SERVER_CONFIG='{
"http_bind_addr": "0.0.0.0:8081",
"db": {
"host": "localhost",
"port": 5432,
"dbname": "appdb",
"user": "postgres",
"password": "xyzzy"
},
"jwt_access_secret": "shouldbetrulysecretbutnotrightnow",
"jwt_refresh_secret": "nottomentionthisone"
}'
export RUST_LOG=info
cargo run --bin mycscores-server
)
This will create the db schema and/or apply any necessary migrations
(
cd rust/server
export DB_CONNECTION_URL=postgresql://postgres:xyzzy@localhost:5432/appdb
cargo run --bin mycscores-tools -- create-user joe@test.com Joe xyzzy1
cargo run --bin mycscores-tools -- create-user --is-admin sarah@test.com Sarah abcdef
)
(
cd ts/api-workbench
# note pnpm is installed by local-setup.sh
pnpm install
pnpm run dev
)
The api workbench will be accessible at: http://localhost:5174