Item hand-overs and campaign covers in the app; campaign library, Studio, packages and catalogs on the relay. Version code 7.
14 KiB
de-praxis
A cooperative cassette-futurist horror terminal game. Kotlin Android client, Kotlin/JDK 17 server, persistent rooms, and an optional local LLM narrator.
Download the testing release · Release and F-Droid instructions
Playable now: two authored campaigns, one or two operators, simultaneous action rounds, server-side dice, branching endings, and an Android terminal interface. Custom campaigns can be created and published through the MCP workshop. The optional LLM adds atmosphere while the relay keeps rules and outcomes authoritative.
Run the server
Install JDK 17, then from this directory:
./gradlew -PserverOnly :server:test :server:installDist
./server/build/install/server/bin/server
The relay listens at http://127.0.0.1:1337. GET /health reports status, protocol version and relay name. Room files are saved atomically under ./data; keep this directory across restarts. Run one server process per data directory.
LAN mode (no Caddy, no HTTPS): for phones on the same Wi-Fi, run
./server/build/install/server/bin/server --lan # or: --lan --port 4242
The relay listens on every interface, prints the address to enter in the app, and answers the app's Scan this network button on UDP 1337. It refuses clients outside private networks (10/8, 172.16/12, 192.168/16, link-local, IPv6 unique-local), so an accidentally forwarded port is not an open relay. Allow the HTTP port and UDP 1337 through the computer's firewall. LAN mode cannot be combined with PUBLIC_ORIGIN or proxy settings; use the hosting guide for internet play.
To configure the relay from another device on your trusted LAN, add --lan-admin:
./server/build/install/server/bin/server --lan --lan-admin
Open the printed http://<relay-IP>:1337/admin URL and enter the key from data/admin.key (or your configured data directory). Use the relay's numeric IP, not a hostname. Admin access stays local-only without this explicit option. Leave ADMIN_REMOTE_ACCESS unset/false; it is for HTTPS proxy administration, not LAN mode.
Server control room: open http://127.0.0.1:1337/admin and unlock it with the key in data/admin.key (the startup log shows its path). Choose Dark CRT, Light Archive or the system theme. Configure LLM endpoints, discover models, test generation, tune context/thinking/history settings, monitor crews, and manage MCP API keys without restarting. Navigation stays hidden until the admin key is verified. Control panel guide.
Internet hosting: use the HTTPS deployment guide and bundled deploy/ templates. The supported setup keeps Java/inference ports private, exposes game routes through Caddy, and administers the relay over an SSH tunnel. Request, room, and inference limits are enabled in the application as well.
Configuration (command-line flags override environment variables; --help lists them):
| Environment variable | Flag | Default | Purpose |
|---|---|---|---|
PORT |
--port N |
1337 |
HTTP port |
HOST |
--host ADDRESS |
127.0.0.1, or 0.0.0.0 in LAN mode |
Listen address |
LAN_MODE |
--lan |
false |
Serve phones on the local network directly over HTTP |
LAN_ADMIN_ACCESS |
--lan-admin |
false |
With LAN mode, allow keyed administration at the relay’s numeric IP over HTTP |
DISCOVERY |
--no-discovery |
on in LAN mode | Answer app scans on UDP 1337 |
DATA_DIR |
--data DIR |
data |
Private rooms, settings, MCP key hashes, drafts and published campaigns |
LLM_URL |
unset | Full OpenAI-compatible chat-completions URL | |
LLM_MODEL |
local |
Model identifier accepted by the inference server | |
LLM_API_KEY |
unset | Optional inference server bearer token | |
ADMIN_TOKEN |
generated data/admin.key |
Admin panel credential (at least 24 characters) |
LLM environment variables initialize the configuration on first start. After that, settings saved in the control room take precedence and persist in data/server-settings.json.
For a local llama.cpp-compatible inference server:
LLM_URL=http://127.0.0.1:8081/v1/chat/completions \
LLM_MODEL=your-storytelling-model \
./server/build/install/server/bin/server
The game works without an inference server. Model calls default to a six-second timeout (configurable from 2–30 seconds) and fall back to the authored narration. The model integration adds atmosphere after resolved rounds; it does not yet interpret arbitrary actions or override rules. Authoritative outcomes are saved before the model is contacted.
Connect an assistant through MCP
The server includes a Streamable HTTP MCP endpoint at /mcp. The server in the 0.2.0-alpha.2 release and later includes it.
- Unlock
/adminand open MCP access. - Generate a named API key with an expiry and selected permissions. Reading and editing drafts are selected by default; publishing and relay monitoring are separate permissions.
- Copy the key before dismissing it; its plaintext is shown once and only its hash is stored on the server.
- Connect your MCP client to
http://127.0.0.1:1337/mcp, usingAuthorization: Bearer <API key>. Store the key in the client's secret store. Revoke it from the panel when access is no longer needed.
| Tools | Purpose |
|---|---|
campaign_list, campaign_get, campaign_guide |
Inspect campaigns, authoring instructions and the JSON schema |
campaign_create, campaign_save |
Copy a template or save a complete custom draft |
campaign_validate, campaign_preview |
Find rule errors and preview an opening for each role without creating a live room |
campaign_publish, campaign_unpublish |
Add or remove reviewed campaigns from the app's picker |
relay_status |
Inspect narration counters and room summaries without exposing credentials |
For example: “Create a new coastal horror campaign from the Hollow Point template. Rewrite its story, validate it, preview both roles, and show me the result before publishing.” The connected assistant writes the campaign; the relay validates and runs it. Copying a template alone preserves its existing story and license.
Drafts stay separate from the player catalogue. Hash checks protect concurrent edits, and running rooms retain their original campaign version through publication changes and server restarts. An opening preview is not a full playthrough.
MCP follows the admin network restrictions: loopback by default, or --lan --lan-admin for trusted LAN testing. The supplied public proxy blocks it; use an SSH tunnel for a hosted relay. Clients need support for pre-issued bearer headers; OAuth discovery is not implemented. See the connection, permissions and authoring guide.
Run Android
Open the project in Android Studio with an Android 35 SDK installed, or:
./gradlew :android:assembleDebug
adb install -r android/build/outputs/apk/debug/android-debug.apk
Both debug and testing release APKs support local HTTP connections. Use HTTPS for servers outside a trusted LAN. The app trusts CA certificates installed by the user (Settings → Security → Encryption & credentials → Install a certificate → CA certificate), so a relay behind a private or self-hosted CA, such as Caddy's internal CA, works once its root certificate is installed on the phone. The app has two relay modes. LAN connects over plain HTTP to a server started with --lan: tap Scan this network to find it, or enter its IP and port. Over USB, run adb reverse tcp:1337 tcp:1337 and use 127.0.0.1 (the emulator default is 10.0.2.2). Hosted takes the https:// address of a relay behind a proxy.
Turn alerts: while a game is unfinished and the app is in the background, de-praxis checks the relay every 10 seconds and notifies you when a new cycle starts, the host begins, a crewmate joins or is waiting on you, and when the game ends. A quiet "relay watch" notification shows while it runs; it stops when you return to the app, when the game ends, or after two hours without changes. Turn it off with ALERTS ON/OFF in the game screen or Stop alerts on the notification. No Google services are involved, so it works with self-hosted relays and F-Droid builds.
Create a transmission, share its six-character room code, and let the other operator join before the host begins. The host can also begin alone. Each round advances once every operator has submitted. A successful action is shown to both operators on the next poll (every 1.5 seconds while the app is visible).
The client keeps its room and operator token across restarts. LEAVE forgets that device's session; it does not remove the operator from the room. Keep the app session if you intend to reconnect to an active two-player game. There is no timeout, host kick, or session transfer yet.
Play the first campaign: Dead Channel
North Sea Relay 09, November 1986. The evacuation alarm has been playing for thirteen years. Tonight, it says your names.
You have twelve rounds before an unknown signal reaches the mainland. Restore emergency power and decode the evacuation signal. Then escape, optionally containing the presence first.
| Tactic | Effect |
|---|---|
| Observe | Automatically prepare yourself: +3 to your next check |
| Restore | DC 10 to bring emergency power online |
| Decode | DC 10 to recover the evacuation code |
| Contain | With power and code already available, DC 10 to isolate the presence |
| Escape | With power and code already available, escape without a roll |
| Improvise | Free-form description; DC 10 to grant everyone preparation |
Engineers receive +4 on Restore and Contain. Analysts receive +4 on Decode. Other checks receive +1. Preparation adds +3 and is consumed by a check; it does not stack. Teammates' actions resolve in crew order, with Escape last, so containment can finish before a teammate opens the airlock. Requirements are checked when submitting: you cannot choose Contain or Escape until power and the code are already available.
Free text is preserved in the transcript. For this slice, the selected tactic determines its mechanical effect. Flexible intent interpretation, combat, generated campaign graphs, lore ingestion, and DM exceptions are future work.
Campaign endings (spoilers)
- SILENT SHORE: contain the signal, then escape.
- CARRIER: escape while the signal remains active.
- DEAD AIR: spend all twelve rounds before escaping.
Write your own campaign
Campaigns are JSON files in the de-praxis/campaign@1 format: roles, actions, checks, scenes, clues and endings, with no code. Dead Channel itself is written this way in dead-channel.json; hollow-point.json adds locations, items, stats and private information. Check a campaign with:
./server/build/install/server/bin/server campaign validate my-campaign.json
See the format reference. Or write one in the Studio in your relay's control panel (/admin/studio): forms or raw JSON with live validation, a flow view of what leads where, play-tests on the real engine with forced dice, and simulations of hundreds of games.
Share a campaign as a .dpc package (campaign pack, or Download .dpc in the Studio). Other relays import it under Campaign library, or follow a catalog: a static index.json that lists packages, written by campaign catalog and hostable on any web server. The app lists the campaigns a relay offers when you create a room, and rooms keep the exact version they started with.
Campaigns can also be written through the MCP workshop with scoped API keys. Draft editing stays separate from publishing to the shared library.
Verify
./gradlew -PserverOnly :server:test
./gradlew :android:assembleDebug :android:lintDebug
python3 scripts/smoke.py http://127.0.0.1:1337
The smoke test creates its own room on a running server. The 101 server tests cover campaign compilation and mechanics, shared rounds, replay protection, authorization, storage recovery, inference controls, MCP transport, scoped key expiry/revocation, stale-edit protection, and campaign publication without changing running rooms. MCP interoperability was also checked with the official Python SDK 2.3.0.
Layout
shared/: serializable request/response types shared by client and server.server/: campaign rules, atomic room storage, game/admin HTTP APIs, MCP workshop, optional model adapter.server/.../campaign/: campaign format, validator, engine, packages, catalogs, simulator and thecampaign validate/pack/simulate/catalogcommands.android/: Jetpack Compose terminal, network client, session recovery.docs/architecture.md: contracts and next steps.
This prototype uses original setting material and a small original dice system. For public testing, follow the internet-hosting guide. It remains an anonymous game service with bounded resources; accounts and recoverable user identities are future work.
License
de-praxis is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. See LICENSE.
See presentation and pacing for the current Dead Channel story flow, action rules and isolated Android Preview builds.

