Repository guidelines for agents: Project structure and module organization - React client code lives in src/, with shared UI in src/components, feature bundles in src/features, and hooks/services under src/hooks, src/services, and src/utils. The Node.js API, GraphQL schema, and auth logic are in server/src; configs and migrations sit under server/src/configs and server/src/db. Workspace packages in packages/ expose shared config (@rm/config), localization, logging, masterfile data, and build plugins; treat them as the source of truth for cross-app utilities. Static assets are sourced from public/, while built bundles land in dist/; avoid committing build artefacts or anything listed in .gitignore.
Build, test, and development commands - yarn install installs workspace dependencies; rerun after pulling lockfile changes. yarn dev starts the full dev stack (Nodemon backend + Vite) using local config. yarn watch provides Vite-only hot reload for rapid UI work when the API is proxied elsewhere. yarn build creates a production bundle in dist/; ensure it succeeds before release PRs. yarn lint / yarn lint:fix run ESLint with the Airbnb ruleset; lint must pass pre-commit. yarn prettier / yarn prettier:fix enforce formatting for JS/JSX, CSS, HTML, and YAML. yarn config:env and yarn locales:generate regenerate env files and derived locales after editing base config or strings.
Coding style and naming conventions - Prettier governs formatting (2-space indent, single quotes in JS, semicolons off); never hand-format conflicting styles. Prefer functional React components, PascalCase for components, camelCase for helpers, and use prefixes for hooks.
Spacing discipline - DO NOT introduce or adjust margins, padding, gaps, line-height, or other spacing-related styles anywhere in the repo without explicit written permission from the user.
Testing guidelines - No dedicated Jest suite today; rely on yarn lint, type checks from editor tooling, and manual verification in a local dev session. When adding backend features, exercise relevant GraphQL/REST paths via the dev server and document sanity checks in the PR description.
Commit and pull request guidelines - Use Conventional Commits (type(scope): summary), matching existing history (e.g. feat(map): add weather overlays). Each PR should describe scope, link related issues, list testing steps, and include screenshots or GIFs for UI changes. Re-run yarn lint, yarn build, and integration steps touched by the change before requesting review.
Localization notes - Update English copy only in packages/locales/lib/human/en.json; run yarn locales:generate to refresh derived languages. When adding a new translation key (for example when calling t('some_key')), create the English entry in packages/locales/lib/human/en.json in the same change. NEVER use fallback strings. Never edit generated locale files directly - the automation pipeline syncs translations downstream.
Naming and plumbing for new filters - For example, station is the internal terminology and “Power Spots” is the player-facing label. When adding a toggle like inactive visibility, check (and update only if needed) every touch point with the same internal key: config/default.json, drawer permissions, hooks such as usePermCheck, and the server model.
Model queries - Avoid unnecessary second queries. Try to bunch all queries into a single SQL query whenever possible.