Cooperative wordgame @ hotbling.wtf
Status: WIP
- play solo or with up to 2 other team mates
- etc.
This is a Kotlin Multiplatform project targeting Android, Web, Desktop, Server.
- wasmJs (dev):
./gradlew :composeApp:wasmJsBrowserDevelopmentRun
- desktop (dev):
./gradlew :composeApp:run
- jar:
./gradlew :composeApp:packageUberJarForCurrentOS && java -jar ./composeApp/build/compose/jars/wtf.hotbling.wordgame-linux-x64-1.0.0.jar
- jar:
- server (dev):
./gradlew :server:run
- jar:
./gradlew :server:buildFatJar && (cd server && java -jar -Dio.ktor.development=true ./build/libs/server-all.jar)
- combine with:
./gradlew wasmJsBrowserDevelopmentExecutableDistribution
- jar:
- prod run:
./gradlew clean wasmJsBrowserDistribution :server:publishImageToLocalRegistry && docker compose up -d
- prod push:
rsync -a --exclude build . root@hotbling.wtf:~/code/wordgame
- tests, esp. for subscription code
- spectate mode (read-only)
- login
- streaks, friends & scoring system
- profile pics
- word definition, possibly via wiktionary (verify all marked as solved are in wiktionary offline db)
- user-added words
- server-side error handling, in routes & services
- maybe: replace WS with SSE (since one-way)
- full Android app (deeplink...)
- auth :)
- eliminate
!!
by capturing variables
export host=http://localhost:8080
export ws_host=ws://localhost:8080/ws
export host=https://hotbling.wtf
export ws_host=wss://hotbling.wtf/ws
curl "$host/api/v1/words/random"
curl "$host/api/v1/words/solution"
output=$(curl -s -X PUT --json '{"name":"Meow"}' "$host/api/v1/accounts")
echo "$output"
export account_id=$(jq -r '.data.id' <<< "$output")
echo "account_id: $account_id"
output=$(curl -s -X PUT --json '{"id":"'$account_id'","name":"Cat"}' "$host/api/v1/accounts")
echo "$output"
export account_id=$(jq -r '.data.id' <<< "$output")
echo "account_id: $account_id"
curl "$host/api/v1/sessions/by-account/$account_id"
output=$(curl -s --json '{"account_id":"'$account_id'"}' "$host/api/v1/sessions")
echo "$output"
export session_id=$(jq -r '.data.id' <<< "$output")
echo "session_id: $session_id"
websocat "$ws_host?Session=$session_id&Account=$account_id"
output=$(curl -s --json '{"session_id":"'$session_id'","account_id":"'$account_id'","txt":"hello"}' "$host/api/v1/guesses")
echo "$output"
export guess_id=$(jq -r '.data.id' <<< "$output")
echo "guess_id: $guess_id"