Skip to content
Preview. LawFive's code and server image aren't public yet, so some steps here won't work until they are.

Contribute

LawFive lives in one repository, with a folder for each part.

Folder What it is Built with
schema/ The shared data model and API description TypeScript, Zod
server/ API, accounts, sync and background jobs TypeScript, Hono, Drizzle, Better Auth
web/ The web app, served by the server React, Vite
watch-garmin/ The Garmin watch app Monkey C
mobile/android/ The Android app, with Wear OS in wear/ Kotlin, Compose
mobile/ios/ The iPhone app, with Apple Watch in LawFiveWatch/ Swift, SwiftUI
relay/ The push relay, run by the project TypeScript, Cloudflare Workers
site/ The marketing site HTML, CSS
docs-site/ This site Astro Starlight
docs/ Requirements, architecture, data fields Markdown
  • Requirements come first. docs/REQUIREMENTS.md defines how LawFive behaves, and each requirement has a stable ID such as TMR-7. Behavior changes update it in the same piece of work, and code comments refer to those IDs.
  • Keep the apps alike. The phones do the same things, as do the watches.
  • DESIGN.md is how it looks, including its rules: Phosphor icons only, no soccer balls or whistles. Check anything visible on a screen, in light and dark.
  • Keep it self-hostable. A server feature has to run in the self-hosted Docker setup.
  • Keep personal details out: local paths, keys and credentials.
  • Versions come from git (tools/version.sh). Never bump a version number by hand.

Run the tests for what you changed. Each guide above lists them. After changing the data model or API description, run pnpm generate in schema/.