app/hosts the Electron renderer (React + Tailwind);lib/contains shared TypeScript modules, preload logic, and unit tests.server/holds the Bun-based transcription API, database migrations, and infrastructure scripts.native/includes Rust crates for keyboard, audio, and text bridges; rebuild via scripts as needed.resources/provides packaging assets (icons, updater configs), whilebuild/andout/house generated installers; avoid editing build outputs.- Use
scripts/for automation and keep generated proto/constants underlib/generated(created by build steps).
bun installaligns dependencies after pulls.bun run devstarts the Electron shell with live reload;bun run dev:rustrebuilds native bridges via./build-binaries.shbefore launching.- Packaging:
bun run build:appfor cross-platform; usebun run build:mac/bun run build:winfor platform installers. - Backend (
server/):bun install,bun run local-db-up(Postgres),bun run db:migrate,bun run dev.
- TypeScript + React across app/lib; server targets modern ECMAScript on Bun.
- Prettier (2-space indent) and ESLint enforce formatting. Run
bun run formatandbun run lint(or*:appvariants) before submitting. - Components/classes use
PascalCase, hooks/utilitiescamelCase, constantsSCREAMING_SNAKE_CASE. Co-locate Tailwind styles with components and reuse tokens vialib/constants. - Always prefer console commands over log commands. E.g. use
console.loginstead oflog.info.
- Unit tests run with Bun. Renderer/shared specs live in
lib/__tests__; server tests reside underserver/src/**. Name files with.test.ts. - Run
bun run runLibTests,bun run runServerTests, orbun run runAllTests; paste output in PR notes. - Seed backend tests with
bun run local-db-upand avoid hitting external services—mock microphone, OS, and network dependencies.
- Conventional commits are enforced via commitlint (example:
feat(app): add dictation overlay). Scope by top-level folder. - PRs need a summary, linked issue, test commands, and screenshots/GIFs for UI work. Call out schema/config updates and refresh
.env.examplefiles.
- Copy
.env.example(root) andserver/.env.example; never commit credentials. - After modifying protobufs or constants, run
bun run generate:constantssolib/generatedstays in sync with the app bundle.