Skip to content

Architecture

Chinmaya Thakral edited this page Oct 8, 2026 · 2 revisions

Architecture

flowchart LR
  A[NASA FIRMS] --> S[(DuckDB store)]
  R[Reference maps] --> S
  S --> F[Features and weak labels]
  F --> M[Models and evaluation]
  M --> X[Exported artifacts]
  X --> C[Research console]
  I[INSAT-3DS from MOSDAC] --> D[Contextual detector]
  D --> L[Live feed pipeline]
  A --> L
  L --> W[Live web app]
  W <--> API[Community API, SQLite]
Loading

Branches

Branch Contents Deploy
console, the default ml/, scripts/, tests/, apps/console/ Nixpacks
agninetra everything on console plus apps/live/ Docker

console is merged into agninetra, never the reverse.

The research side

  • ml/ingest: FIRMS and MOSDAC ingestion into DuckDB with the spatial extension.
  • ml/reference: flares, OpenStreetMap industry, Global Energy Monitor plants and mines, ESA WorldCover.
  • ml/features, ml/labels: recurrence features and weak labels.
  • ml/eval: spatially blocked evaluation, conformal prediction, applicability domain.
  • scripts/: every reported number has a script; export_console.py writes the console's files.

The console

Next.js with MapLibre. Static: it parses the exported JSON through zod and runs no model.

Live

  • apps/live/pipeline: builds each evening's feed from FIRMS and the project's INSAT-3DS detector, aggregated to 0.1 degree cells, validated before it is written.
  • apps/live/serve.py: a standard library HTTP server that serves the app, rebuilds the feed every 30 minutes from 16:37 to 21:37 IST and at 23:37, sends a content policy that allows only the site's own scripts, marks API responses no-store, and logs no requests.
  • apps/live/community.py: Google sign in, qualifying rounds, community labels and data sync, in one SQLite file.
  • apps/live/web: Vite and strict TypeScript, no framework, every input parsed with zod.

Hosting

Both apps run on the owner's Dokploy server, each deployed from its own branch on every push. The console is built by Nixpacks from the root nixpacks.toml and serves at https://agninetra-console.chinmayathakral.com. Live is one Docker container from the root Dockerfile, at https://agninetra.chinmayathakral.com, with /app/data on a persistent volume for the feed history and the community database.

Checks

Every push runs the research checks (ci.yml) or the Live checks (live.yml), and CodeQL scans the Python and TypeScript. Dependabot opens pull requests only for dependencies with a security advisory.

Clone this wiki locally