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 |
Build one part
Section titled “Build one part”- The server and web app
- The Garmin watch app
- Android and Wear OS
- iPhone and Apple Watch
- The push relay
How we work
Section titled “How we work”- Requirements come first.
docs/REQUIREMENTS.mddefines how LawFive behaves, and each requirement has a stable ID such asTMR-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.mdis 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.
Before you open a pull request
Section titled “Before you open a pull request”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/.