···11+# Man Hunt
22+33+An iOS and Android app that lets you play man hunt with friends.
44+55+The game is played over WebRTC Data Channels and is entirely P2P (except for the
66+signaling process needed for WebRTC.)
77+88+<!-- TODO: Download & Install instructions for when we get to publishing -->
99+1010+## Development
1111+1212+### Pre-requisites
1313+1414+If you have [nix](https://nixos.org) installed, all of these are handled for you.
1515+1616+- [Rust](https://rustup.rs)
1717+- [Just](https://just.systems) (`cargo install just`)
1818+- [Tauri's Pre-reqs](https://tauri.app/start/prerequisites/)
1919+ - [(Also pre-reqs for mobile dev if you are working on the app part)](https://tauri.app/start/prerequisites/#configure-for-mobile-targets)
2020+- Tauri's CLI (`cargo install tauri-cli`)
2121+- [NodeJS](https://nodejs.org)
2222+2323+#### With Nix
2424+2525+Run `nix develop` to get a development shell with all needed dependencies set up.
2626+You can then call the `just` recipes mentioned below.
2727+2828+### Setup
2929+3030+- Rust is ready to go
3131+- For the frontend, run `just setup-frontend` to install the dependencies via `npm`
3232+3333+### Run App
3434+3535+- `just dev`: Will run the app locally on your computer, this will open a
3636+ WebView with the frontend
3737+ - Note: all geolocation returned from tauri-plugin-geolocation will be hard
3838+ coded to `(0.0, 0.0)` in this mode.
3939+- `just dev-android`: Will run the app on a connect Android device or VM via ADB
4040+- `just signaling`: Will run the signaling server on port `3536`
4141+ (this is needed for clients to connect)
4242+4343+### Project Layout
4444+4545+- [backend/](https://github.com/Bwc9876/manhunt-app/tree/main/backend): App
4646+ backend, Rust side of the Tauri application
4747+- [frontend/](https://github.com/Bwc9876/manhunt-app/tree/main/frontend): App
4848+ frontend, Web side of the Tauri application
4949+- [nix/](https://github.com/Bwc9876/manhunt-app/tree/main/nix): Nix files for
5050+ the flake
5151+- [manhunt-signaling/](https://github.com/Bwc9876/manhunt-app/tree/main/manhunt-signaling):
5252+ Matchbox signaling server implementation in Rust
5353+5454+### Housekeeping
5555+5656+As you go, please run these `just` commands every-so-often and before you commit:
5757+5858+- `just fmt`: Formats all files in the repo
5959+- `just check-backend`: Check (and fix) potential issues on the backend
6060+ (only need to run if you edited the backend)
6161+- `just check-frontend`: Check for potential issues on the frontend
6262+ (only need to run if you edited the frontend)
6363+- `just check-signaling`: Same thing as backend but for the singaling server
6464+6565+**Important**: When changing any type in `backend` that derives `specta::Type`,
6666+you need to run `just export-types` to sync these type bindings to the frontend,
6767+otherwise the TypeScript definitions will not match that ones the backend expects.
6868+6969+All changes made will be put through CI to check that all of these commands have
7070+been done.
7171+7272+### Other Just Recipes
7373+7474+Run `just` without any args to get a list.