Live location tracking and playback for the game "manhunt"
Rust 66.9%
TypeScript 12.1%
Nix 5.6%
Shell 5.6%
Kotlin 4.9%
Batchfile 2.6%
Just 1.3%
JavaScript 0.7%
HTML 0.3%
28 2 0

Clone this repository

https://tangled.org/bwc9876.dev/manhunt-app https://tangled.org/did:plc:x7tlupbnqot7nu6udnffnv4h/manhunt-app
git@knot.bwc9876.dev:bwc9876.dev/manhunt-app git@knot.bwc9876.dev:did:plc:x7tlupbnqot7nu6udnffnv4h/manhunt-app

For self-hosted knots, clone URLs may differ based on your setup.

Download tar.gz
README.md

Man Hunt#

built with garnix

An iOS and Android app that lets you play man hunt with friends.

The game is played over WebRTC Data Channels and is entirely P2P (except for the signaling process needed for WebRTC.)

Development#

Pre-requisites#

If you have nix installed, all of these are handled for you.

With Nix#

Run nix develop to get a development shell with all needed dependencies set up. You can then call the just recipes mentioned below.

Setup#

  • Rust is ready to go
  • For the frontend, run just setup-frontend to install the dependencies via npm

Run App#

  • just dev: Will run the app locally on your computer, this will open a WebView with the frontend
    • Note: all geolocation returned from tauri-plugin-geolocation will be hard coded to (0.0, 0.0) in this mode.
  • just dev-android: Will run the app on a connect Android device or VM via ADB
  • just signaling: Will run the signaling server on port 3536 (this is needed for clients to connect)

Project Layout#

  • backend/: App backend, Rust side of the Tauri application
  • frontend/: App frontend, Web side of the Tauri application
  • nix/: Nix files for the flake
  • manhunt-signaling/: Matchbox signaling server implementation in Rust

Housekeeping#

As you go, please run these just commands every-so-often and before you commit:

  • just fmt: Formats all files in the repo
  • just check-backend: Check (and fix) potential issues on the backend (only need to run if you edited the backend)
  • just check-frontend: Check for potential issues on the frontend (only need to run if you edited the frontend)
  • just check-signaling: Same thing as backend but for the singaling server

Important: When changing any type in backend that derives specta::Type, you need to run just export-types to sync these type bindings to the frontend, otherwise the TypeScript definitions will not match that ones the backend expects.

All changes made will be put through CI to check that all of these commands have been done.

Other Just Recipes#

Run just without any args to get a list.