How the products work, and how to build with them.
Methods notes for each product, the open Sangam schemas and SDK, the console guide, and the contract every pipeline follows. Written for operators, integrators and reviewers.
Overview
Product methods notes
Every product ships a methods note: what data it uses, the assumptions it makes, where it fails, and how to check it. A note is published while its product is still in build, and changes until the product passes review.
| Product | What it covers | Methods note |
|---|---|---|
| Console | Event intelligence from the public record: incidents, seizures, places and routes. | Read |
| Raksha | Weather-driven risk for people on patrol: heat, cold, lightning, air. | Read |
| Varuna | River discharge, flood thresholds, and safe crossing windows. | Read |
| Nadi | Where the river moved: char-land and bankline change from satellites. | Read |
| Matsya | Boundary awareness and sea-state safety for fishing communities. | Read |
| Kampana | Rapid earthquake triage: estimated shaking at towns and public infrastructure. | Read |
| Marga | 72-hour landslide, snow, ice and fog outlook for frontier roads and passes. | Read |
| Drishti | Sensor weather: optical and thermal range, fog, and smoke along the border. | Read |
| Arogya | Outbreak radar and pre-deployment health briefs for border districts. | Read |
| Sangam | Open sensor-fusion SDK and common operating picture. | Read |
| Prahari | Riverine sentry pod: digital twin, power and coverage planner, fleet console. | Read |
| Shyena | Low-altitude airspace awareness and counter-drone planning. | Read |
| Gati | Get the right team there, safely: hazard-aware response planning. | Read |
| Sandesha | Official hazard alerts for border districts, with acknowledgements and outage flags. | Read |
| Anvesha | Drift search areas for missing boats and people in the water. | Read |
| Sandhi | Transboundary river flows against treaty schedules: the Ganga at Farakka and beyond. | Read |
| Sakshi | Tamper-evident audit, purpose binding, retention, and transparency. | Read |
| Darpan | Public transparency index of frontier enforcement, from official releases. | Read |
| Saathi | Offline-first safety companion for patrols and border villages: heat, rivers, sea, alerts. | Read |
| Setu | Open data catalogue, stable API paths, licences, and code samples for every Trinetra dataset. | Read |
Products not listed have not published a note yet. Rows are added from the product registry when this page loads.
Sangam SDK
Sangam is our open sensor-fusion layer. Any sensor maker or integrator can publish detections in the open schema, and Sangam fuses them into tracks and alerts that other systems can read. The detections, tracks and alerts Sangam shows on this site come from a seeded simulator, set on real geography and the real weather of the scenario hour, and are labelled Simulated.
Open schemas
JSON Schema files, versioned with the SDK. Every record carries type and schema_version, so one JSONL stream can mix record types.
| Record | Schema | Carries |
|---|---|---|
| Detection | detection.schema.json | One sensor's observation: position or range and bearing, uncertainty, class and confidence |
| Track | track.schema.json | A fused object over time: state, covariance, status, contributing sensors |
| Alert | alert.schema.json | A rule that fired on a track or zone, with level and reason |
| Zone | zone.schema.json | An area with rules, such as a crossing point or restricted water |
| Sensor status | sensor_status.schema.json | Health, power and link quality of a sensor |
| Common types | common.schema.json | Points, polar measurements, classifications, time |
Quick start
from trinetra.sangam.sdk import Detection, Polar, Point, Classification, Bus, JsonlSink
det = Detection(
id="RDR-1:42:0", sensor_id="RDR-1", sensor_type="radar",
time="2026-10-20T16:05:12.400Z",
polar=Polar(range_m=812.5, sigma_range_m=7.5,
bearing_deg=103.2, sigma_bearing_deg=0.6,
origin=Point(22.58731, 88.93522, 15)),
classification=Classification("small_boat", 0.62),
)
det.validate() # [] when valid
bus = Bus()
with JsonlSink("detections.jsonl").attach(bus, ["detections"]):
bus.publish("detections", det)
Commands
cd pipeline
python3 -m trinetra.sangam run # fetch geography and weather, simulate, fuse, export
python3 -m trinetra.sangam run --offline # rebuild from cached responses, no network
python3 -m trinetra.sangam validate FILE.jsonl # check records against the open schemas
python3 -m trinetra.sangam examples # run the SDK examples
Conventions
- Positions in WGS84 decimal degrees; covariances in an east-north frame, in square metres.
- Bearings in degrees clockwise from true north. Times in ISO-8601 UTC with a trailing Z.
- Classes: small boat, large vessel, person, animal, debris, or unknown. Sensor types: radar, EO, IR, acoustic, AIS, fence.
- Alert levels use the same four words as every product: normal, watch, warning, danger.
Sangam detects, tracks, classifies and alerts. It does not compute firing solutions. Product page.
Pipelines and data contract
The system is static web pages plus Python pipelines. Pipelines fetch public data or run seeded simulations and write JSON exports that the pages read. The deployed site never depends on a running server.
Module layout
pipeline/trinetra/<id>/ fetch, compute, export (python3 -m trinetra.<id> run)
dashboard/<id>/ console views for the product
dashboard/data/<id>/manifest.json provenance for every export
dashboard/data/<id>/*.json exports read by the pages
products/<id>.html public product page
docs/products/<id>.md methods note
tests/test_<id>.py offline tests with recorded fixtures
Run a pipeline
cd pipeline
python3 -m trinetra.varuna run # fetch, compute, export
python3 -m trinetra.varuna run --offline # rebuild from cached responses
The manifest
Every product writes dashboard/data/<id>/manifest.json with its sources, licences, retrieval times and files. Timestamps are ISO-8601 UTC; coordinates are [lat, lon] to four decimal places; units appear in field names where they could be ambiguous, such as discharge_m3s. Simulated records carry "simulated": true, and simulators record their seed. A failed fetch never destroys the last good export; the data is marked stale instead.
{
"module": "varuna",
"generated_at": "2026-10-21T04:38:59Z",
"simulated": false,
"seed": null,
"sources": [{"name": "Open-Meteo Flood API (GloFAS v4)", "license": "CC BY 4.0",
"url": "https://open-meteo.com/en/docs/flood-api",
"retrieved_at": "2026-10-21T04:14:18Z"}],
"files": [{"path": "board.json", "rows": 18, "bytes": 31414}],
"notes": "Advisory only."
}
Data API
Every public export is also served at a stable path, /api/v1/<module>/<file>, which maps to /dashboard/data/<module>/<file>. Responses are JSON with cross-origin access open, so a browser app on another site can read them. Start with a product's manifest to find its files, sources and licences.
curl https://trinetrahq.com/api/v1/varuna/manifest.json
curl https://trinetrahq.com/api/v1/varuna/board.json
Setu, our developer portal, lists every dataset with its licence, attribution and code samples. Respect each source's terms: the Open-Meteo free tier, for example, is for non-commercial use.
Testing and QA
python3 -m pytest tests/test_varuna.py -q # unit tests, no network
python3 -m http.server 8000 # serve the site locally
node tools/qa/qa.mjs products/varuna.html --a11y # browser QA: errors, links, 375 px, WCAG AA
A page passes QA with zero console errors, no broken internal links, no horizontal scroll at 375 px, and no serious accessibility findings. Text colours meet WCAG AA on every surface.
Deployment
- Public site. The repository root is served as static files. Directories are linked with a trailing slash (
/safety/) and files with their extension (/products/varuna.html). - Customer deployments. The same files and pipelines run on the customer's servers, on-premise or air-gapped. Pipelines rebuild from cached data with
--offline. See deployment models. - Optional local API.
python3 -m trinetra servestarts a FastAPI server for local analysis. Nothing on the public site needs it. - Secrets. Optional keys live in a
.envfile that is never committed. No key is needed to build or view the site.
Console guide
The console is where operators work; it asks you to sign in first. Live products appear in the sidebar under their group, and products still in build are listed together at its foot.
- Sign in
- The public demo uses a password check in the browser. It is a demo gate, not access control, and shows only public data and labelled simulations. Ask your Trinetra contact for access. Customer deployments use the customer's own sign-in.
- Operations
- Overview, daily brief, alerts and requests for information over the public-record corpus.
- Products
- Safety, hazards, sensors and airspace, response, analysis and training, governance and public groups, each opening the product's own views.
- Events
- Map, timeline, method and district views of incidents and seizures, with every claim linked to its source document. Private individuals appear as role labels.
- System
- Sources and their health, and the audit log of operator actions.
Public pages
- Safety hub: flood, heat and sea-state advisories, free and without an account.
- Darpan: seizures and interdictions from official releases, with CSV download.
- Transparency report: what the platform collects, a personal-data scan of public files, and a ledger anyone can verify.
- Research: notes with every claim sourced and our own data published.
Company documents
- Doctrine
- Seven red lines and eight commitments, with how each is enforced.
- Trust and security
- Deployment models, data retention, oversight, law, and responsible disclosure.
- Build contract
- Architecture and the rules every contributor builds against.
- Design system
- Tokens, components, chart and map helpers, and accessibility rules.
Data and licences
| Source | Used by | Terms |
|---|---|---|
| Open-Meteo forecast, flood (GloFAS), marine, air quality and ERA5 archive | Raksha, Varuna, Matsya, Marga, Drishti, Sarovara, Anvesha, Sandhi, Gati, Prahari, Sangam, Abhyas | CC BY 4.0. The free API is for non-commercial use; customer deployments use a subscription or a self-hosted instance. |
| JRC Global Surface Water; Sentinel-2 (via Microsoft Planetary Computer) | Nadi, Sarovara | Copernicus data, free with attribution; cite Pekel et al. (2016) |
| Glacial lake inventories and the Glacial Lake Observatory (Zenodo) | Sarovara | CC BY 4.0, attribution to the authors |
| OpenStreetMap | Sangam, Shyena, Kampana, Matsya, Gati, Prahari, Marga, Sarovara, Sandesha, Arogya | ODbL, attribution required |
| OurAirports; Natural Earth | Shyena; Matsya, Anvesha | Public domain |
| USGS earthquakes; NASA FIRMS active fires; NASA POWER | Kampana, Sarovara, Drishti, Prahari | Public domain; NASA data free with attribution |
| GDACS alerts; IODA internet outage events | Kampana, Sandesha | Attribution to GDACS and to IODA (Georgia Tech) |
| NCDC IDSP weekly outbreak reports; WHO Disease Outbreak News | Arogya | Government of India public documents; WHO terms of use |
| NDMA SACHET alerts; official press releases; answers to Parliament | Sandesha, Marga, Darpan, Console, Matsya | Public record, cited to the original |
| Wikidata district lists | Darpan, Arogya, Sandesha | CC0 |
Each product's manifest lists its exact sources and retrieval times.
Help
Integration and pilot questions: contact@trinetra.in. Security reports: security@trinetra.in. Corrections to a methods note: press@trinetra.in.