# Contributing to MooshieUI Thanks for contributing. This guide covers how to set up, the checks your PR must pass, and the three core guidelines every change follows: i18n, a11y, and staying in scope. ## Setup Use Node.js 22.12+ or 24+, stable Rust, and the Tauri v2 prerequisites for your platform. The locked Svelte Vite plugin requires Node `^20.19 || ^22.12 || >=24`; Node 18 is not supported by the current frontend toolchain. Installation and Mac support are covered in the [wiki](https://github.com/Mooshieblob1/MooshieUI/wiki/Installation) and [Mac guide](https://github.com/Mooshieblob1/MooshieUI/blob/main/docs/MACOS.md). ```bash npm install npm run tauri dev # full desktop dev (Vite hot-reload) npm run dev # frontend only ``` Rust has two build targets. If you touch `src-tauri/`, check both so a desktop-only Tauri reference does not break the headless server: ```bash cargo check --manifest-path src-tauri/Cargo.toml cargo check --manifest-path src-tauri/Cargo.toml --no-default-features --features server cargo test --manifest-path src-tauri/Cargo.toml cargo fmt --manifest-path src-tauri/Cargo.toml --check cargo clippy --manifest-path src-tauri/Cargo.toml ``` There is no vitest/jest suite. A few pure-logic `node:test` files live in `scripts/tests/`; CI bundles them with esbuild and runs them in the Guardrails job. For documentation-only changes, review the documented behavior against the code and validate links; a native build is not needed unless executable code or build configuration also changes. ## Before you open a PR Run the local pre-flight: ```bash npm run check ``` This runs, in order: 1. `npm run build` (must pass), 2. `npm run check:i18n` (i18n parity, must pass), 3. `npm run check:portals` (every `fixed inset-0` overlay uses `use:portal`, must pass), 4. `npm run check:types` (svelte-check, must pass with no errors). Note on `check:types`: main has no svelte-check errors, so any error fails both `npm run check` and CI. Warnings (including a11y) are reported but don't fail; don't add new ones in the files you change. ## The three core guidelines ### i18n (blocking) All user-facing strings go through `locale.t('key')`. Never hardcode display text. When you add or change a string: - Add the key to `src/lib/locales/en.ts` (the source of truth). - Add the same key to every other locale file in `src/lib/locales/`. Missing keys fall back to English silently, so the gate catches them for you. - Keep every `{placeholder}` identical across locales for a given key. `npm run check:i18n` (and CI) fails on any missing key, extra key, or placeholder mismatch, and tells you exactly which file and key. ### a11y (advisory, becoming stricter) Interactive elements must be keyboard- and screen-reader-accessible: - Use real interactive elements (`