Skip to content

feat/kickstarter-refactoring#37

Open
mateuscardosodeveloper wants to merge 10 commits into
masterfrom
feat/kickstarter-refactoring
Open

feat/kickstarter-refactoring#37
mateuscardosodeveloper wants to merge 10 commits into
masterfrom
feat/kickstarter-refactoring

Conversation

@mateuscardosodeveloper
Copy link
Copy Markdown
Contributor

@mateuscardosodeveloper mateuscardosodeveloper commented May 20, 2026

What does PR do?

Full rewrite of the Kickstarter template. The previous Node + Vitest scaffold is replaced by a Deno workspace that ships a complete multi-tenant TagoIO application — analyses, custom dashboard widgets, and the in-app helper docs that every dashboard renders.

🏗️ Toolchain switch

  • Drops package.json, tsconfig.json, vitest.config.js, biome.json, tagoconfig.json, the legacy src/ tree and the docs PDF.
  • New root deno.json defines the workspace, shared tasks, fmt and lint config.
  • CI moves from npm ci / test / build on Node 18 to deno install / fmt:check / lint / test on Deno 2.7.
  • VS Code workspace settings turn on the Deno LSP, use deno fmt as formatter, and wire Tailwind IntelliSense for each widget.

📐 New repo layout

  • app/ — Deno workspace with one self-contained analysis per file. No bundle step: each .ts is copy/paste-ready into a TagoIO Analysis.
    • analysis/dashboard/ — CRUD analyses for organizations, groups, sensors, alerts and users, dispatched by the SDK's AnalysisRouter.
    • analysis/actions/ — uplink handler that feeds the Cold Room widgets, and the per-alert dispatcher.
    • analysis/scheduled/ — hourly inactivity check that powers the Sensors connectivity summary.
  • widgets/ — Vite + React 19 + Tailwind v4 workspace with three production widgets:
    • sensor-status (Sensors / Overview)
    • cold-room-card-data (Groups / Cold Rooms)
    • cold-room-monitor (Sensor Detail / Overview)
    • Plus widgets/shared/ for cross-widget helpers and a build.ts that builds every widget into _dist/<name>/.
  • dashboard-helpers/ — markdown rendered inside each dashboard's Helper tab (Organizations, Groups, Sensors, Alerts, Users, Freezer Simulator).

📚 Documentation

  • Root README.md rewritten around the actual application: multi-tenant model (Organization → Group → Sensor), full dashboard map with the CRUD analysis and custom widget for each one, and the three top-level workspaces.
  • app/README.md documents the self-contained-file convention, the AnalysisRouter mapping (input form / custom button / device list) and the manual deploy flow (copy/paste into the TagoIO admin panel).
  • widgets/README.md covers the iframe model, the four root files, hooks-only data access, HTTPS tunnel dev flow and how to add a new widget.

🔌 Impact

  • Anyone consuming the previous Node/Vitest scaffold will need to switch to Deno and to the new analysis/widget structure.
  • No automated deploy: analyses are deployed by copy/pasting the file contents into the TagoIO admin panel; widgets are uploaded as the contents of widgets/_dist/<name>/.

TODOs

  • Visual harmony for custom widgets — Align sensor-status, cold-room-card-data and cold-room-monitor with the look-and-feel of the surrounding TagoIO dashboard widgets (typography, spacing, colors, card chrome) so the iframes stop looking like a separate app.
  • One-shot alert dispatch — Today every alert except Inactivity fires on every matching uplink, which is noisy. Add edge-triggered behavior: notify once when the condition becomes true, suppress while it stays true, and reset when the sensor returns to a normal state.
  • Celsius support in widgets — Honor the user's temperature preference from TagoRUN user settings. When it is set to Celsius, render every temperature value in the custom widgets in °C (gauge, cards, tables) instead of the hard-coded °F.
  • Fill missing dictionaries — The dashboards and widgets for hard-coded strings and move them into TagoIO dictionaries.
  • Localize analysis-side messages — The crud-*.ts analyses and alert-dispatcher.ts currently push validation errors and alert notification text to the user as raw English strings. Replace each user-facing string with a dictionary key.
  • Group multi-select on cold-room-card-data custom widget — Add a dropdown that lets the user pick one or more Groups.
  • Polish the root README.md — Expand and refine the root README

Drop the previous Node-based template (src/, package.json, tsconfig,
vitest, biome, tagoconfig, npmrc, docs PDF) ahead of the Deno+Vite
rewrite landed in subsequent commits.
Add the root deno.json that ties app/ and widgets/ into a single Deno
workspace, declares shared tasks, fmt and lint config. Update .gitignore
for the new toolchain (Vite _dist, Deno locks, local tooling).
Introduce app/ with one self-contained analysis per file: dashboard
CRUDs (organization, group, sensor, alert, user), action handlers
(uplink, alert dispatcher) and the scheduled inactivity check. Each
file is copy/paste-ready into a TagoIO Analysis.
Introduce widgets/ as a Vite + React 19 + Tailwind v4 workspace with
three production widgets used by the Kickstarter dashboards:
sensor-status, cold-room-card-data and cold-room-monitor. Includes
shared helpers, per-widget deno.json, and a build.ts that builds every
widget into _dist/<name>/.
Add the markdown files rendered inside each dashboard's Helper tab
(Organizations, Groups, Sensors, Alerts, Users, Freezer Simulator).
These explain to end users what each dashboard does and how the
underlying analyses behave.
Replace the legacy template README with documentation that reflects
the actual Kickstarter app: multi-tenant model (Organization → Group →
Sensor), full dashboard map, custom-widget assignments, and the
three top-level workspaces (app/, widgets/, dashboard-helpers/).
Replace the npm-based CI (Node 18 + npm ci/test/build) with a Deno
pipeline that runs deno install, fmt:check, lint and test on macOS
runners — matching the new local workflow.
Enable the Deno LSP across the workspace, set deno fmt as the default
formatter for TS/JS/JSON, wire Tailwind IntelliSense to the widget
styles, and recommend the deno extension.
Comment thread .github/workflows/tests.yml Fixed
Comment thread app/analysis/dashboard/crud-user.ts Fixed
@mateuscardosodeveloper mateuscardosodeveloper added the enhancement New feature or request label May 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants