rmnr
DocsTourSlicesBest PracticeAgentsInstall

Command Palette

Search for a command to run...

New

Slice · AI prompt

System Monitor — host telemetry dashboard

Activity-Monitor-style dashboard: CPU/RAM/disk/GPU gauges, sparklines, live process table — telemetry injected.

Resource detail View source
Copy this prompt into Claude / Codex / Cursor
system-monitor.prompt.mdmarkdown
# Install `system-monitor` — System Monitor — host telemetry dashboard

> Activity-Monitor-style dashboard: CPU/RAM/disk/GPU gauges, sparklines, live process table — telemetry injected.

📚 Knowledge base : https://resource.rahmanef.com/llms.txt
📦 Slice detail   : https://resource.rahmanef.com/slices/system-monitor
🧠 JSON catalog   : https://resource.rahmanef.com/api/knowledge?slice=system-monitor
🔗 Source         : https://github.com/rahmanef63/resource-site/tree/main/frontend/slices/system-monitor

## 1. Install

```bash
npx rahman-resources add system-monitor
# alias: npx rr add system-monitor
```

The CLI copies `frontend/slices/system-monitor/` into your project + augments `.env.example` + installs npm deps automatically. Run it from your project root.

## 2. What it ships

- npm: `lucide-react`
- shadcn primitives: `scroll-area`

## 3. Wire it up

Stack: Next 16 + React 19 + Tailwind 4 + shadcn/ui. Host telemetry dashboard. Fully client-side; no backend required.

STEP 1 — Install. `npx rr add system-monitor`. Ensure `@/features/system-monitor` resolves and Tailwind scans the slice folder.

STEP 2 — Deps. npm: `lucide-react`. shadcn: `npx shadcn@latest add scroll-area`.

STEP 3 — Mount. `<SystemMonitor />` in a height-bearing box — unwired it runs a wavy in-browser telemetry mock. Or register `systemMonitorApp` in an appshell manifest.

STEP 4 — Real telemetry. `configureSysmon({ mode:"live", stats, processes })` — stats returns { cpu:{pct,cores}, mem:{used,total}, disk:{used,total}, net?:{rx,tx}, uptime }; processes returns [{ pid, name, status, cpu, mem }].

## Rules of engagement

- shadcn-only UI primitives. No raw `<button>` / `<dialog>` / native date or file inputs.
- 200-line hard cap per source file (extract neighbours when over).
- All Convex queries hit an index (`.withIndex(...)`); never bare `.collect()`.
- Public mutations/queries declare `args:` validators + authz.
- Full ruleset: https://resource.rahmanef.com/best-practice

The agent will fetch /llms.txt for the full ruleset and use /api/knowledge for the JSON catalog.