rmi-frontend/CONTRIBUTING.md
crmuncher c65a919910
All checks were successful
CI / build (pull_request) Successful in 1m6s
chore(rmi-frontend): add CONTRIBUTING.md + .gitattributes per fleet-template standards
- Add CONTRIBUTING.md — adapted from rmi-backend, swap pip/pytest commands for bun/biome/vitest/playwright; reference AGENTS.md non-negotiable rules (DataBus, lazy, no raw fetch, no missing lucide icons)
- Add .gitattributes — LF normalization, lockfile binary flags, generated-path linguist overrides

CI: existing .forgejo/workflows/ci.yml already runs biome format + biome lint + tsc + vitest + build on every push and PR — strict and complete. Project uses bun, not pnpm, so no change.

Refs: standards/GAPS.md#9 (Repo tooling parity), standards/GAPS.md#12 (Documentation contradictions)
2026-07-06 14:23:06 +02:00

2 KiB

Contributing to RMI Frontend

React 19 + Vite + TypeScript SPA at rugmunch.io. Read AGENTS.md first — it contains the architecture rules and development constraints.

Quick Start

  1. Read AGENTS.md — it contains the non-negotiable rules (DataBus only, lazy loading, no raw fetch).
  2. Clone the repo and install deps:
    bun install --frozen-lockfile
    
  3. Run dev server:
    bun run dev   # http://localhost:5173
    
  4. Run tests:
    bun run test
    

Code Standards

  • Formatter: bun run format (biome write)
  • Linter: bun run lint (biome)
  • Type checker: bun run typecheck (tsc --noEmit, strict mode)
  • No file > 500 lines. Split god components into modules.
  • No raw fetch() in pages/components. Use useDataBus() hook or DataBusClient.
  • All pages must use React.lazy() + dynamic import. Layout components are static imports.
  • Pre-render shells. Every data component shows a skeleton while loading.
  • No lucide-react icons without verifying the export exists (Whale, ShieldAlert, Siren are missing).

PR Process

  1. Create a feature branch: git checkout -b feat/your-change
  2. Make changes following the code standards above.
  3. Add tests (vitest for units, playwright for e2e).
  4. Run the full check pipeline locally:
    bun run check   # biome check --write + tsc --noEmit
    bun run test
    bun run build
    
  5. Commit with conventional commits (feat:, fix:, chore:, docs:, refactor:, test:, perf:).
  6. Push to origin and open a PR. The Forgejo CI will run biome lint + format + tsc + vitest + build.

Where to Start

  • Look for issues labeled good-first-issue or help-wanted.
  • Replace any types in src/**/*.tsx (current debt: ~850 per LINT_TODO.md).
  • Reduce bundle size on the largest lazy chunks (MCPDocsPage.tsx ~101 KB).
  • Fix biome warnings (bun run check).
  • Improve documentation under docs/.

Questions

Open a GitHub issue or Forgejo discussion if unsure. We're happy to help.