SaltyBet - style betting system but in Kotlin-Ktor
- create bets with a binary outcome
- place wagers on bets with working odds calculation
- working payouts
- REST API
- session auth
- admin role
- Front end
sveltejs
framework because it looked lighter thanreact
carbon-components-svelte
ui componentsapp/web
- Back end
- Ops
- scripts in
bin
- single
Dockerfile
for the web tier - compose setup for web and postgres db
- scripts in
# setup app/web/.env
./bin/set-environment.sh
./bin/docker-build.sh
docker-compose up
# first signup will be an admin
app available on port 8080
Environment variables
TRASHBET_PORT = 8080
TRASHBET_ENVIRONMENT = testing
# boot up a local db
./dev-db-run.sh
./gradlew run
health endpoint
web bundle is also being served on this port at the webroot
api spec ¯\_(ツ)_/¯
create app/web/.env
API_ENDPOINT=http://localhost:8080
then run
# from ./app/web
npm install
npm run dev
available on port 5000
./gradlew test