Cloudsteading
Nodrix’s original dashboard, captured locally with synthetic temperature and humidity readings. The device updates, value widget and gauge worked in the local review; no physical hardware or production deployment was tested.
Nodrix’s original dashboard, captured locally with synthetic temperature and humidity readings. The device updates, value widget and gauge worked in the local review; no physical hardware or production deployment was tested.

nodrix

Self-managed IoT telemetry, realtime dashboards and device control on Cloudflare.

nodrix is a self-hosted Blynk/Ubidots alternative built on Cloudflare (D1, Durable Objects, KV, R2, Workers). Free tier eligible within limits. Inspect the source and license in the linked repository.

Source & license

Upstream license: MIT

License TL;DR

You can use it, change it, self-host it and sell it. Keep the original copyright and license notice with copies of the code. You don’t have to publish your changes. The authors don’t promise it will work.

Explain MIT in plain English →

Summary of the main license. Separate packages and assets can have different terms.

Inspect repository ↗Read this project’s actual license ↗

Repository owner

@decoded-cipher

See the upstream repository for the original creator and contributors.

Maintain this project? Maintainer verification →README badge, corrections or removal →

Cloudflare hosting

Free tier eligible within limits

The reviewed Cloudflare deployment is eligible for Free-plan allowances for the stated small workload and feature scope. Usage limits, CPU, required account setup and separate services apply.

Hosting requirements
  • Provide your own physical hardware and network connection; Cloudflare runs the telemetry/control platform.
  • Use the pinned repository build with explicitly provisioned D1/KV/R2 IDs; the one-click carrier otherwise pulls a moving upstream revision.
  • Keep Worker requests/10 ms CPU, D1/KV/R2 and SQLite DO requests/duration/storage within free quotas; low telemetry frequency and bounded history are essential.
  • Provisioning Workflow shares Worker request/CPU quotas and includes 3,000 steps/day plus 1 GB-month state on Free; retained instance state counts.
  • Optional email, chat and OAuth integrations have separate provider accounts/costs; core owner password setup does not require them.
  • Workers Free dynamic requests are shared across this account (100,000/day), with 10 ms CPU per invocation; workload fit is conditional and has not been measured.
  • D1 Free allowance: 5 million rows read/day, 100,000 rows written/day and 5 GB total storage; unindexed scans and history retention consume quota.
  • KV Free allowance: 100,000 keys read/day and 1,000 each writes/deletes/list requests/day; this may constrain updates before Worker request limits.
  • R2 Standard allowance: 10 GB-month storage, 1 million Class A and 10 million Class B operations/month; account activation may require billing setup, and other storage classes are excluded.
  • Only SQLite Durable Objects qualify for Workers Free. Keep DO requests below 100,000/day, active duration below 13,000 GB-s/day and SQLite storage/operations inside the captured allowances.
Check current pricing ↗
Review findings & limitations
  • A local review of the pinned original app passed owner setup, project/token creation, synthetic HTTPS telemetry ingest, dashboard Value/Gauge binding, live updates and persistence. The worker suite passed 62 tests and the frontend typecheck/build passed; physical hardware and production deployment were not tested.
  • No dependency lockfile is committed. The review used Bun 1.4.2 rather than the declared Bun 1.1.40, with a newly generated lockfile; source pinning alone does not reproduce dependency resolution.
  • All four actual DO migrations use new_sqlite_classes. The Provision Workflow, scheduler, external integrations, MCP and remote provisioning were declared in source but not exercised.
  • R2 stores cold telemetry history while D1 holds metadata. This local test proves recent ingest/dashboard behavior, not scheduled R2 export or retention.
  • MIT copyright Arjun Krishna. Hardware and network are external. Free-plan request, CPU and storage fit require workload measurement.
  • The deploy carrier downloads moving upstream. The review used a separate pinned-source local config; anonymous upstream usage reporting was redirected to an unused loopback route.
Sources checked 01/10/2026

