Build from source
Everything builds from this repository. You need Rust stable (install with rustup), and Node 20 or newer for the web client.
Server
cargo build --release -p koko-server
./target/release/koko-server
Add --features push for push notifications (about 1.3 MB larger). Configuration is in the Configuration page. A Docker image: docker build -t koko-server .
Desktop client (Linux)
cargo build --release -p koko-client
./target/release/koko-client
It is an iced app with a software renderer. It needs the usual desktop libraries at run time (X11 or Wayland, and xkbcommon). On first start it asks for a server address, a username and a password. Data lives in ~/.config/koko.
Web client
cd web
npm ci
npm run build # output in web/build, static files
Set PUBLIC_SERVER_URL=https://your-server before the build to point it at a server on another origin. For development:
npm run dev # http://localhost:5173/app/
The dev server proxies /api, /healthz and /ws to a server on 127.0.0.1:8080, so no CORS setup is needed. Use KOKO_DEV_BACKEND=http://127.0.0.1:18080 npm run dev for another port.
Tests
cargo test -p koko-core -p koko-db -p koko-protocol -p koko-client-core -p koko-ui
cargo test -p koko-server --features push
cd web && npm test && npm run check
The browser tests in web/e2e need Playwright and a system Chrome, and a server running with --features push.
Android
cargo install cargo-ndk
cargo ndk -t arm64-v8a -o android/app/src/main/jniLibs build --release -p koko-ffi
cargo run -p koko-ffi --features bindgen --bin uniffi-bindgen -- generate --library target/debug/libkoko_ffi.so --language kotlin --out-dir android/core-bindings/generated
cd android && ./gradlew assembleRelease
You need the Android SDK and NDK, and JDK 17. The workflow in .github/workflows/build.yml does exactly this.
iPhone
This needs a Mac. The workflow builds libkoko_ffi.a for aarch64-apple-ios, makes the Swift bindings with uniffi-bindgen, then runs XcodeGen and xcodebuild in ios/ with code signing off, and zips the app into an unsigned .ipa. Read .github/workflows/build.yml, the ios-ipa job, for the exact steps.