Montara Pass
Operations

Development

Scripts, lint and format rules, commit hooks and the checks to run.

Scripts

Run from the repository root.

CommandWhat it does
pnpm devEvery app in parallel
pnpm dev:serverThe API on port 8080
pnpm dev:appThe web app on port 5173, proxying /api to the API
pnpm dev:webThe marketing site on port 5174
pnpm dev:docsThis site on port 3001
pnpm buildBuild every app
pnpm build:extensionBuild the extension for Chrome and Firefox
pnpm lint, pnpm lint:fixoxlint
pnpm format, pnpm format:checkoxfmt

Lint and format

  • oxlint reads .oxlintrc.json. The correctness category is an error, imports must be sorted (perfectionist/sort-imports, fixed by pnpm lint:fix), and a few rules are off because the code relies on what they forbid, such as the children prop of TanStack Form fields.
  • oxfmt reads .oxfmtrc.json: no semicolons, single quotes, 100 columns. apps/web has its own config and keeps semicolons and double quotes. Markdown and MDX are not formatted.

Go code in apps/server is formatted with gofmt and is not part of either tool.

Commits

pnpm install sets up two git hooks with husky.

HookRunsEffect
pre-commitlint-stagedoxlint and oxfmt on the staged JS and TS files, oxfmt on staged JSON, CSS and YAML
commit-msgcommitlintRejects a message that is not a conventional commit

A message looks like type(scope): subject, for example fix(server): refuse a stale revision. The types are the conventional ones: feat, fix, docs, chore, refactor, test, ci, build, perf, style and revert. The release workflow reads these messages to choose the next version and to write the changelog.

Checks before a change

pnpm lint && pnpm format:check
pnpm --filter @montara-pass/app run typecheck
pnpm --filter @montara-pass/extension run typecheck
pnpm --filter @montara-pass/docs run typecheck
pnpm --filter @montara-pass/server run test

The server's integration test needs a real database; see Migrations.

Adding a page to the web app

Routes are files under apps/app/src/routes. A new file such as (app)/reports/index.tsx becomes /reports, inside the signed-in shell, and src/routeTree.gen.ts is regenerated by the dev server or the build. That file is generated: do not edit it.

Adding a docs page

Pages are MDX files under apps/docs/content/docs. The file path is the URL, title in the frontmatter is the heading, and the folder's meta.json sets the order in the sidebar.

On this page