For developers · Start here
Building
On this page
How to build Gitoodo from source, run its checks and build the website with these docs.
Prerequisites#
- Rust (stable, edition 2024).
- Node.js (current LTS).
- The Tauri 2 prerequisites for your system: on macOS the Xcode Command Line Tools, on Windows the Microsoft C++ Build Tools and WebView2.
App#
npm ci
npm run tauri dev # run the app
npm run tauri build # build installers for the current OSThe installers land in target/release/bundle/ (dmg and .app on macOS, msi and nsis on Windows). Builds are made on the target system; there is no cross-compilation.
Every build embeds its identity (src-tauri/build.rs): the short and the full commit, -dirty for a modified work tree, the build time in UTC (SOURCE_DATE_EPOCH when set, for reproducible builds) and the variant direct or store. "About Gitoodo" shows it and copies it for a bug report.
Distributors set public build settings such as VITE_PROJECT_URL, VITE_DOCS_URL or VITE_FEEDBACK_RELAY_URL in the build environment or .env.local (src/core/buildConfig.ts). They are never secrets; an empty value hides the entry that uses it.
Checks#
scripts/ci-gates.sh runs every repository gate: typos, cargo fmt, clippy -D warnings, cargo test, cargo machete, cargo deny, Prettier, tsc, ESLint (type-aware), Knip, Vitest, the frontend build and the site build with its link check. GATES_FULL=1 makes a missing tool fail instead of being skipped.
GATES_FULL=1 bash scripts/ci-gates.shSingle steps:
npm run typecheck # both tsconfigs, one after the other
npm run lint
npm testWebsite and docs#
npm run site:build # landing page and docs into site/dist
npm run site:links # check the links and anchors of the built docs againsite/build.ts builds the landing page and calls site/docs/build.ts, which generates site/dist/docs/:
- User pages come from the in-app help (
src/views/help/topics.tsand the texts insrc/i18n/), the settings structure (src/views/settings/structure.ts) and the pages insite/docs/pages/<lang>/. Every page exists in all six site languages; a language without its own text gets the English one with a note. - Developer pages come from the curated documents in
docs/, the pages insite/docs/dev/and the usage text ofgitoodo --help.site/src/docs/registry.tslists every published document and the reason for every excluded one; a test fails on a new document belowdocs/until it is in one of the two lists. - Search runs in the browser over one JSON index per language below
docs/search/, served with the pages. There is no external service. - Links: the build fails on a relative link to a missing file or a missing anchor.
The in-app help links each topic to its page through src/views/help/docsLink.ts; the address comes from VITE_DOCS_URL (default: the docs of the public website).
To preview the result, serve site/dist with any static file server and open /docs/.
Releasing#
See Releasing for the release steps and how the docs get their version.