The main user is the operator, who watches peat pixels, reads why a pixel is AWAS (MAUT attributes with their measured numbers, and neighbours), reads the agent's verification, then publishes or rejects. Published messages reach the web inbox and Telegram DMs of that province's subscribers, who press Confirm receipt. The web app already runs in the team repo ktp-asapify-fe in mock mode (fictional data, demo sign-in) or live mode (Google sign-in); in live mode all data comes through the API. Default language is English, with an EN/ID switch in the top bar that the device remembers.
| Route | Page | User | Main content | Data from |
|---|---|---|---|---|
/masuk | Sign-in | operator, subscriber | Demo sign-in in mock mode; Google sign-in (Firebase Auth) in live mode. Accounts without the operator claim go to /notifikasi. The left side explains when a pixel becomes AWAS with a 3 × 3 neighbour grid | Firebase Auth |
/ | Operator map | operator | Peat pixel status, a sortable AWAS cluster list, search, status and province filters with a province highlight, layer control, slot player with an archive-night calendar, pixel inspector | /meta, /operator/pixels, /operator/grid?format=compact, /operator/grid/night, /operator/nights, /operator/clusters, /operator/basemaps, layers/*.geojson |
/kelompok/:id | Cluster detail | operator | 3-night utility chart, MAUT parameter table (measured value, u, weight, contribution), neighbour grid, agent verification with temperature tooltips on the images, ToolTrace, decision panel | /operator/clusters/{id}, /operator/alerts/{id}/deliveries |
/notifikasi | Notifications | subscriber, operator | Inbox (confirm receipt, keep for offline reading), province and channel choice, consent and exercises, link Telegram, register browser push | /notifications/* |
/tentang | About & method | everyone, judges | How it works (5 steps), pixel status, MAUT weights, two satellites, limitations, data sources ("NOAA open data"; all processing on Google Cloud) | static |
/kontrak-api | API contract | backend team, judges | Conventions, error codes, every endpoint (parameters, body, responses, errors, screens that use it), schemas, static files, internal agent endpoints. JSON examples come from the same mock data as the screens | static |
There is no level to choose. Clusters without a decision stay monitored.
The map, cluster outlines and list follow the chosen night.
One message per channel per event. Accepted by the provider does not mean read.
From 1024 px up, the cluster list moves to a 360 px left panel; below that, the list becomes a draggable bottom sheet. Sketch data is fictional.
/fitBounds([[94.9,-6.1],[119.4,6.0]]))/kelompok/:idU = Σ w·u ÷ Σ waudit_log; simultaneous decisions → 409, and the saved decision is shownAWAS · Dugaan gambut membara
📍 Kalimantan Tengah · -2.21, 113.92 · 4 piksel
🛰️ Himawari + GK2A sepakat · utility 0,73 · tetangga 3/8
🔎 Bukti kuat: asap terlihat (VIIRS 24 Sep), deteksi VIIRS 1,4 km
🕙 Slot 24 Sep 22.10 WIB
AWAS adalah indikasi, bukan kebakaran terkonfirmasi.
| Target | Sender | When the bot posts | Content |
|---|---|---|---|
| Operator (internal) | asapify-agent | Automatically, once an AWAS cluster's verification is saved | Cluster ID, province, utility, neighbours, verification result, detail link (operators only) |
| Subscriber (DM, per person) | asapify-notify | Only after an operator presses Publish, for subscribers who chose that province | The template text below (no HTML, no photo) + an Buka & konfirmasi diterima (open & confirm) button; a copy sits in the web inbox |
| Cluster closed | asapify-agent / asapify-api | Cluster closed automatically / operator closes it | Inbox entries get the SELESAI label, unsent jobs are cancelled (not implemented yet) |
<b>AWAS · Dugaan gambut membara</b>
📍 {provinsi} · {lat:.2f}, {lon:.2f} · {n_pixels} piksel
🛰️ Himawari + GK2A sepakat · utility {U:.2f} · tetangga {n_nbr}/8
🔎 {"Bukti kuat" | "Inkonklusif"}: {alasan singkat dari evidence}
🕙 Slot {slot WIB:%d %b %H.%M} WIB
Status AWAS dari aturan satelit; bukan konfirmasi lapangan.
clusters and verifications, never retyped/start <code> through the webhook to link an account and never replies; it stores only the chat_id of subscribers who linked themselves. HTML tags are stripped for DMsPixel geometry is built once from /operator/pixels. Per-slot status, the status filter and the player use feature-state (only changed cells are rewritten), so playing slots never triggers re-tiling. Map labels (provinces, basemap, MapLibre buttons) follow the screen language.
| Layer | Source | Type | Style | Zoom |
|---|---|---|---|---|
| Basemap | OpenFreeMap positron/dark (street map), raster from /operator/basemaps (VIIRS imagery), or plain with no tiles | vector / raster / background | follows the light/dark theme; lite mode uses plain | all |
| Pixel status | /operator/pixels + /operator/grid?format=compact (or /grid/night for other slots) | fill + symbol | colour per status, NO_OBSERVATION hatched, Watch/AWAS icons at zoom ≥ 10, thin grid lines at zoom ≥ 9 | all |
| Peat boundary | layers/peat_pixels.geojson in the public bucket | line | 1 px dashed line | all |
| Province boundaries | layers/provinces.geojson in the public bucket | line + symbol | thin line + name label; selected province: thick haloed line, bold label, surroundings dimmed | labels ≤ 8–9 |
| AWAS clusters | clusters in the compact responses (cell indices) | line + symbol | thick dashed line + glow, cluster ID label; selected cluster in blue | all |
| VIIRS detections | verification evidence of the selected cluster | circle + symbol | small dot + distance, can be switched off | ≥ 9 |
| Status | Label EN / ID | Colour |
|---|---|---|
SAFE | Safe / Aman | #DBE8DD |
NO_OBSERVATION | No observation / Tidak teramati | grey hatching |
WATCH | Watch / Pantau | #F0C46A |
AWAS | AWAS / AWAS | #C2410C |
| Value | Label EN / ID | Display |
|---|---|---|
strong_evidence | Strong evidence / Bukti kuat | satellite-blue badge |
inconclusive | Inconclusive / Inkonklusif | grey badge |
published · rejected · none | Published · Rejected · Awaiting decision / Diterbitkan · Ditolak · Menunggu keputusan | text + icon, no level colour |
Type: IBM Plex Sans for text, IBM Plex Sans Condensed for headings, IBM Plex Mono only for data (IDs, numbers, times). Labels and badges use sentence case, not all caps. Touch targets at least 44 × 44 px. Text contrast at least WCAG AA. The light/dark theme follows the system and can be switched.
ktp-asapify-fe/src/components| Component | Used on | Role |
|---|---|---|
StatusBadge, EvidenceBadge, SatelliteAgree | every screen | pixel status with icon; agent result; "Himawari + GK2A agree" / "one satellite" |
DataBanner | map | latest slot + satellites; amber when one satellite is > 40 minutes late, blue for replay and archive, plus cloud, daytime and no-data banners |
SlotPlayer | map | 54-slot night ribbon (▲ row = AWAS count, H/G rows = availability), play/pause, keyboard-friendly slider |
NightCalendar | slot player | month calendar from /operator/nights: faded dates without data, a dot when a night had AWAS clusters; Escape or a click outside closes it |
Select | province filter, sort, calendar | custom dropdown replacing <select> (ARIA listbox pattern): arrows, Home/End, Enter, Escape, type-ahead; opens upward when space below is short |
LayerControl | map | basemap (radio), layer switches, lite-mode switch |
PixelInspector | map | pixel card: ID, province, coordinates, status at this slot and latest, utility, 54-slot history, button to the cluster |
Sheet | map (screens < 1024 px) | draggable bottom sheet; its content still scrolls |
UtilityChart | detail | utility per slot over 3 nights, lines at 0.30 and 0.65, cloudy slots hatched |
AttributeBars | detail | MAUT parameter table from attribute_details: measured value, u, weight, contribution, supporting numbers, scale, formula; missing attributes read "not available" |
NeighbourGrid | detail, sign-in | 3 × 3: neighbours ≥ 0.5, normal, cloudy, not peat |
EvidenceImage, ProbeTips, FloatingTip | detail | VIIRS and Himawari images side by side with a 5 km marker; per-cell temperature tooltip (from images[].thermal) and FIRMS points; tooltips render in <body> so they are never clipped |
ViirsList, ToolTrace | detail | VIIRS detections (satellite, WIB time, distance); agent steps: tool name, arguments, duration |
DecisionPanel | detail | Publish / Reject (reason required), confirmation, errors written from code; after publishing: queue summary |
DeliveryStatus | detail (live mode) | per-channel send status from /deliveries, refreshed every 15 seconds during the one-hour delivery window |
Mock mode can demo each state with ?skenario=normal|kosong|awan|satu_satelit|siang (normal, empty, cloudy, one satellite, daytime).
| State | When | Copy (EN) |
|---|---|---|
| Loading | request in flight | grey skeleton, no text |
| Empty | no AWAS clusters | "No AWAS pixels in the latest slot." · archive night: "No AWAS clusters on the night of {date}." |
| Cloud covered | > 50% of pixels NO_OBSERVATION | "Cloud covers more than half of the pixels. Cloudy pixels never count as safe." |
| One satellite | n_sat = 1 in the latest slot | "{satellite} data is late. AWAS needs both satellites, so pixels can reach Watch at most." |
| Daytime | outside 20:00–04:00 WIB | "Daytime. The map shows the last slot of last night." |
| Replay | replay = true | "Replay: data as of {date time}." |
| Archive night | a night other than the latest is open | "Archive night of {date}. The map and the cluster list follow this night." |
| Night without data | every slot of that night is null | "This night has no satellite data, so every pixel is unobserved." |
| Error | non-2xx response or network failure | "Could not load data. {message for the code}" + a "Retry" button |
en.json and id.json must hold the same keysfinding/finding_en, summary_id/summary_en); errors are written from code| Key | EN | ID |
|---|---|---|
status.awas | AWAS | AWAS |
status.watch | Watch | Pantau |
awas.note | AWAS calls the agent to verify. The status alone does not mean a fire. | AWAS memanggil agen untuk verifikasi. Status ini belum berarti ada kebakaran. |
evidence.inconclusive | Inconclusive | Inkonklusif |
sat.agree | Himawari + GK2A agree | Himawari + GK2A sepakat |
btn.publish | Publish | Terbitkan |
ktp-asapify-fe)/maplibre/motion (springs), lazy-loaded; off under reduced motion and in lite modeUtilityChart and the parameter table@fontsource (no Google Fonts)VITE_API_MODE=mock (default, fictional data + demo sign-in) or live (VITE_API_BASE, VITE_PEAT_LAYER_URL, VITE_PROVINCES_LAYER_URL)role = operator claim opens the map and decisions; other accounts get /notifikasi onlynotification-sw.js service worker, exercises/non-emergency only; it also keeps the inbox for offline reading when the user opts in/api/** to Cloud Run asapify-api (the judged prototype URL). A mock-mode preview on Vercel serves internal reviewsrc/ ├─ api.ts, auth.ts, types.ts, notification-api.ts, notification-push.ts, notification-sw.ts ├─ map/ map.ts, layers.ts ├─ pages/ Masuk, PetaOperator, Kelompok, Notifikasi, Tentang, KontrakApi ├─ components/ # section 06 ├─ contract/ spec.ts # content of the API contract tab ├─ mock/ fixtures.ts, thermal.ts, scenario.ts ├─ motion/ presets.ts, MotionProvider.tsx ├─ lib/ grid.ts, maut.ts, format.ts, errors.ts, … └─ i18n/ en.json, id.json