Repository snapshot: 8fd634b. Hosting eligibility reflects the deployment documentation and listed assumptions.

  • blynk ↗

    every widget is a framework-agnostic Web Component you can lift straight into your own app. - 🎮 **Two-way control** — toggles, sliders, color pickers, and buttons write values back to hardware via short polls or a control socket. - 🤖 **Visual automations** — variable, schedule, sunrise/sunset, and event triggers run conditions and actions: webhooks, code snippets, and service integrations. - 🔌 **Integrations** — fan out to HTTP, email, and chat (Slack, Telegram, Discord, and more). - 📖 **Clean read API** — latest state, time-series, and variable listings behi

  • ubidots ↗

    olor pickers, and buttons write values back to hardware via short polls or a control socket. - 🤖 **Visual automations** — variable, schedule, sunrise/sunset, and event triggers run conditions and actions: webhooks, code snippets, and service integrations. - 🔌 **Integrations** — fan out to HTTP, email, and chat (Slack, Telegram, Discord, and more). - 📖 **Clean read API** — latest state, time-series, and variable listings behind one token. - 🧠 **Native MCP server** — read telemetry and control hardware from an AI assistant, on devices you are not physically next

  • workers ↗

    name = "nodrix" main = "worker/src/index.ts" compatibility_date = "2025-05-01" compatibility_flags = ["nodejs_compat"] # This is the LOCAL-DEV config. Production deploys use deploy/wrangler.toml — # the Deploy to Cloudflare button clones only the deploy/ subdir as the user's # repo root (see deploy/wrangler.toml). The two must be kept in sync when # bindings change; they can't be symlinked (the subdir must be self-contained). # # Build pipeline. scripts/build-from-upstream.sh, whe

  • d1 ↗

    riables, dashboards, tokens). # NEVER any telemetry point. See plan §3. [[d1_databases]] binding = "DB" database_name = "nodrix" database_id = "PLACEHOLDER_FILLED_BY_DEPLOY_OR_WRANGLER" migrations_dir = "worker/src/platform/db/migrations" # R2 — cold telemetry history, NDJSON partitioned by project + hour. [[r2_buckets]] binding = "R2" bucket_name = "nodrix-telemetry" # KV — read cache and OAuth provider storage (aliased to OAUTH_KV in worker entry). [[kv_namespaces]] binding = "KV" id = "PLACEHOLDER_FILLED_BY_DEPLOY_OR_WRANGLER" # Durable Objects. [[durable_ob

  • kv ↗

    ON partitioned by project + hour. [[r2_buckets]] binding = "R2" bucket_name = "nodrix-telemetry" # KV — read cache and OAuth provider storage (aliased to OAUTH_KV in worker entry). [[kv_namespaces]] binding = "KV" id = "PLACEHOLDER_FILLED_BY_DEPLOY_OR_WRANGLER" # Durable Objects. [[durable_objects.bindings]] name = "PROJECT_DO" class_name = "ProjectDO" [[durable_objects.bindings]] name = "DASHBOARD_DO" class_name = "DashboardDO" # Singleton scheduler: one alarm at the next schedule/sunset fire time. [[durable_objects.bindings]] name = "SCHEDULER_DO" class_name

  • r2 ↗

    "PLACEHOLDER_FILLED_BY_DEPLOY_OR_WRANGLER" migrations_dir = "worker/src/platform/db/migrations" # R2 — cold telemetry history, NDJSON partitioned by project + hour. [[r2_buckets]] binding = "R2" bucket_name = "nodrix-telemetry" # KV — read cache and OAuth provider storage (aliased to OAUTH_KV in worker entry). [[kv_namespaces]] binding = "KV" id = "PLACEHOLDER_FILLED_BY_DEPLOY_OR_WRANGLER" # Durable Objects. [[durable_objects.bindings]] name = "PROJECT_DO" class_name = "ProjectDO" [[durable_objects.bindings]] name = "DASHBOARD_DO" class_name = "DashboardDO"

  • durable-objects ↗

    "PLACEHOLDER_FILLED_BY_DEPLOY_OR_WRANGLER" # Durable Objects. [[durable_objects.bindings]] name = "PROJECT_DO" class_name = "ProjectDO" [[durable_objects.bindings]] name = "DASHBOARD_DO" class_name = "DashboardDO" # Singleton scheduler: one alarm at the next schedule/sunset fire time. [[durable_objects.bindings]] name = "SCHEDULER_DO" class_name = "SchedulerDO" # MCP server agent (Streamable HTTP). The `agents` library keys one DO instance # per client session, so requests never funnel through a singleton. Only spun up # when the owner-gated /v1/mcp endpoint i

  • workflows ↗

    riven by the SchedulerDO alarm, not a Workflow.) [[workflows]] name = "nodrix-provision" binding = "PROVISION" class_name = "Provision" # Plaintext vars. Settings → Version & updates polls the upstream repo to tell # owners when a newer version is available (latest release, or default-branch # HEAD on the edge channel). Fork the upstream and override this if you're # tracking a different canonical source. [vars] NODRIX_UPSTREAM_REPO = "decoded-cipher/nodrix" # No secrets are required at deploy time. The signing secret used for # session cookies and OAuth-secret

  • free-tier-eligible ↗

    name = "nodrix" main = "worker/src/index.ts" compatibility_date = "2025-05-01" compatibility_flags = ["nodejs_compat"] # This is the LOCAL-DEV config. Production deploys use deploy/wrangler.toml — # the Deploy to Cloudflare button clones only the deploy/ subdir as the user's # repo root (see deploy/wrangler.toml). The two must be kept in sync when # bindings change; they can't be symlinked (the subdir must be self-contained). # # Build pipeline. scripts/build-from-

  • free-tier-eligible ↗

    ount Manager. | | Requests<sup>1, 2, 3, 4</sup> | Duration | CPU time | | --- | --- | --- | --- | | **Free** | 100,000 per day | No charge for duration | 10 milliseconds of CPU time per invocation | | **Standard** | 10 million included per month <br> +$0.30 per additional million | No charge or limit for duration | 30 million CPU milliseconds included per month<br> +$0.02 per additional million CPU milliseconds<br><br> Max of [5 minutes of CPU time](https://developers.cloudflare.com/workers/platform/limits/#account-plan-limits) per invocation (default: 30 second

  • free-tier-eligible ↗

    rs Paid](https://developers.cloudflare.com/workers/platform/pricing/#workers) | | --- | --- | --- | | Rows read | 5 million / day | First 25 billion / month included + $0.001 / million rows | | Rows written | 100,000 / day | First 50 million / month included + $1.00 / million rows | | Storage (per GB stored) | 5 GB (total) | First 5 GB included + $0.75 / GB-mo | Track your D1 usage To accurately track your usage, use the [meta object](https://developers.cloudflare.com/d1/worker-api/return-object/), [GraphQL Analytics API](https://developers.cloudflare.com/d1/obs

  • free-tier-eligible ↗

    flare.com/workers/platform/pricing/). | | Free plan<sup>1</sup> | Paid plan | | --- | --- | --- | | Keys read | 100,000 / day | 10 million/month, + $0.50/million | | Keys written | 1,000 / day | 1 million/month, + $5.00/million | | Keys deleted | 1,000 / day | 1 million/month, + $5.00/million | | List requests | 1,000 / day | 1 million/month, + $5.00/million | | Stored data | 1 GB | 1 GB, + $0.50/ GB-month | <sup>1</sup> The Workers Free plan includes limited Workers KV usage. All limits reset daily at 00:00 UTC. If you exceed any one of these limits, further o

  • free-tier-eligible ↗

    f you have retrieved data (for infrequent access storage) for 1.1 GB, you will be billed for 2 GB. ### Free tier You can use the following amount of storage and operations each month for free. | | Free | | --- | --- | | Storage | 10 GB-month / month | | Class A Operations | 1 million requests / month | | Class B Operations | 10 million requests / month | | Egress (data transfer to Internet) | Free <sup>[1](#user-content-fn-1)</sup> | Caution The free tier only applies to Standard storage, and does not apply to Infrequent Access storage. ### Storage usage S

  • free-tier-eligible ↗

    ute and storage. Note Durable Objects are available both on Workers Free and Workers Paid plans. - **Workers Free plan**: Only Durable Objects with [SQLite storage backend](https://developers.cloudflare.com/durable-objects/best-practices/access-durable-objects-storage/#create-sqlite-backed-durable-object-class) are available. - **Workers Paid plan**: Durable Objects with the SQLite storage backend are available. The [key-value storage backend](https://developers.cloudflare.com/durable-objects/reference/durable-objects-migrations/#storage-backends) is only avail

  • free-tier-eligible ↗

    CPU time. Note Step count does not include rollback handlers or retries. ### Workflows pricing | Unit | Workers Free | Workers Paid | | --- | --- | --- | | Requests (millions) | 100,000 per day ([shared with Workers requests](https://developers.cloudflare.com/workers/platform/pricing/#workers)) | 10 million included per month + $0.30 per additional million | | CPU time (ms) | 10 milliseconds of CPU time per invocation | 30 million CPU milliseconds included per month + $0.02 per additional million CPU milliseconds | | Storage (GB-mo) | 1 GB-month | 1 GB-month

  • MIT ↗

    MIT License Copyright (c) 2026 Arjun Krishna Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this

  • architecture ↗

    name = "nodrix" main = "worker/src/index.ts" compatibility_date = "2025-05-01" compatibility_flags = ["nodejs_compat"] # This is the LOCAL-DEV config. Production deploys use deploy/wrangler.toml — # the Deploy to Cloudflare button clones only the deploy/ subdir as the user's # repo root (see deploy/wrangler.toml). The two must be kept in sync when # bindings change; they can't be symlinked (the subdir must be self-contained). # # Build pipeline. scripts/build-from-upstream.sh, whe

Locally captured application screenshot · decoded-cipher/nodrix repository contributors; captured locally by Cloudsteading ↗. Uses demonstration data. Local execution does not verify a production Cloudflare deployment.

What we tested locally

Wrangler 4.145.0 workerd with isolated local D1, KV, R2, SQLite Durable Objects and Workflow bindings; original Vue/Vite production SPA built with Bun 1.4.2. A disposable local owner, the Synthetic greenhouse project, a project-scoped device token, and three synthetic temperature/humidity updates. The saved dashboard contains the original Value and Gauge widgets. No real customer data or hardware was used.

  • Passed: Original source preservation. All 260 original regular source files matched their immutable Git blob hashes after dependency installation, the frontend build and runtime review.
  • Passed: Original frontend and PWA build. The original vue-tsc typecheck and Vite/PWA production build completed. The original worker unit suite reported 62 passed and zero failed tests across ten files.
  • Passed: First owner and project creation. Codex Browser used the original bootstrap UI to create a synthetic owner, then the original project UI to create Synthetic greenhouse and a device connection token.
  • Passed: Device credential boundaries. HTTP ingest rejected missing and incorrect credentials with 401; the valid device token accepted synthetic readings with 204. That device token also received the expected 401 from the separate user/API-token read endpoint.
  • Passed: Original dashboard builder and live updates. Codex Browser bound the original Value widget to temperature and Gauge widget to humidity, saved the dashboard, and saw 24.1/59 change to 24.8/55 without reloading after a real local ingest request.
  • Passed: Saved dashboard and readings persist. Reloading the original dashboard retained the saved widget configuration and latest synthetic 24.8 °C and 55.0 humidity readings.
  • Not tested: Production integrations and billing. Physical hardware, read API user tokens, external providers, public sharing, provisioning, MCP, scheduling, cold history, production security and account billing were not exercised.
Capture setup and limits
  • All 260 original regular Git files remain byte-for-byte matched to the pinned tree. Dependencies installed without lifecycle scripts; the repository has no committed dependency lockfile, so this review generated and retained a new Bun lockfile.
  • A separate loopback config uses isolated D1/KV/R2 and four original SQLite Durable Object classes plus the Provision Workflow. No remote resource, OAuth account, email or chat provider was connected.
  • The original version generator ran with the pinned commit environment variable and created its ignored version.gen.ts. The committed migration bundle was not regenerated or modified; the original Worker applied it on first startup.
  • The upstream anonymous installation/usage collector URL was redirected to an unused loopback route. That collector returned an ignored error; the original device telemetry ingest, dashboard and storage paths were not replaced.
  • The upstream root build and moving-upstream deploy carrier were not used. The original frontend typecheck and Vite/PWA build ran directly; the local config served the resulting web/dist assets.
  • The upstream repository specifies Bun 1.1.40 but commits no lockfile. This review used Bun 1.4.2 with newly resolved dependency ranges; a pinned source commit does not make those dependencies reproducible.
  • No physical device, MQTT compatibility, public sharing, multi-user permissions, OAuth, invitation email, chat integration, visual automation, MCP client, scheduler alarm, cold-history export or remote provisioning was exercised.
  • The local runtime and unit tests do not establish Workers Free CPU fit, account-wide usage allowances, production security, hardware costs or a zero-cost deployment.

What it can replace

Compare the workflow you need. These mappings describe overlap; full feature parity requires a separate comparison.

Blynk logoBlynk ↗

Editorial workflow alternative: HTTPS/WebSocket telemetry dashboards, widgets and two-way control for hardware you already own; no hardware supply or managed-cloud parity.

See supporting source ↗
Ubidots logoUbidots ↗

Editorial workflow alternative: Self-managed telemetry variables, time-series dashboards and visual automations; no managed-service SLA or MQTT compatibility claim.

See supporting source ↗
Workflow overlap
Pricing not verified
Workflow overlap
Pricing not verified

How it works

The shape of nodrix on Cloudflare, and how it stacks up against the rented tools it replaces.

Diagram target: wrangler.toml, deploy/wrangler.toml. Other repository deployments are listed in the source evidence below; they are not required by this target.

Architecture

Diagram of deployment declarations at the reviewed commit. Each app has its own entrypoint; declared resources do not prove runtime calls. Follow file and line sources below.

View upstream source ↗

Configuration and workflow sources

Reviewed commit 8fd634b3bf16. This configuration evidence comes from reading source files. Execution checks, when available, appear in the project's runtime review.

Deployment configuration · 2 files
wrangler.toml ↗

Cloudflare Workers · compatibility 2025-05-01

nodrix · default

Entrypoint: worker/src/index.ts

Build: [ -f scripts/build-from-upstream.sh ] || cd ..; bash scripts/build-from-upstream.sh

Static assets: web/dist · single-page-application · Worker first: true

Cron triggers (UTC): 0 0 * * *

  • DB → D1
  • KV → KV
  • R2 → R2
  • PROJECT_DO → Durable Objects · class ProjectDO
  • DASHBOARD_DO → Durable Objects · class DashboardDO
  • SCHEDULER_DO → Durable Objects · class SchedulerDO
  • MCP_OBJECT → Durable Objects · class NodrixMcpAgent
  • PROVISION → Workflows · class Provision
  • ASSETS → Static assets
deploy/wrangler.toml ↗

Cloudflare Workers · compatibility 2025-05-01

nodrix · default

Entrypoint: worker/src/index.ts

Build: curl -fsSL https://raw.githubusercontent.com/decoded-cipher/nodrix/master/scripts/build-from-upstream.sh | bash

Static assets: web/dist · single-page-application · Worker first: true

Cron triggers (UTC): 0 0 * * *

  • DB → D1
  • KV → KV
  • R2 → R2
  • PROJECT_DO → Durable Objects · class ProjectDO
  • DASHBOARD_DO → Durable Objects · class DashboardDO
  • SCHEDULER_DO → Durable Objects · class SchedulerDO
  • MCP_OBJECT → Durable Objects · class NodrixMcpAgent
  • PROVISION → Workflows · class Provision
  • ASSETS → Static assets

Named environments are separate deployments. Bindings are shown only where declared. Configured routes are URL patterns, not verified application endpoints.

Runtime source · handlers, binding usage and workflow steps

Observed TypeScript/JavaScript declarations from Worker entrypoints and resolved relative imports. Calls and workflow steps may run conditionally; their listed order is not a proven end-to-end request flow. Router declarations may be mounted under a prefix or may not be registered. This shows code wiring, not a successful deployment or runtime test. Dynamic wiring, aliases and generated code may not resolve.

scripts/gen-migrations.ts ↗
  • L23 · splitStatements calls (conditional paths may differ): buf.trim, out.push
scripts/gen-version.ts ↗
  • L26 · readVersion calls (conditional paths may differ): JSON.parse, readFileSync, join
  • L33 · readCommit calls (conditional paths may differ): fromEnv.trim, spawnSync, r.stdout.trim

Environment references: process.env.WORKERS_CI_COMMIT_SHA · process.env.CF_PAGES_COMMIT_SHA · process.env.NODRIX_DEPLOY_CHANNEL

worker/src/app.ts ↗
  • L12 · app.use("*")
  • L15 · app.use("*")

Environment references: c.env.DB

worker/src/domains/automations/graph-build.ts ↗
  • L13 · graphColumns calls (conditional paths may differ): JSON.stringify, serializeTriggerKinds, triggerNodes
  • L27 · legacyView calls (conditional paths may differ): triggerNodes, map, actionNodes
  • L37 · hasScheduledTrigger calls (conditional paths may differ): some, triggerNodes
worker/src/domains/automations/routes.ts ↗
  • L20 · automations.use("*")
  • L21 · automations.use("*")
  • L24 · automations.get("/")
  • L37 · automations.post("/")
  • L66 · automations.post("/:id/run")
  • L78 · automations.patch("/:id")
  • L107 · automations.delete("/:id")

Environment references: c.env.DB

worker/src/domains/automations/service.ts ↗
  • L22 · invalidateProjectDO calls (conditional paths may differ): invalidateAutomations, projectStub, console.error
  • L32 · safeReschedule calls (conditional paths may differ): rescheduleScheduler, console.error
  • L49 · shape calls (conditional paths may differ): safeParse, isGraph, legacyView
  • L73 · listAutomations calls (conditional paths may differ): all, bind, env.DB.prepare, rows.results.map
  • L86 · createAutomation calls (conditional paths may differ): assertProjectAccess, trim, inputToGraph, graphError, graphColumns, newId, Math.floor, Date.now, run, bind, env.DB.prepare, recordAudit, invalidateProjectDO, hasScheduledTrigger, safeReschedule, shape
  • L148 · inputToGraph calls (conditional paths may differ): isGraph, buildLinearGraph, Array.isArray
  • L162 · updateAutomation calls (conditional paths may differ): assertProjectAccess, first, bind, env.DB.prepare, isGraph, safeParse, legacyView, buildLinearGraph, Array.isArray, graphError, graphColumns, input.name.trim, buildUpdate, Math.floor, Date.now, run, filter, Object.values, recordAudit, invalidateProjectDO
  • L254 · runAutomationNow calls (conditional paths may differ): assertProjectAccess, first, bind, env.DB.prepare, Math.floor, Date.now, runAutomationEngine, recordAudit, shape

Environment references: env.DB

worker/src/domains/dashboards/public.ts ↗
  • L60 · pub.get("/:token")
  • L89 · pub.get("/:token/state")
  • L39 · resolveShared calls (conditional paths may differ): first, bind, env.DB.prepare
  • L50 · parseLayout calls (conditional paths may differ): validateLayout, JSON.parse

Environment references: env.DB

worker/src/domains/dashboards/routes.ts ↗
  • L13 · dashboards.use("*")
  • L14 · dashboards.use("*")
  • L17 · dashboards.get("/")
  • L23 · dashboards.get("/:id")
  • L33 · dashboards.post("/")
  • L48 · dashboards.put("/:id")
  • L71 · dashboards.delete("/:id")
  • L116 · dashboards.post("/:id/share")
  • L152 · dashboards.delete("/:id/share")

Environment references: c.env.DB

worker/src/domains/dashboards/seo.ts ↗
  • L9 · lookupDashMeta calls (conditional paths may differ): first, bind, env.DB.prepare
  • L36 · escapeAttr calls (conditional paths may differ): replace, s.replace
  • L40 · serveDashboardSeo calls (conditional paths may differ): env.ASSETS.fetch, includes, res.headers.get, lookupDashMeta, meta.name.trim, slice, transform, on, el.append, escapeAttr

Environment references: env.DB · env.ASSETS

worker/src/domains/dashboards/service.ts ↗
  • L21 · listDashboards calls (conditional paths may differ): all, bind, env.DB.prepare
  • L35 · getDashboard calls (conditional paths may differ): first, bind, env.DB.prepare, safeParse
  • L52 · createDashboard calls (conditional paths may differ): assertProjectAccess, trim, validateLayout, newId, Math.floor, Date.now, run, bind, env.DB.prepare, JSON.stringify, recordAudit
  • L90 · updateDashboard calls (conditional paths may differ): assertProjectAccess, first, bind, env.DB.prepare, input.name.trim, input.description.trim, validateLayout, JSON.stringify, Math.floor, Date.now, run, recordAudit, JSON.parse

Environment references: env.DB

worker/src/domains/dashboards/ws.ts ↗
  • L9 · ws.use("*")
  • L12 · ws.get("/:dashboard")

Environment references: c.env.DB

worker/src/domains/identity/auth-providers.ts ↗
  • L11 · authProviders.use("*")
  • L31 · authProviders.get("/")
  • L51 · authProviders.put("/:kind")
  • L109 · authProviders.delete("/:kind")
  • L140 · publicAuthProviders.get("/")

Environment references: c.env.DB

worker/src/domains/identity/invites.ts ↗
  • L17 · invites.use("*")
  • L18 · invites.use("*")
  • L27 · invites.get("/")
  • L65 · invites.post("/")
  • L132 · invites.delete("/:id")

Environment references: c.env.DB

worker/src/domains/identity/me.ts ↗
  • L10 · me.use("*")
  • L13 · me.get("/")
  • L41 · me.patch("/")

Environment references: c.env.DB

worker/src/domains/identity/public-invite.ts ↗
  • L15 · invite.get("/:token")
  • L35 · invite.post("/accept")

Environment references: c.env.DB

worker/src/domains/identity/sessions.ts ↗
  • L8 · sessions.use("*")
  • L12 · sessions.use("*")
  • L18 · sessions.get("/")
  • L63 · sessions.delete("/:id")

Environment references: c.env.DB

worker/src/domains/identity/tokens.ts ↗
  • L10 · tokens.use("*")
  • L13 · tokens.get("/")
  • L38 · tokens.post("/")
  • L103 · tokens.post("/:id/revoke")

Environment references: c.env.DB

worker/src/domains/identity/users.ts ↗
  • L14 · users.use("*")
  • L15 · users.use("*")
  • L34 · users.get("/")
  • L65 · users.patch("/:id")
  • L102 · users.put("/:id/projects")
  • L141 · users.delete("/:id")
  • L170 · users.post("/:id/transfer-ownership")

Environment references: c.env.DB

worker/src/domains/integrations/routes.ts ↗
  • L14 · integrations.use("*")
  • L15 · integrations.use("*")
  • L31 · integrations.get("/")
  • L37 · integrations.post("/")
  • L50 · integrations.post("/:id/test")
  • L62 · integrations.patch("/:id")
  • L79 · integrations.delete("/:id")

Environment references: c.env.DB

worker/src/domains/integrations/service.ts ↗
  • L39 · shape calls (conditional paths may differ): safeParse, openIntegrationConfig
  • L56 · listIntegrations calls (conditional paths may differ): all, bind, env.DB.prepare, Promise.all, rows.results.map, shape
  • L70 · createIntegration calls (conditional paths may differ): assertProjectAccess, trim, VALID_KINDS.has, newId, Math.floor, Date.now, run, bind, env.DB.prepare, sealIntegrationConfig, recordAudit
  • L113 · updateIntegration calls (conditional paths may differ): assertProjectAccess, first, bind, env.DB.prepare, input.name.trim, sealIntegrationConfig, buildUpdate, Math.floor, Date.now, run, filter, Object.values, recordAudit, shape
  • L167 · testIntegration calls (conditional paths may differ): assertProjectAccess, first, bind, env.DB.prepare, Math.floor, Date.now, openIntegrationConfig, executeIntegration, catch, recordIntegrationRun, recordAudit

Environment references: env.DB

worker/src/domains/projects/routes.ts ↗
  • L12 · projects.use("*")
  • L14 · projects.get("/")
  • L18 · projects.post("/")
  • L29 · projects.patch("/:proj")
  • L46 · projects.post("/:proj/flush")
  • L63 · projects.delete("/:proj")

Environment references: c.env.DB

worker/src/domains/projects/service.ts ↗
  • L10 · filterExistingProjectIds calls (conditional paths may differ): chunk, all, bind, env.DB.prepare, inClause, found.add, ids.filter, found.has
  • L35 · listAccessibleProjects calls (conditional paths may differ): isInstanceAdmin, all, env.DB.prepare, bind
  • L58 · getProject calls (conditional paths may differ): first, bind, env.DB.prepare
  • L70 · assertProjectAccess calls (conditional paths may differ): first, bind, env.DB.prepare, isInstanceAdmin
  • L95 · createProject calls (conditional paths may differ): isInstanceAdmin, trim, newId, Math.floor, Date.now, run, bind, env.DB.prepare, recordAudit
  • L125 · updateProject calls (conditional paths may differ): assertProjectAccess, buildUpdate, input.name.trim, Math.floor, Date.now, run, bind, env.DB.prepare, recordAudit, Object.keys, getProject

Environment references: env.DB

worker/src/domains/settings/audit-log.ts ↗
  • L8 · auditLog.use("*")
  • L15 · auditLog.get("/")
  • L108 · clampInt calls (conditional paths may differ): parseInt, Number.isFinite, Math.min, Math.max

Environment references: c.env.DB

worker/src/domains/settings/settings.ts ↗
  • L13 · settings.use("*")
  • L14 · settings.use("*")
  • L20 · settings.get("/")
  • L36 · settings.put("/audit-log")
  • L61 · settings.put("/mcp")
  • L85 · settings.put("/mcp-write")

Environment references: c.env.DB

worker/src/domains/settings/version.ts ↗
  • L17 · version.use("*")
  • L172 · version.get("/")
  • L30 · buildDashboardUrl calls (conditional paths may differ): encodeURIComponent
  • L35 · scriptNameFromHost calls (conditional paths may differ): host.endsWith, host.slice, host.indexOf
  • L44 · stripV calls (conditional paths may differ): replace, s.trim
  • L71 · mapRelease calls (conditional paths may differ): slice, Math.floor, getTime
  • L87 · mapCommit calls (conditional paths may differ): Math.floor, getTime, body.sha.slice, split
  • L103 · fetchUpstream calls (conditional paths may differ): fetch, res.json, mapCommit, mapRelease, res.headers.get
  • L129 · getCachedUpstream calls (conditional paths may differ): Math.floor, Date.now, env.KV.get, fetchUpstream, env.KV.put, JSON.stringify

Environment references: env.KV · c.env.NODRIX_UPSTREAM_REPO

worker/src/domains/telemetry/control.ts ↗
  • L9 · control.use("*")
  • L13 · control.get("/")
  • L21 · control.post("/ack")
  • L35 · controlWsHandler calls (conditional paths may differ): c.req.header, c.req.query, c.text, lookupProjectToken, c.executionCtx.waitUntil, touchTokenLastUsed, projectStub, stub.setProjectId, stub.fetch
worker/src/domains/telemetry/events.ts ↗
  • L8 · events.use("*")
  • L14 · events.post("/")
worker/src/domains/telemetry/telemetry.ts ↗
  • L10 · telemetry.use("*")
  • L16 · telemetry.post("/")
worker/src/domains/telemetry/validate.ts ↗
  • L17 · validKey calls (conditional paths may differ): CONTROL_CHARS.test
  • L21 · validValue calls (conditional paths may differ): Number.isFinite
  • L44 · parseTelemetryBody calls (conditional paths may differ): Array.isArray, Object.entries, raw.push, validKey, validValue, points.push
worker/src/domains/telemetry/variables.ts ↗
  • L15 · dueForLastSeen calls (conditional paths may differ): lastSeenWrites.get, lastSeenWrites.set, lastSeenWrites.delete
  • L27 · upsertVariables calls (conditional paths may differ): Date.now, filter, dueForLastSeen, chunk, join, part.map, all, bind, env.DB.prepare, existing.add, due.filter, existing.has, first, toCreate.slice, Math.max, env.DB.batch, keysToWrite.map, newId, lastSeenWrites.delete

Environment references: env.DB

worker/src/domains/telemetry/ws-protocol.ts ↗
  • L16 · parseDeviceMessage calls (conditional paths may differ): JSON.parse, Array.isArray, m.ids.filter, parseTelemetryBody, m.event.trim
worker/src/domains/variables/read.ts ↗
  • L14 · readList.use("*")
  • L15 · readList.get("/")
  • L19 · readState.use("*")
  • L20 · readState.get("/")
  • L30 · readSeries.use("*")
  • L31 · readSeries.get("/")
worker/src/domains/variables/routes.ts ↗
  • L14 · variables.use("*")
  • L15 · variables.use("*")
  • L18 · variables.get("/")
  • L25 · variables.post("/")
  • L40 · variables.patch("/:id")
  • L56 · variables.delete("/:id")
  • L93 · variables.get("/tokens")
  • L113 · variables.post("/tokens")
  • L143 · variables.post("/tokens/:id/revoke")

Environment references: c.env.DB

worker/src/domains/variables/service.ts ↗
  • L18 · listVariables calls (conditional paths may differ): all, bind, env.DB.prepare
  • L32 · getState calls (conditional paths may differ): getLatestState, projectStub
  • L40 · getSeries calls (conditional paths may differ): Math.floor, Date.now, exec, Number, getSeries, projectStub
  • L59 · createVariable calls (conditional paths may differ): assertProjectAccess, trim, newId, Math.floor, Date.now, run, bind, env.DB.prepare, recordAudit
  • L95 · updateVariable calls (conditional paths may differ): assertProjectAccess, Math.floor, Date.now, run, bind, env.DB.prepare, recordAudit, first
  • L129 · setVariableControl calls (conditional paths may differ): assertProjectAccess, trim, first, bind, env.DB.prepare, newId, addControl, projectStub, recordAudit

Environment references: env.DB

worker/src/index.ts ↗
  • L50 · fetch handler exported · references KV · calls oauthProvider.fetch
  • L55 · scheduled handler exported · calls sendHeartbeat

Environment references: env.KV

worker/src/mcp/coerce.ts ↗
  • L6 · parseStructured calls (conditional paths may differ): JSON.parse
  • L16 · parseStructuredArray calls (conditional paths may differ): parseStructured, Array.isArray, a.map
worker/src/mcp/flags.ts ↗
  • L16 · mcpEnabled calls (conditional paths may differ): getSetting
  • L20 · mcpWriteEnabled calls (conditional paths may differ): getSetting
worker/src/mcp/gate.ts ↗
  • L24 · authenticateMcp calls (conditional paths may differ): mcpEnabled, json, extractBearer, unauthorized, lookupUserToken
  • L43 · touchToken calls (conditional paths may differ): touchTokenLastUsed
  • L52 · mcpBearerHandler calls (conditional paths may differ): authenticateMcp, c.executionCtx.waitUntil, touchToken, mcpHandler.fetch
  • L60 · json calls (conditional paths may differ): JSON.stringify
  • L67 · unauthorized calls (conditional paths may differ): JSON.stringify
worker/src/mcp/oauth.ts ↗
  • L51 · oauth.get("/")
  • L93 · oauth.post("/consent")
  • L25 · currentUser calls (conditional paths may differ): buildAuth, auth.api.getSession
  • L37 · esc calls (conditional paths may differ): s.replace
  • L43 · b64encode calls (conditional paths may differ): btoa, unescape, encodeURIComponent
  • L46 · b64decode calls (conditional paths may differ): decodeURIComponent, escape, atob
  • L153 · clientRedirectAllowed calls (conditional paths may differ): Array.isArray, client.redirectUris.includes
  • L160 · errorResponse calls (conditional paths may differ): c.html, errorPage
  • L193 · shell calls (conditional paths may differ): esc
  • L215 · consentPage calls (conditional paths may differ): join, READ_TOOLS.map, MANAGE_TOOLS.map, esc, shell
  • L310 · errorPage calls (conditional paths may differ): esc, shell

Environment references: c.env.OAUTH_PROVIDER

worker/src/mcp/redact.ts ↗
  • L8 · redactConfig calls (conditional paths may differ): Array.isArray, value.map, Object.entries, SECRET_KEY.test, redactConfig
  • L21 · redactIntegration calls (conditional paths may differ): redactConfig
worker/src/mcp/resources.ts ↗
  • L13 · registerResources calls (conditional paths may differ): getProject, listAccessibleProjects, actorOf, server.registerResource, map, accessibleProjects, resolveProjectId, String, getState, JSON.stringify, listVariables
worker/src/mcp/result.ts ↗
  • L12 · run calls (conditional paths may differ): fn, JSON.stringify, isServiceError
worker/src/mcp/scope.ts ↗
  • L18 · resolveProjectId calls (conditional paths may differ): assertProjectAccess, actorOf
worker/src/mcp/tools-read.ts ↗
  • L42 · registerReadTools calls (conditional paths may differ): server.registerTool, run, getProject, listAccessibleProjects, actorOf, project.optional, resolveProjectId, listVariables, getState, describe, z.string, optional, regex, getSeries, listDashboards, getDashboard, Array.isArray, TRIGGER_CATALOG.map, CONDITION_CATALOG.map, ACTION_CATALOG.map
worker/src/mcp/tools-write.ts ↗
  • L29 · registerWriteTools calls (conditional paths may differ): actorOf, server.registerTool, z.string, run, createProject, actor, optional, nullable, updateProject, scopeProjectId, createVariable, updateVariable, describe, z.any, setVariableControl, createDashboard, parseStructured, z.number, updateDashboard, z.enum
worker/src/platform/auth/index.ts ↗
  • L333 · authApp.use("*")
  • L335 · authApp.all("*")
  • L44 · loadProviderRows calls (conditional paths may differ): env.KV.get, JSON.parse, all, env.DB.prepare, env.KV.put, JSON.stringify
  • L76 · invalidateAuthProvidersCache calls (conditional paths may differ): env.KV.delete
  • L80 · loadProviders calls (conditional paths may differ): loadProviderRows, decryptSecret
  • L99 · buildAuth calls (conditional paths may differ): getOrCreateSigningSecret, loadProviders, drizzle, betterAuth, drizzleAdapter, pbkdf2Verify, first, env.DB.prepare, toLowerCase, String, findOpenInviteByEmail, trim, name.split, join, parts.slice, run, bind, consumeInvite, recordAudit, sendInstall

Environment references: env.KV · env.DB · c.env.NODRIX_DEBUG_AUTH

worker/src/platform/db/auto-migrate.ts ↗
  • L17 · ensureMigrated calls (conditional paths may differ): catch, applyMigrations, console.error
  • L28 · applyMigrations calls (conditional paths may differ): run, db.prepare, all, map, res.results.filter, bind, applied.has, console.log, Math.floor, Date.now
worker/src/platform/durable-objects/project-do.ts ↗
  • L687 · safeParse calls (conditional paths may differ): JSON.parse
  • L695 · hourBucket calls (conditional paths may differ): d.getUTCFullYear, padStart, String, d.getUTCMonth, d.getUTCDate, d.getUTCHours

Environment references: env.DB · env.R2

worker/src/platform/durable-objects/scheduler-do.ts ↗
  • L66 · soonest calls (conditional paths may differ): Math.min
  • L80 · stub calls (conditional paths may differ): env.SCHEDULER_DO.get, env.SCHEDULER_DO.idFromName
  • L85 · rescheduleScheduler calls (conditional paths may differ): reschedule, stub, console.error
  • L89 · ensureScheduler calls (conditional paths may differ): ensure, stub, console.error
  • L93 · armSchedulerFor calls (conditional paths may differ): armFor, stub, console.error

Environment references: env.SCHEDULER_DO

worker/src/platform/durable-objects/stubs.ts ↗
  • L9 · projectStub calls (conditional paths may differ): env.PROJECT_DO.get, env.PROJECT_DO.idFromName
  • L13 · dashboardStub calls (conditional paths may differ): env.DASHBOARD_DO.get, env.DASHBOARD_DO.idFromName

Environment references: env.PROJECT_DO · env.DASHBOARD_DO

worker/src/platform/engine/actions.ts ↗
  • L55 · runActionNode calls (conditional paths may differ): handler
  • L61 · loadIntegration calls (conditional paths may differ): first, bind, env.DB.prepare, openIntegrationConfig

Environment references: env.DB

worker/src/platform/engine/conditions.ts ↗
  • L37 · evalCondition calls (conditional paths may differ): handler
  • L44 · withinTimeWindow calls (conditional paths may differ): toMinutes, String, Array.isArray, formatToParts, parts.find, Number, get, indexOf, days.includes
  • L62 · toMinutes calls (conditional paths may differ): hhmm.split, Number
worker/src/platform/engine/graph.ts ↗
  • L17 · toGraph calls (conditional paths may differ): JSON.parse, isGraph
worker/src/platform/engine/integrations.ts ↗
  • L13 · recordIntegrationRun calls (conditional paths may differ): Math.floor, Date.now, run, bind, env.DB.prepare

Environment references: env.DB

worker/src/platform/engine/run.ts ↗
  • L40 · runAutomation calls (conditional paths may differ): toGraph, nodesById, byId.get, entryNode, Number, defaultSetVariable, defaultEmitEvent, defaultGetVariable, defaultScheduleDelay, countActionNodes, visited.has, visited.add, delaySeconds, scheduleDelay, Date.now, VALID_ACTION_KINDS.has, runActionNode, VALID_CONDITION_KINDS.has, evalCondition, outgoingEdges
  • L127 · dispatchEvent calls (conditional paths may differ): all, bind, env.DB.prepare, triggerNodes, toGraph, Math.floor, Date.now, runAutomation, defaultEmitEvent
  • L166 · delaySeconds calls (conditional paths may differ): Number, String, Number.isFinite, Math.min, Math.max, Math.round
  • L173 · defaultScheduleDelay calls (conditional paths may differ): first, bind, env.DB.prepare, run, newId, JSON.stringify, Math.floor, Date.now, armSchedulerFor
  • L196 · defaultSetVariable calls (conditional paths may differ): addControl, projectStub, newId
  • L202 · defaultEmitEvent calls (conditional paths may differ): dispatchEvent
  • L208 · defaultGetVariable calls (conditional paths may differ): getLatestState, projectStub, rows.find
  • L215 · recordRun calls (conditional paths may differ): Math.floor, Date.now, run, bind, env.DB.prepare

Environment references: env.DB

worker/src/platform/engine/schedule.ts ↗
  • L29 · computeNextScheduled calls (conditional paths may differ): all, env.DB.prepare, Date.now, triggerNodes, toGraph, nextScheduleFireAt, nextSolarFireAt, entries.push, map, entries.filter
  • L64 · runScheduledDue calls (conditional paths may differ): loadAutomationsByIds, due.map, automations.get, firedIds.has, get, nodesById, toGraph, Math.floor, Date.now, runAutomation, firedIds.add, console.error
  • L97 · loadAutomationsByIds calls (conditional paths may differ): chunk, all, bind, env.DB.prepare, inClause, map.set
  • L112 · nextDelayFireAt calls (conditional paths may differ): first, env.DB.prepare
  • L121 · runDueDelays calls (conditional paths may differ): all, bind, env.DB.prepare, loadAutomationsByIds, rows.results.map, run, automations.get, JSON.parse, Math.floor, Date.now, runAutomation, console.error
  • L162 · nextScheduleFireAt calls (conditional paths may differ): test, cfg.time.split, Number, Array.isArray, ymdInTz, addDays, days.includes, weekdayOf, zonedWallToUtc
  • L181 · nextSolarFireAt calls (conditional paths may differ): sunTimes, target.getTime
  • L198 · ymdInTz calls (conditional paths may differ): formatToParts, Number, p.find, get
  • L206 · addDays calls (conditional paths may differ): Date.UTC, dt.setUTCDate, dt.getUTCDate, dt.getUTCFullYear, dt.getUTCMonth
  • L212 · weekdayOf calls (conditional paths may differ): getUTCDay, Date.UTC
  • L217 · zonedWallToUtc calls (conditional paths may differ): Date.UTC, tzOffsetMs
  • L228 · tzOffsetMs calls (conditional paths may differ): formatToParts, Number, p.find, Date.UTC, get

Environment references: env.DB

worker/src/platform/engine/solar.ts ↗
  • L9 · toJulian calls (conditional paths may differ): date.getTime
  • L19 · sunTimes calls (conditional paths may differ): Math.ceil, toJulian, Math.sin, Math.cos, Math.asin, Math.acos, fromJulian
worker/src/platform/engine/triggers.ts ↗
  • L8 · matchVariableCondition calls (conditional paths may differ): valuesEqual, evalOp
  • L27 · evalOp calls (conditional paths may differ): looseEqual, toNum
  • L41 · toNum calls (conditional paths may differ): Number, Number.isNaN
  • L47 · looseEqual calls (conditional paths may differ): Boolean, toNum, String
  • L57 · valuesEqual calls (conditional paths may differ): looseEqual
worker/src/platform/lib/audit.ts ↗
  • L17 · isAuditEnabled calls (conditional paths may differ): getSetting
  • L33 · recordAudit calls (conditional paths may differ): isAuditEnabled, Math.floor, Date.now, run, bind, env.DB.prepare, JSON.stringify, console.error

Environment references: env.DB

worker/src/platform/lib/auth-secret.ts ↗
  • L22 · generate calls (conditional paths may differ): crypto.getRandomValues, String.fromCharCode, btoa
  • L29 · getOrCreateSigningSecret calls (conditional paths may differ): getSetting, generate, setSetting
worker/src/platform/lib/crypto.ts ↗
  • L14 · deriveKey calls (conditional paths may differ): crypto.subtle.importKey, enc.encode, crypto.subtle.deriveKey
  • L39 · b64encode calls (conditional paths may differ): String.fromCharCode, btoa
  • L45 · b64decode calls (conditional paths may differ): atob, bin.charCodeAt
  • L52 · encryptSecret calls (conditional paths may differ): deriveKey, crypto.getRandomValues, crypto.subtle.encrypt, encode, b64encode
  • L65 · decryptSecret calls (conditional paths may differ): payload.split, deriveKey, crypto.subtle.decrypt, b64decode, decode
worker/src/platform/lib/deployment-settings.ts ↗
  • L15 · getSetting calls (conditional paths may differ): env.KV.get, first, bind, env.DB.prepare, env.KV.put
  • L45 · setSetting calls (conditional paths may differ): Math.floor, Date.now, run, bind, env.DB.prepare, env.KV.delete

Environment references: env.KV · env.DB

worker/src/platform/lib/edge-cache.ts ↗
  • L10 · withEdgeCache calls (conditional paths may differ): produce, cache.match, fresh.clone, cacheable.headers.set, catch, cache.put
worker/src/platform/lib/ids.ts ↗
  • L31 · newId calls (conditional paths may differ): nanoid
  • L37 · newToken calls (conditional paths may differ): crypto.getRandomValues, base64url
  • L44 · shareToken calls (conditional paths may differ): nanoid
  • L48 · sha256Hex calls (conditional paths may differ): crypto.subtle.digest, encode, join, map, padStart, b.toString
  • L53 · base64url calls (conditional paths may differ): String.fromCharCode, replace, replaceAll, btoa
worker/src/platform/lib/integration-secrets.ts ↗
  • L13 · sealIntegrationConfig calls (conditional paths may differ): getOrCreateSigningSecret, encryptSecret, JSON.stringify
  • L19 · openIntegrationConfig calls (conditional paths may differ): stored.startsWith, getOrCreateSigningSecret, decryptSecret
worker/src/platform/lib/invites.ts ↗
  • L25 · findOpenInviteByEmail calls (conditional paths may differ): Math.floor, Date.now, first, bind, env.DB.prepare, email.toLowerCase
  • L33 · findOpenInviteByToken calls (conditional paths may differ): Math.floor, Date.now, sha256Hex, first, bind, env.DB.prepare
  • L47 · consumeInvite calls (conditional paths may differ): Math.floor, Date.now, all, bind, env.DB.prepare, projs.results.map, stmts.push, env.DB.batch

Environment references: env.DB

worker/src/platform/lib/layout.ts ↗
  • L40 · validateLayout calls (conditional paths may differ): isObject, Array.isArray, ALLOWED_TYPES.has, Number.isFinite, Math.min, Math.max, Math.round
  • L104 · isObject calls (conditional paths may differ): Array.isArray
  • L110 · variablesFromLayout calls (conditional paths may differ): manifestFor, extractVariables, set.add
  • L123 · chartVariablesFromLayout calls (conditional paths may differ): manifestFor, isChartSeriesExtractor, extractVariables, set.add
worker/src/platform/lib/password.ts ↗
  • L17 · hashPassword calls (conditional paths may differ): crypto.getRandomValues, deriveBits, b64
  • L23 · verifyPassword calls (conditional paths may differ): hash.split, Number, Number.isInteger, unb64, deriveBits, constantTimeEqual
  • L40 · deriveBits calls (conditional paths may differ): crypto.subtle.importKey, encode, crypto.subtle.deriveBits
  • L62 · b64 calls (conditional paths may differ): String.fromCharCode, btoa
  • L68 · unb64 calls (conditional paths may differ): atob, bin.charCodeAt
worker/src/platform/lib/roles.ts ↗
  • L8 · userCanAccessProject calls (conditional paths may differ): first, bind, env.DB.prepare

Environment references: env.DB

worker/src/platform/lib/series.ts ↗
  • L15 · toCompactSeries calls (conditional paths may differ): Number, Number.isFinite, s.t.push, s.v.push, Object.keys, stride
  • L39 · stride calls (conditional paths may differ): Math.ceil, t.push, v.push
worker/src/platform/lib/service.ts ↗
  • L48 · serviceErrorResponse calls (conditional paths may differ): isServiceError, c.json
worker/src/platform/lib/sql.ts ↗
  • L9 · chunk calls (conditional paths may differ): out.push, items.slice
  • L17 · inClause calls (conditional paths may differ): join, fill, Array
  • L23 · safeParse calls (conditional paths may differ): JSON.parse
  • L34 · buildUpdate calls (conditional paths may differ): filter, Object.keys, join, cols.map
worker/src/platform/lib/tokens.ts ↗
  • L9 · extractBearer calls (conditional paths may differ): req.headers.get, authz.startsWith, trim, authz.slice
  • L25 · lookupUserToken calls (conditional paths may differ): Math.floor, Date.now, sha256Hex, first, bind, env.DB.prepare
  • L43 · lookupProjectToken calls (conditional paths may differ): sha256Hex, first, bind, env.DB.prepare
  • L55 · touchTokenLastUsed calls (conditional paths may differ): catch, then, run, bind, env.DB.prepare, Math.floor, Date.now
  • L66 · generateToken calls (conditional paths may differ): newToken, sha256Hex

Environment references: env.DB

worker/src/platform/lib/usage-stats.ts ↗
  • L35 · getOrCreateInstanceId calls (conditional paths may differ): getSetting, nanoid, setSetting
  • L44 · buildPayload calls (conditional paths may differ): first, env.DB.prepare, Object.entries, Number, all, filter, results.map, VALID_KINDS.has, getSetting
  • L80 · post calls (conditional paths may differ): fetch, JSON.stringify
  • L92 · sendInstall calls (conditional paths may differ): ctx.waitUntil, catch, getOrCreateInstanceId, post, buildPayload
  • L102 · sendHeartbeat calls (conditional paths may differ): ctx.waitUntil, catch, getSetting, post, buildPayload, first, env.DB.prepare, getOrCreateInstanceId

Environment references: env.DB · env.NODRIX_USAGE_STATS_URL

worker/src/platform/lib/validate.ts ↗
  • L9 · parseBody calls (conditional paths may differ): c.req.json, schema.safeParse
worker/src/platform/middleware/rate-limit.ts ↗

    Environment references: c.env.KV

    worker/src/platform/workflows/provision.ts ↗
    • L16 · Provision extends WorkflowEntrypoint
    • L18 · step.do("run-migrations")
    • L23 · step.do("sanity-check-r2")
    • L29 · step.do("sanity-check-kv")

    Environment references: env.DB · env.R2 · env.KV

    worker/src/routes.ts ↗
    • L45 · registerRoutes calls (conditional paths may differ): app.get, c.json, first, c.env.DB.prepare, app.route, app.all, serveDashboardSeo, c.req.param, c.env.ASSETS.fetch

    Environment references: c.env.DB · c.env.ASSETS

    Build and deployment pipeline · 1 GitHub Actions workflow

    Repository CI declarations, separate from runtime request processing. Job dependencies and conditions are shown as written; long commands are shortened with an ellipsis; a workflow file does not prove a recent successful run.

    CodeQL Advanced · .github/workflows/codeql.yml ↗

    Triggers: workflow_dispatch, schedule

    Analyze (${{ matrix.language }}) · no job dependencies declared

    1. Checkout repositoryactions/checkout@v4
    2. Initialize CodeQLgithub/codeql-action/init@v4
    3. Perform CodeQL Analysisgithub/codeql-action/analyze@v4
    package.json ↗
    • build:version: bun scripts/gen-version.ts
    • build:migrations: bun scripts/gen-migrations.ts
    • build: bun run build:version && bun run build:migrations && bun run --filter @nodrix/web build && bun run --filter @nodrix/worker build
    • deploy:platform: bun run build && bun run --filter @nodrix/worker deploy
    web/package.json ↗
    • build: vue-tsc --noEmit && vite build
    worker/package.json ↗
    • build: wrangler deploy --config ../wrangler.toml --dry-run --outdir=dist
    • deploy: wrangler deploy --config ../wrangler.toml

    Full upstream document by @decoded-cipher · README.md · snapshot 8fd634b

    nodrix

    The IoT platform Cloudflare didn't build. Point your hardware at one endpoint over HTTPS or WebSocket, watch variables appear on their own, build realtime drag-and-drop dashboards, automate, and read it all back through a clean API — entirely on infrastructure you own. nodrix is single-tenant and open source: it deploys into your Cloudflare account on Workers, Durable Objects, D1, and R2.

    Features

    • 📡 Telemetry over HTTPS or WebSocket — hardware POSTs JSON to a project; variables auto-create on first sight. No schema to define, no MQTT broker to run.
    • 📊 Realtime dashboards — a drag-and-drop widget grid streams updates over hibernating WebSockets; share any dashboard read-only by public link.
    • 🧩 Embeddable widgets — every widget is a framework-agnostic Web Component you can lift straight into your own app.
    • 🎮 Two-way control — toggles, sliders, color pickers, and buttons write values back to hardware via short polls or a control socket.
    • 🤖 Visual automations — variable, schedule, sunrise/sunset, and event triggers run conditions and actions: webhooks, code snippets, and service integrations.
    • 🔌 Integrations — fan out to HTTP, email, and chat (Slack, Telegram, Discord, and more).
    • 📖 Clean read API — latest state, time-series, and variable listings behind one token.
    • 🧠 Native MCP server — read telemetry and control hardware from an AI assistant, on devices you are not physically next to. Owner-gated and off by default; see AI assistants (MCP).
    • 👥 Multi-user — owner / admin / member roles, email invites, and social sign-in (Google, GitHub).
    • 📝 Audit log — every privileged action recorded and paginated in the UI.

    Quick start

    1. Deploy to your Cloudflare account — one click, or bun run deploy:platform from a clone.

    2. Create the owner account — the first visit prompts a "Create owner account" page; the first signup becomes owner.

    3. Create a project and mint a project token from the dashboard.

    4. Send telemetry — variables are created the moment data arrives:

      curl -X POST https://<your-worker>/v1/telemetry \
        -H "Authorization: Bearer $NODRIX_TOKEN" \
        -H "Content-Type: application/json" \
        -d '{"metrics":{"temperature":23.4,"humidity":61}}'
      
    5. Read it back:

      curl https://<your-worker>/v1/projects/<project>/state \
        -H "Authorization: Bearer $NODRIX_TOKEN"
      

    AI assistants (MCP)

    nodrix ships a native Model Context Protocol server, so an assistant can read a project's telemetry and — once you allow it — act on the hardware. Because devices report to your deployment rather than to your laptop, the board does not need to be plugged into the machine running the assistant; it can be in another building.

    Two endpoints, both Streamable HTTP:

    Endpoint Auth For
    /v1/mcp Bearer token CLI and IDE clients
    /v1/mcp/oauth OAuth claude.ai-style connectors

    Both are off by default. The owner flips them in Settings → More:

    • mcp_enabled — the master switch. While it is off, /v1/mcp returns 404, so a disabled server looks absent rather than merely forbidden.
    • mcp_write_enabled — gates the management and control tools. Until it is on, even an admin-scope token gets read-only tools, so an assistant cannot command hardware by default.

    12 read tools — list_projects, list_variables, get_state, get_series, list_dashboards, get_dashboard, list_widget_types, list_widgets, list_block_types, list_integration_kinds, list_automations, list_integrations.

    16 write tools — creating and updating projects, variables, dashboards, widgets, automations, and integrations, plus set_variable (how an assistant turns a relay on), run_automation, emit_event, and test_integration.

    There are no delete tools, by design. Every tool resolves its target project through the token's scope before it runs, so it cannot reach a project the token cannot.

    Architecture

    • Worker (worker/) — a single Hono app. Durable Objects for Project, Dashboard, Scheduler, and the MCP agent; one Workflow for provisioning; D1 (metadata), R2 (telemetry history), KV (read cache + JWKS).
    • Web (web/) — Vue 3 + Tailwind + Reka UI admin panel and drag-and-drop dashboard builder, built and served as Worker static assets.
    • Shared (shared/) — framework-agnostic Web Component widgets, the integration catalog, and automation blocks, consumed by both web and worker so there is a single source of truth.
    • Deploy (deploy/) — the small config carrier behind the one-click Deploy to Cloudflare.
    worker/   Cloudflare Worker — API, Durable Objects, Workflow
    web/      Vue 3 admin panel + dashboard builder
    shared/   Web Component widgets, integration catalog, automation blocks
    deploy/   One-click Deploy to Cloudflare config
    scripts/  Build, version, and migration generators
    

    Storage

    Store Holds
    Project DO (SQLite) Latest variable state, recent ring buffer, pending control writes, flush cursor
    R2 Cold telemetry history (NDJSON, partitioned by project + hour)
    D1 Users, sessions, accounts, projects, variables, dashboards, tokens, automations, integrations, audit log, OAuth provider config (metadata only — never any telemetry point)
    KV Cached /state responses and JWKS
    Dashboard DO Per-dashboard subscriptions + hibernated WebSockets
    Scheduler DO One alarm at the next schedule/sunset automation fire time

    Authentication

    Better Auth handles sign-in. Email + password is on by default; Google and GitHub OAuth can be enabled at runtime from Settings → Sign-in providers (the owner enters a client ID + secret per provider, and the login page shows the matching buttons immediately).

    The first signup on a fresh deployment becomes owner. After that, registration is closed: the owner invites people from Users, each with an owner / admin / member role. Sessions are cookie-based and persist 30 days; each device is a separate session, listed and revokable from Users.

    Development

    nodrix uses Bun.

    bun install
    bun run dev              # worker (wrangler dev)
    bun run dev:web          # web (vite)
    bun run typecheck
    bun run build
    bun run deploy:platform  # build + deploy the worker
    

    License

    MIT © Arjun Krishna

    Frequently asked about nodrix

    What is nodrix?+

    nodrix is a self-hosted Blynk/Ubidots alternative built on the Cloudflare developer platform. Self-managed IoT telemetry, realtime dashboards and device control on Cloudflare.

    What does nodrix replace?+

    nodrix is listed as an alternative to Blynk, Ubidots. Compare the features and tradeoffs before migrating.

    What Cloudflare primitives does nodrix use?+

    nodrix is built on D1, Durable Objects, KV, R2, Workers, Workflows.

    How much does nodrix cost to run?+

    The reviewed Cloudflare deployment is eligible for Free-plan allowances for the stated small workload and feature scope. Usage limits, CPU, required account setup and separate services apply. Provide your own physical hardware and network connection; Cloudflare runs the telemetry/control platform. Use the pinned repository build with explicitly provisioned D1/KV/R2 IDs; the one-click carrier otherwise pulls a moving upstream revision. Keep Worker requests/10 ms CPU, D1/KV/R2 and SQLite DO requests/duration/storage within free quotas; low telemetry frequency and bounded history are essential. Provisioning Workflow shares Worker request/CPU quotas and includes 3,000 steps/day plus 1 GB-month state on Free; retained instance state counts. Optional email, chat and OAuth integrations have separate provider accounts/costs; core owner password setup does not require them. Workers Free dynamic requests are shared across this account (100,000/day), with 10 ms CPU per invocation; workload fit is conditional and has not been measured. D1 Free allowance: 5 million rows read/day, 100,000 rows written/day and 5 GB total storage; unindexed scans and history retention consume quota. KV Free allowance: 100,000 keys read/day and 1,000 each writes/deletes/list requests/day; this may constrain updates before Worker request limits. R2 Standard allowance: 10 GB-month storage, 1 million Class A and 10 million Class B operations/month; account activation may require billing setup, and other storage classes are excluded. Only SQLite Durable Objects qualify for Workers Free. Keep DO requests below 100,000/day, active duration below 13,000 GB-s/day and SQLite storage/operations inside the captured allowances. Check current Cloudflare pricing before deploying.

    Is nodrix open source?+

    The upstream repository declares the MIT license. Read its terms at https://raw.githubusercontent.com/decoded-cipher/nodrix/8fd634b3bf166635f2212907904a7a8dd4972381/LICENSE. Source code and contributor credit are available at https://github.com/decoded-cipher/nodrix.

    Community rating

    No ratings yet. Tried this project? Share your experience.

    One rating per verified account. You can change or remove yours. Accounts are email verified; use of the software is self-reported.

    Discuss your experience ↓
    Sign in to rate

    Discussion · 0

    sign in to comment →
    No comments yet — be the first.