UI specification · reference for role D · aligned with the app 6 Oct · subscriber notifications 9 Oct

Operator screens, the notifications page and Telegram messages

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.

01 · Routes

Six routes for operators, subscribers, judges and the backend team

RoutePageUserMain contentData from
/masukSign-inoperator, subscriberDemo 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 gridFirebase Auth
/Operator mapoperatorPeat 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/:idCluster detailoperator3-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
/notifikasiNotificationssubscriber, operatorInbox (confirm receipt, keep for offline reading), province and channel choice, consent and exercises, link Telegram, register browser push/notifications/*
/tentangAbout & methodeveryone, judgesHow it works (5 steps), pixel status, MAUT weights, two satellites, limitations, data sources ("NOAA open data"; all processing on Google Cloud)static
/kontrak-apiAPI contractbackend team, judgesConventions, 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 screensstatic
Every API path starts with /api/v1. Subscribers use /notifikasi; the map and cluster detail are for operators only. Deep links such as /kelompok/C-0924-002 open directly.
02 · Flows

Three flows that must run smoothly in the demo

Operator
Message in the operator group→Open the cluster detail→Read MAUT parameters + neighbours→Read verification + images→Publish / reject

There is no level to choose. Clusters without a decision stay monitored.

Archive night
Open the calendar in the slot player→Pick a date with a dot→Play that night's 54 slots→Open that night's cluster

The map, cluster outlines and list follow the chosen night.

Subscriber
Pick provinces + channels, consent→Operator publishes→Telegram DM + inbox→Confirm receipt

One message per channel per event. Accepted by the provider does not mean read.

03 · Wireframes

Five operator web screens and one Telegram DM, phone size

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.

ASAPify · OperatorEN | ID
AWAS clusters: 1Highest utility ▾
AWASC-0924-002 · 4 pixels · U 0.73
Strong evidenceAwaiting decision

Operator map /

  • Opens on Sumatra + Kalimantan (fitBounds([[94.9,-6.1],[119.4,6.0]]))
  • 2 km pixel grid: colour + status icon; NO_OBSERVATION hatched; AWAS clusters dashed
  • Search by cluster ID, pixel ID or coordinates; status chips can be switched off
  • 15-province filter (dropdown by island): the selected province gets a thick outline and a label, and its surroundings are dimmed
  • Cluster list sorted by utility or trigger time
22:10 WIB · latest slot▶
Night ribbon · 54 slots ▲ AWAS per slot · H Himawari · G GK2A
Night calendar · September 2023
1112131415•1617
181920212223•24•
• AWAS clusters that night · faded dates: no data

Slot player and calendar

  • Play the 54 night slots (20:00–04:50 WIB); drag, or use the arrow keys on the ribbon
  • Month calendar with month and year pickers; ‹ › moves one night; "Go to latest" returns to the replay night
  • The archive starts on 16 Feb 2023 (start of the NOAA GK2A archive)
← C-0924-002AWAS
Utility over 3 nights 0.65 AWAS 0.30 22–24 Sep · hatched = no observation
MAUT parameters at the trigger slot
u_H Himawari · +18.6 K1.00
u_G GK2A · +16.9 K1.00
u_T · 2 of 3 nights0.67
u_N · 3/8 neighbours0.375

Cluster detail /kelompok/:id

  • Utility per slot, lines at 0.30 and 0.65, cloudy slots hatched
  • Parameter table: measured value, u, weight, contribution w × u, supporting numbers, scale, and the formula U = Σ w·u ÷ Σ w
  • 3 × 3 neighbour mini grid; "both satellites agree" or "one satellite" label
← VerificationStrong evidence
VIIRS true colour · NOAA-20 · 24 SepThin smoke drifting north-west · 9 h old
Himawari thermal · 22:10 · tooltipp420_950 · B07 45.1 °C · B14 27.3 °C · anomaly +18.6 K (z 4.4) · cluster member
VIIRS detections, 48 h
NOAA-20 · 01:42 WIB1.4 km
Agent steps (5)

Verification card

  • Every piece of evidence shows its time and age; agent text appears in the screen's language
  • Tooltip on images: brightness temperature per 0.02° pixel (Himawari B07/B14, GK2A SW038/IR105) and the anomaly against the crop background; on the VIIRS image: coordinates, distance, FIRMS points
  • No visible smoke = inconclusive, never negative
  • Agent steps (ToolTrace): tool name, arguments, duration (for the video)
Decision C-0924-002operator
SummaryAWAS · U 0.73 · 3/8 neighbours · Himawari + GK2A agree · Strong evidence
Message text (in Indonesian) · 412/1024
AWAS · Kalimantan Tengah · -2.21, 113.92 · 4 piksel …
PublishReject
Rejecting needs a reason. Clusters without a decision stay monitored.

Decision panel

  • Two buttons only: Publish, Reject (reason required); confirmation before sending
  • The text is prefilled from the 03b template, editable, max 1,024 characters
  • "Publish" saves the decision, then queues the message for subscribers of the cluster's province; afterwards the panel shows the recipient count and per-channel send status
  • Everything is logged in audit_log; simultaneous decisions → 409, and the saved decision is shown
ASAPify BotTelegram · DM
ASAPify Bot

AWAS · 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.

Buka & konfirmasi diterima 22.31

Bot DM to a subscriber

  • Sent only after an operator publishes, to subscribers who chose that province and linked Telegram
  • The message stays in Indonesian for recipients in Indonesia
  • Plain text without a photo, so it arrives fast on weak networks
  • One button: open the web inbox and confirm receipt
03b · Telegram bot messages ✅

A group for operators, DMs for subscribers

TargetSenderWhen the bot postsContent
Operator (internal)asapify-agentAutomatically, once an AWAS cluster's verification is savedCluster ID, province, utility, neighbours, verification result, detail link (operators only)
Subscriber (DM, per person)asapify-notifyOnly after an operator presses Publish, for subscribers who chose that provinceThe template text below (no HTML, no photo) + an Buka & konfirmasi diterima (open & confirm) button; a copy sits in the web inbox
Cluster closedasapify-agent / asapify-apiCluster closed automatically / operator closes itInbox entries get the SELESAI label, unsent jobs are cancelled (not implemented yet)
Message template (Indonesian)shared/caption.py
<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.

Rules

  • Caption at most 1,024 characters; numbers come from clusters and verifications, never retyped
  • Never says "confirmed fire"; the last line reads "AWAS status comes from satellite rules; it is not a field confirmation"
  • The caption stays in Indonesian (its recipients are responders in Indonesia), also when the web screen is in English; the demo video uses English subtitles
  • The bot only accepts /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 DMs
04 · Map layers

MapLibre data layers over the basemap

Pixel 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.

LayerSourceTypeStyleZoom
BasemapOpenFreeMap positron/dark (street map), raster from /operator/basemaps (VIIRS imagery), or plain with no tilesvector / raster / backgroundfollows the light/dark theme; lite mode uses plainall
Pixel status/operator/pixels + /operator/grid?format=compact (or /grid/night for other slots)fill + symbolcolour per status, NO_OBSERVATION hatched, Watch/AWAS icons at zoom ≥ 10, thin grid lines at zoom ≥ 9all
Peat boundarylayers/peat_pixels.geojson in the public bucketline1 px dashed lineall
Province boundarieslayers/provinces.geojson in the public bucketline + symbolthin line + name label; selected province: thick haloed line, bold label, surroundings dimmedlabels ≤ 8–9
AWAS clustersclusters in the compact responses (cell indices)line + symbolthick dashed line + glow, cluster ID label; selected cluster in blueall
VIIRS detectionsverification evidence of the selected clustercircle + symbolsmall dot + distance, can be switched off≥ 9
05 · Status and colour

A status always comes with a label and an icon

Pixel status (rule engine)
StatusLabel EN / IDColour
SAFESafe / Aman#DBE8DD
NO_OBSERVATIONNo observation / Tidak teramatigrey hatching
WATCHWatch / Pantau#F0C46A
AWASAWAS / AWAS#C2410C
Verification result (agent) and decision (operator)
ValueLabel EN / IDDisplay
strong_evidenceStrong evidence / Bukti kuatsatellite-blue badge
inconclusiveInconclusive / Inkonklusifgrey badge
published · rejected · nonePublished · Rejected · Awaiting decision / Diterbitkan · Ditolak · Menunggu keputusantext + 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.

06 · Components

Components in ktp-asapify-fe/src/components

ComponentUsed onRole
StatusBadge, EvidenceBadge, SatelliteAgreeevery screenpixel status with icon; agent result; "Himawari + GK2A agree" / "one satellite"
DataBannermaplatest slot + satellites; amber when one satellite is > 40 minutes late, blue for replay and archive, plus cloud, daytime and no-data banners
SlotPlayermap54-slot night ribbon (▲ row = AWAS count, H/G rows = availability), play/pause, keyboard-friendly slider
NightCalendarslot playermonth calendar from /operator/nights: faded dates without data, a dot when a night had AWAS clusters; Escape or a click outside closes it
Selectprovince filter, sort, calendarcustom dropdown replacing <select> (ARIA listbox pattern): arrows, Home/End, Enter, Escape, type-ahead; opens upward when space below is short
LayerControlmapbasemap (radio), layer switches, lite-mode switch
PixelInspectormappixel card: ID, province, coordinates, status at this slot and latest, utility, 54-slot history, button to the cluster
Sheetmap (screens < 1024 px)draggable bottom sheet; its content still scrolls
UtilityChartdetailutility per slot over 3 nights, lines at 0.30 and 0.65, cloudy slots hatched
AttributeBarsdetailMAUT parameter table from attribute_details: measured value, u, weight, contribution, supporting numbers, scale, formula; missing attributes read "not available"
NeighbourGriddetail, sign-in3 × 3: neighbours ≥ 0.5, normal, cloudy, not peat
EvidenceImage, ProbeTips, FloatingTipdetailVIIRS 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, ToolTracedetailVIIRS detections (satellite, WIB time, distance); agent steps: tool name, arguments, duration
DecisionPaneldetailPublish / Reject (reason required), confirmation, errors written from code; after publishing: queue summary
DeliveryStatusdetail (live mode)per-channel send status from /deliveries, refreshed every 15 seconds during the one-hour delivery window
07 · Screen states

States that must render correctly

Mock mode can demo each state with ?skenario=normal|kosong|awan|satu_satelit|siang (normal, empty, cloudy, one satellite, daytime).

StateWhenCopy (EN)
Loadingrequest in flightgrey skeleton, no text
Emptyno 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 satelliten_sat = 1 in the latest slot"{satellite} data is late. AWAS needs both satellites, so pixels can reach Watch at most."
Daytimeoutside 20:00–04:00 WIB"Daytime. The map shows the last slot of last night."
Replayreplay = true"Replay: data as of {date time}."
Archive nighta night other than the latest is open"Archive night of {date}. The map and the cluster list follow this night."
Night without dataevery slot of that night is null"This night has no satellite data, so every pixel is unobserved."
Errornon-2xx response or network failure"Could not load data. {message for the code}" + a "Retry" button
08 · Language and copy

One language per screen

Rules

  • English by default; EN/ID in the top bar, remembered per device. en.json and id.json must hold the same keys
  • Agent text follows the screen language (finding/finding_en, summary_id/summary_en); errors are written from code
  • AWAS stays AWAS in both languages as the status name (the English version explains it once: Indonesian for "beware")
  • Alert message text (inbox, Telegram DM) stays in Indonesian
  • Plain, active sentences: no jargon, no em dashes
KeyENID
status.awasAWASAWAS
status.watchWatchPantau
awas.noteAWAS 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.inconclusiveInconclusiveInkonklusif
sat.agreeHimawari + GK2A agreeHimawari + GK2A sepakat
btn.publishPublishTerbitkan
09 · Stack

A light frontend, also for low-end phones

Build
React 19 + Vite + TypeScript (team repo ktp-asapify-fe)
Map
MapLibre GL JS 6; the module worker is served as-is from /maplibre/
Motion
motion (springs), lazy-loaded; off under reduced motion and in lite mode
Charts
hand-written SVG for UtilityChart and the parameter table
Type
IBM Plex through @fontsource (no Google Fonts)
Mode
VITE_API_MODE=mock (default, fictional data + demo sign-in) or live (VITE_API_BASE, VITE_PEAT_LAYER_URL, VITE_PROVINCES_LAYER_URL)
Auth
demo sign-in in mock mode; Firebase JS SDK (Auth, Google sign-in) in live mode. The role = operator claim opens the map and decisions; other accounts get /notifikasi only
Push
Firebase Messaging + the notification-sw.js service worker, exercises/non-emergency only; it also keeps the inbox for offline reading when the user opts in
Hosting
Firebase Hosting, /api/** to Cloud Run asapify-api (the judged prototype URL). A mock-mode preview on Vercel serves internal review
Lite mode
automatic when data saver is on, RAM ≤ 2 GB, the CPU is limited, or reduced motion is set: plain basemap, no glow/grid lines/camera animation, pixel ratio 1
Folder layoutktp-asapify-fe/src/
src/
├─ 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