Skip to content
7893Public

About

🌐 MODO: Next-Generation Enterprise Managed Edge Telemetry & Global Distribution

Topics

Resources

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

Β 

History

113 Commits

Folders and files

Repository files navigation

MODOοΌˆε’¨ζ–—οΌ‰

CI License: MIT

MODO is a configurable multi-cloud telemetry dashboard built with Cloudflare Workers, Hono, FastAPI, Prometheus node exporters, and Oracle MySQL HeatWave. It collects infrastructure metrics, exposes a private API gateway, and renders a six-panel operational dashboard.

The repository contains reference configuration only. It does not include a hosted service, production node inventory, database, or Cloudflare account.

Architecture

Browser
   β”‚ HTTPS
   β–Ό
Cloudflare Worker / Hono
   β”‚ authenticated private proxy
   β–Ό
FastAPI gateway ───────► Oracle MySQL HeatWave
   β–²                           β”‚
   β”‚ Prometheus scrape         └─ optional HeatWave AutoML
   β”‚
Configured node_exporter fleet

The backend is intended to remain private. The Worker injects a shared internal secret when proxying API requests. Database and node endpoints should not be exposed directly to the public Internet.

Features

  • Concurrent node_exporter metric collection with CPU counter warm-up.
  • HeatWave-backed telemetry, analytics views, retention, and optional AutoML.
  • Aggregated dashboard API to avoid high-frequency fan-out polling.
  • ECharts fleet, resource, latency, inventory, and diagnostic views.
  • Optional Supabase authentication and realtime updates.
  • Cloudflare Worker proxy with masked upstream errors and scheduled retention.
  • Bounded API rate limiting with trusted Worker client-IP forwarding.
  • CI checks for Python tests, TypeScript, Wrangler packaging, and the 400-line first-party source limit.

Repository layout

modo/
β”œβ”€β”€ data-bridge/
β”‚   β”œβ”€β”€ config/nodes.json.example
β”‚   β”œβ”€β”€ src/                    # ingestion, FastAPI modules, schema and AutoML
β”‚   └── tests/
β”œβ”€β”€ edge-app/
β”‚   β”œβ”€β”€ src/client/             # browser behavior modules
β”‚   β”œβ”€β”€ src/fragments/          # dashboard HTML fragments
β”‚   β”œβ”€β”€ src/index.ts            # Worker routes and page composition
β”‚   └── wrangler.jsonc
β”œβ”€β”€ deploy/                     # reference systemd and Tunnel templates
β”œβ”€β”€ docs/
β”‚   β”œβ”€β”€ deployment/
β”‚   β”œβ”€β”€ issues/
β”‚   └── security/
β”œβ”€β”€ scripts/
β”œβ”€β”€ CONTRIBUTING.md
β”œβ”€β”€ SECURITY.md
└── LICENSE

First-party source files are limited to 400 physical lines. Generated files and vendored dependencies are excluded. CI enforces the rule with scripts/check_source_file_lines.py.

Requirements

  • Python 3.13.15
  • Node.js 26.10.0
  • pnpm 12.6.0
  • Cloudflare account for deployment
  • Oracle MySQL HeatWave for database-backed runtime features
  • node_exporter on each monitored node

MySQL, HeatWave, and Docker are not required to run the repository's unit tests.

Backend development

From the repository root:

cp .env.example .env
cp data-bridge/config/nodes.json.example data-bridge/config/nodes.json

python3 -m venv data-bridge/venv
source data-bridge/venv/bin/activate
pip install --require-hashes -r data-bridge/requirements.lock
cd data-bridge
pytest -v tests/

Replace all example values before starting services. The documentation IP addresses are non-routable examples.

To run against an Oracle MySQL HeatWave environment you control, follow the HeatWave deployment notes. Do not run schema initialization against production without a backup and maintenance plan.

Edge development

cd edge-app
cp .dev.vars.example .dev.vars
pnpm install --frozen-lockfile
pnpm dev

Set API_BACKEND_URL and use the same INTERNAL_API_SECRET as the backend. Supabase values may remain empty when authentication and realtime features are not being exercised.

Useful checks:

pnpm build:css
pnpm run cf-typegen
pnpm run typecheck
pnpm exec wrangler deploy --dry-run

pnpm deploy performs a real Cloudflare deployment and should only be used with an explicitly authorized account and environment.

Configuration and generated files

  • .env, .dev.vars, and data-bridge/config/nodes.json are local and ignored.
  • edge-app/src/tailwind.generated.css is generated by pnpm build:css.
  • edge-app/worker-configuration.d.ts is generated by Wrangler.
  • TOPOLOGY_HUB_NODE selects the dashboard aggregation node; when unset, the first configured node is used.
  • Automatic model retraining is disabled in the example configuration and must be explicitly enabled.

Documentation

License

MODO is licensed under the MIT License.

Public data boundary

The Worker exposes read-only monitoring data anonymously. Frontend login does not restrict these APIs. Node summaries expose only name, region, provider and map coordinates; telemetry responses use an explicit public field allowlist and omit host addresses. Use non-sensitive node names and approximate public coordinates. Keep database credentials and real node configuration outside Git.

Python dependencies are installed from data-bridge/requirements.lock with hashes. To update intentionally, run uv pip compile requirements.txt --python-version 3.13.15 --generate-hashes --output-file requirements.lock inside data-bridge.

About

🌐 MODO: Next-Generation Enterprise Managed Edge Telemetry & Global Distribution

Topics

Resources

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages