Skip to content

About

Local desktop app for daily mouse weigh-ins, colony notes, and interactive weight curves

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

MouseWeightLogger

MouseWeightLogger icon

Daily mouse weigh-ins, a colony roster, and weight curves. Local on your computer, offline-first. Share a colony with another machine when you want to.

Screenshots

Today — weigh-in cards with sex, age, last weight, and % of baseline.

Today weigh-in screen

Mice — roster by cohort, CSV export, photos and metadata.

Mice roster grouped by cohort

Curves — pan, zoom, baseline line, PNG export.

Weight curves viewer

Colonies — header pills. + creates or joins; the pencil edits, shares, or removes.

Add a colony or join with a code Edit colony, share, remove from this computer

Install

Download MouseWeightLogger 0.2.1.

Mac (Apple silicon) — MouseWeightLogger_0.2.1_aarch64.dmg. Double-click the disk image and drag MouseWeightLogger into Applications. macOS may block the first launch because the app is not notarized. Right-click the app, choose Open, then Open again.

Windows — MouseWeightLogger_0.2.1_x64-setup.exe. Double-click it and follow the installer. Windows SmartScreen may warn because the app is not signed. Choose More info, then Run anyway.

Run from source

You need Node.js and Rust.

npm install
npm run tauri dev

Build an installer: npm run tauri build

How it works

On this computer

Each install keeps its own SQLite database and photo folder under the OS app-data path (macOS: ~/Library/Application Support/com.maxchalabi.mouseweightlogger/). Everything works offline. Weigh-ins, roster edits, and curve settings stay on disk until you share.

Colonies

A colony is one log: its mice, weights, settings, and photos. The header pill selects which colony Today, Mice, and Curves show. You can keep several colonies on one machine; they do not mix data.

The first launch creates This computer as a private colony. + adds another local colony or joins an existing one with an invite code.

Sharing

The computer that shares a colony becomes its host. Its database is the shared copy. Other computers join with a code, keep their own local copy, and sync with the host whenever it is on. There is no cloud service, account, or server to keep alive.

An owner opens the pencil drawer and taps Invite an owner or Invite a watcher. The app shows a one-time code; the other computer types it in + → Join colony. The code includes the host's address, so it is long: copy and paste it.

Role Can do
Owner Edit mice and weights, invite, rename the colony, remove devices
Watcher View Today, Mice, Curves; export CSV

Codes expire after 7 days and work once.

The host computer must be on, with the app open, for other computers to sync. When it is off, other computers show the last copy they synced and keep working from it. Owner edits made meanwhile queue locally and upload when the host returns. If two owners change the same mouse or the same day's weight, the later edit wins.

Remove from this computer on a joined computer leaves the colony; the host and others keep their copy. On the host it deletes the shared copy and stops sharing, and other computers keep a private copy of what they last synced. The confirmation says which applies.

Sync backend

Computers connect directly using iroh: encrypted QUIC connections that work across home and lab networks without port forwarding. iroh's public relay servers help two computers find each other and carry traffic only when a direct connection is impossible; all traffic is end-to-end encrypted, so relays cannot read it.

Rough flow:

  1. Share — the computer becomes the host and lists itself as the colony's owner. Its node id (a stable key kept in the app data folder) goes into every invite code.
  2. Join — the other computer connects to the host, redeems the code, and pulls the colony into its local SQLite.
  3. Sync loop — joined owners push changed rows and pull the host's copy; watchers pull only. The host answers over a long-poll so changes appear within seconds. Photos are fetched on demand.
  4. Access control — each computer sends a secret token with every request. The host stores only a hash and checks the member's role on each request.

The Rust side (src-tauri/src/p2p.rs) is only a transport. The host's database logic lives in src/lib/host.ts and the client side in src/lib/sync.ts. Local schema lives in src-tauri/migrations/ and src/lib/db.ts. Soft deletes (deleted_at) and updated_at timestamps drive merge.

Upgrading from the Supabase version: the hosted project is no longer used. Colonies that were shared that way become private colonies on each computer, with the full local data intact. Pick one computer, open the colony's drawer, and share it again to make that computer the host; the others rejoin with a new code (rejoining replaces nothing: rows merge by id).

Stack

Tauri 2, React, TypeScript, Tailwind, SQLite (tauri-plugin-sql), Plotly, iroh.

License

MIT

About

Local desktop app for daily mouse weigh-ins, colony notes, and interactive weight curves

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages