Repository navigation
phigros.tools
Sync is off until the player turns on "Sync to phigros.tools", on the game settings' Profile page, above its TapTap
login. Phigros++ then draws 16 random bytes: the player's key on phigros.tools. They are hashed (SHA-512) into an Ed25519 key and shown
in a dialog as 16 words of phigrospp/words.txt, one per byte: they are the password that
brings the profile to another device. Once the player says they saved them, the key is registered and kept in
phigros++/identity. The site reads the same word list.
The key is registered under the name the player has in Phigros (their TapTap nickname, or the name set on the profile
screen), and the server gives it a number: name#0042, unique per name and never chosen by the game. The first 12
hex characters of the key are the player's ID, and their page is phigros.tools/players/<id>. Their self-introduction
(none when they kept the game's placeholder), avatar and background go along, and any change in the game follows on
phigros.tools, a rename keeping the number when it's free. "Restore a profile", next to it, takes the 16 words on
another device: only their first 4 letters count, and the key is checked with the server before it replaces the
device's.
While sync is on, the profile card shows the number after the name, a Share button next to the profile's Edit opens Android's share sheet with the profile's link, and the page also shows "Force sync" (sends the profile, every record the game has, marked imported on the site since only replays prove a score, any kept replay of a record's exact score, the save if it's uploaded, and what waits in the outbox), the recovery phrase, and what goes to phigros.tools:
| Toggle | Default | |
|---|---|---|
| Upload my save | off | The whole save, as the game's cloud save makes it, after each song: phigros.tools reads it like a TapTap one |
| Upload replays | on | The replay of each play beating the chart's record |
| Upload play stats | on | A summary of every finished song (chart, score, judgements, length), for the player's stats on the site |
| Upload over mobile data | on | Off, uploads wait for Wi-Fi. Only on devices with a mobile network |
| Share my intro, avatar and background | on | Off, the site shows none |
| Unlisted profile | off | Left out of the leaderboards, the profile's link still opens |
The profile is kept in phigros++/profile.lua.
Requests go through the game's UnityWebRequest (phigrospp/lua/net.lua). This Unity has no SetRequestHeader, so
a signed request is its body behind the public key, an Ed25519 signature of <METHOD> <path>\n<time><body> and the
time in ms, which the server checks in web/server/auth.ts.
With sync on, a play that beats the chart's record sends its replay to POST /api/replays
(phigrospp/lua/sync.lua). Every play is still kept on the device, unsigned, and a replay is signed with the player's
key when it's sent. A replay the server didn't get waits in phigros++/outbox and goes again at every scene change.
Mods run with everything Phigros++ has (the game through il2cpp, files, the key's functions), so a mod can read the key: install only mods you trust.