How changetechlab/agri_monitor works
AgriMonitor is an offline-capable GIS and field-monitoring web app for agriculture, climate resilience, rural planning, and carbon projects. Field staff use the dashboard to select locations, view spatial and farmer data, and collect records; separate climate-activity and MRV workflows track interventions and calculate carbon results for local storage and reporting. The README documents mapping, farmer management, analytics, and PWA behavior; sampled code confirms bootstrap, MRV, satellite, and offline details. Other capability links reflect README documentation, not inspected call sites.
Main entry points: app.js App coordinator · mrv.js MRV workflow · index.html GIS dashboard · gee-tiles.js Earth Engine tile API
Components 24
Dashboard and GIS
- GIS dashboard
index.html - App coordinator
js/app.js - Interactive map
js/map.js - Spatial layers
js/layers.js - Village boundaries
data/gp_boundaries - Village directory
data/lgd_villages.js - Charts and reports
js/charts.js
Field Data
- Farmer management
js/farmers.js
Climate and Carbon
- Climate activities
climate-activities.html - Activity tracking
js/modules/climate.js - Carbon MRV
mrv.html - MRV workflow
js/mrv/mrv.js - Carbon calculator
js/mrv/calculator.js - MRV records
js/mrv/storage.js - PDF reports
js/mrv/pdf.js
Platform Services
- Offline records
js/offline.js - PWA caching
sw.js - Authentication
js/auth.js - Supabase
supabase/schema.sql
Satellite Analysis
- Satellite indices
js/satellite-engine.js - Earth Engine tile API
api/gee-tiles.js - GEE authentication
api/_gee-auth.js
Other components
- Field staff
- Google Earth Engine
Connections 25
- Field staff → GIS dashboard: uses
- GIS dashboard → App coordinator: loads
- App coordinator → Interactive map: initializes
- App coordinator → Spatial layers: initializes
- Spatial layers → Village boundaries: reads
- App coordinator → Farmer management: initializes
- Farmer management → Village directory: uses
- App coordinator → Offline records: initializes
- PWA caching → GIS dashboard: caches
- Field staff → Climate activities: records activity
- Climate activities → Activity tracking: loads
- Field staff → Carbon MRV: starts MRV
- Carbon MRV → MRV workflow: loads
- MRV workflow → Carbon calculator: calculates
- MRV workflow → MRV records: saves records
- MRV workflow → PDF reports: exports report
- Field staff → GIS dashboard: views analytics
- App coordinator → Charts and reports: initializes
- Interactive map → Satellite indices: requests indices
- Satellite indices → Earth Engine tile API: fetches tiles
- Earth Engine tile API → GEE authentication: authenticates
- Earth Engine tile API → Google Earth Engine: requests imagery
- Authentication → Supabase: authenticates
- Offline records → Supabase: syncs records
- MRV records → Supabase: cloud adapter