Files
TREK/wiki/Contributing.md
T
Maurice 7da0080557 docs(wiki): bring the wiki in line with 4.0.0 (#2034)
* docs(wiki): correct the install and operations pages for 4.0.0

Quick Start passed docker an empty ENCRYPTION_KEY: an assignment prefix is not
expanded on the same command line, so the server silently generated its own key
instead of taking the one the page told you to set. The tag examples pinned to
the 3.x line, the documented tmpfs size did not match the shipped compose file,
and several .env values were described as reaching the container when compose
never interpolates them.

* docs(wiki): match the MCP reference to the registered surface

The scope table was missing the whole Collections group and the totals said 27
scopes across 13 groups where the code registers 29 across 14. The Cloudflare
link on the setup page pointed at an anchor on its own page instead of the
heading on Troubleshooting.

* docs(wiki): correct the plugin and admin pages

Three links to Plugin-Development carried a .md suffix, which does not resolve on
the wiki. The admin pages described tabs, permissions and storage behaviour that
had moved on.

* docs(wiki): bring the feature pages back in line with the app

Costs still documented the old panel, where categories could be added, renamed,
reordered and deleted; they are fixed now and the panel is a day-grouped ledger
with settlements. Trip sharing, journeys, maps, packing, reservations and the
account pages had all drifted in the same way.

* docs(wiki): cover the pages the first pass did not reach

The MCP catalog listed 168 of the 201 registered tools; the settlement tools and
rate_place were missing here and the Collections family from the addon page.
Several resource rows claimed a trips:* scope where the handler asks for
trips:read.

* docs(wiki): tighten the corrections a review picked apart

The audit-log resource is the row id, not the credential id; an admin password
reset does not bump password_version the way the page implied; and a few of the
new paragraphs described behaviour more confidently than the code supports.

* docs(wiki): fix what a last read-through caught

Costs shows every figure in your display currency, not the trip's, and an
expense with no payer still counts against the members it is split between.
Studio's cutoff is a 1024px viewport rather than phones alone, and the
Integrations tab is gated on the providers an admin has configured.

* docs(wiki): the last few the review caught

A passkey satisfies the MFA policy everywhere except the WebSocket handshake,
which still asks for TOTP, so a passkey-only account under that policy gets no
live updates. Mobile optimizes a day from two places, not three. The ctx.db row
carried an unescaped pipe that split the table, and the Backups table linked
with a wiki link whose pipe did the same.
2026-08-25 12:36:52 +02:00

3.3 KiB

Contributing

Thanks for your interest in contributing to TREK! Here are the guidelines for submitting pull requests.

Before You Start

  • Ask in Discord first — Before writing any code, pitch your idea in the #github-pr channel on our Discord server. We'll let you know if the PR is wanted and give direction. PRs without prior approval will be closed
  • Check existing issues — Look for open issues or discussions before starting work
  • Target the dev branch — All PRs must be opened against dev, not main. Exception: PRs that only modify files under wiki/ may target any branch
  • One thing per PR — Keep PRs focused on a single change. Don't bundle unrelated fixes

Pull Request Guidelines

Code Quality

  • Write clean, readable code that matches the existing style
  • No unnecessary abstractions or over-engineering
  • Don't add features beyond what was discussed in the issue
  • Don't add comments unless the logic isn't self-evident
  • Don't add error handling for scenarios that can't happen

What We Look For

  • Does it solve the stated problem? — The PR should match the issue it addresses
  • Is it minimal? — No extra refactoring, no "while I'm here" changes
  • Does it break anything? — Breaking changes are not acceptable
  • Is the code clean? — Consistent style, no debug logs, no dead code

Commit Messages

Use conventional commits:

fix(component): short description of what was fixed
feat(component): short description of new feature

PR Description

Follow the template provided by default (.github/PULL_REQUEST_TEMPLATE.md).

What Will Get Your PR Closed

  • PRs that weren't discussed and approved in #github-pr on Discord first
  • PRs that add unnecessary complexity (e.g. a redo button when undo already exists)
  • PRs with breaking changes
  • PRs that change code style or formatting across unrelated files
  • PRs that add dependencies without justification

Development Setup

See the Development Environment page for the full setup guide, including forking, remote configuration, branch conventions, and available scripts.

Tech Stack

Layer Technology
Frontend React 19, TypeScript, Zustand 5, Leaflet, Tailwind CSS 3.4, Vite 8 (Rolldown)
Backend NestJS 11 (Express 4 adapter), TypeScript, better-sqlite3, Zod (@trek/shared)
Real-time WebSocket (ws)
Database SQLite with WAL mode
Auth JWT (HS256), bcrypt, TOTP MFA, OIDC
Maps Leaflet + react-leaflet (default, CartoDB tiles), MapLibre GL, Mapbox GL, OSRM, Nominatim
i18n 23 languages, EN canonical (locale directories live in shared/src/i18n/)

Every translation key must exist in all 23 locales — the i18n Key Parity CI job fails on drift, so run npm run i18n:parity:strict --workspace=shared before pushing. Two directory names differ from the language they hold: Brazilian Portuguese is br, Greek is gr.