S0-1All roles
Register the team on Hack2Skill
The team is officially registered before 11 Oct; without this the submission is not valid.
Prerequisites
- An active email for each member
- Every member is a working professional aged ≥ 21
Outputs
- Team ASAPify on the Hack2Skill dashboard
docs/registrasi.png
Steps
- The lead opens the AI Builder Cup 2026 page via
aibuildercup.com, clicks the Hack2Skill registration link, and signs in with a Google account. - Create a team named
ASAPify. Choose the Sustainability & Social Impact theme. - Invite 1–3 members by email. Each member opens the invitation email and accepts.
- Take a screenshot of the team page and save it as
docs/registrasi.png in the repo.
Done check
The team dashboard shows 2–4 members with active status. Deadline: 1 Oct (hard: 11 Oct).
S0-2Role C
GCP project, billing, budget, APIs
One project for every service, with a budget alert so Gemini and download costs stay under control.
Prerequisites
- gcloud CLI installed (or use Cloud Shell)
- A Google Cloud billing account
Outputs
- Project $PROJECT_ID with billing enabled
- Budget alert at 50/90/100%
infra/env.sh in the repo
Steps
- Sign in and create the project. Replace
<initials>.gcloud auth login
export PROJECT_ID=asapify-<initials>-2026
gcloud projects create $PROJECT_ID --name="ASAPify"
- Link billing. Copy
ACCOUNT_ID from the first command.gcloud billing accounts list
gcloud billing projects link $PROJECT_ID --billing-account=<ACCOUNT_ID>
- Set a budget alert (50 USD is a 💡 figure, adjust it).
gcloud billing budgets create --billing-account=<ACCOUNT_ID> \
--display-name=asapify-budget --budget-amount=50USD \
--threshold-rule=percent=0.5 --threshold-rule=percent=0.9 --threshold-rule=percent=1.0
- Create
infra/env.sh exactly like the block in "Variables" on this page, then load it.source infra/env.sh
- Enable the APIs.
gcloud services enable run.googleapis.com cloudscheduler.googleapis.com \
artifactregistry.googleapis.com cloudbuild.googleapis.com firestore.googleapis.com \
storage.googleapis.com secretmanager.googleapis.com aiplatform.googleapis.com \
earthengine.googleapis.com iamcredentials.googleapis.com firebase.googleapis.com
- Give team members access (repeat per email).
gcloud projects add-iam-policy-binding $PROJECT_ID \
--member=user:<EMAIL> --role=roles/editor
Done check
Billing enabled:
gcloud billing projects describe $PROJECT_ID --format='value(billingEnabled)' # must be: True
The seven main APIs are enabled:
gcloud services list --enabled --format='value(config.name)' | \
grep -cE 'run|cloudscheduler|firestore|secretmanager|aiplatform|earthengine|storage.googleapis' # must be: ≥ 7
S0-3Role C
Earth Engine registered, WorldCover tested
Earth Engine is used once only: the built-up fraction from WorldCover for the building mask.
Prerequisites
- S0-2 done
- Python 3.12 with earthengine-api (S0-6) or Cloud Shell
Outputs
- Project registered with Earth Engine
- Tier noted in the WORKLOG log
Steps
- Open
https://code.earthengine.google.com/register with a Google account that has access to the project. Choose unpaid / noncommercial use, pick project $PROJECT_ID, and answer the questionnaire: noncommercial research prototype for early detection of peat fires, built for a competition, not sold. - Authenticate on your workstation.
pip install earthengine-api
earthengine authenticate
- Test reading WorldCover over the backtest sub-area.
python - <<'EOF'
import ee, os
ee.Initialize(project=os.environ["PROJECT_ID"])
roi = ee.Geometry.Rectangle([113.5, -2.6, 114.3, -1.9])
wc = ee.ImageCollection("ESA/WorldCover/v200").first()
frac = wc.eq(50).reduceRegion(ee.Reducer.mean(), roi, 100).getInfo()
print("sub-area built-up fraction:", frac)
EOF - If registration is refused: note it in the WORKLOG log; download WorldCover tiles from
esa-worldcover.org for the Sumatra + Kalimantan bbox instead and tell A.
Done check
The script prints {'Map': 0.0…} (a small number, no error).
S0-4Role B
FIRMS MAP_KEY and a small-area query test
Access to VIIRS detections for the agent (on demand) and for backtest validation.
Prerequisites
- S0-2 done (for Secret Manager)
Steps
- Open
https://firms.modaps.eosdis.nasa.gov/api/map_key/, enter the team email, copy the MAP_KEY from the email. - Test the query the agent will use: a ±0.1° box around one coordinate, 2 days, three satellites.
export MAP_KEY=<key>
for S in VIIRS_SNPP_NRT VIIRS_NOAA20_NRT VIIRS_NOAA21_NRT; do
curl -s "https://firms.modaps.eosdis.nasa.gov/api/area/csv/$MAP_KEY/$S/113.82,-2.31,114.02,-2.11/2" | head -2
done
- Store it in Secret Manager.
printf "%s" "$MAP_KEY" | gcloud secrets create firms-map-key --data-file=-
Done check
Each satellite prints a header that starts with latitude,longitude,bright_ti4 and includes the confidence and daynight columns (zero data rows is fine).
The secret is readable:
gcloud secrets versions access latest --secret firms-map-key | wc -c # > 0
S0-5Role D
Telegram bot, operator group, chat_id
The bot is ready: an operator group for verification summaries, DMs for subscribers.
Prerequisites
- A Telegram account
- S0-2 done (Secret Manager)
Outputs
- Secret telegram-bot-token
TG_OPERATOR_CHAT_ID and TG_BOT_USERNAME in infra/env.sh
Steps
- In Telegram open
@BotFather → send /newbot → name ASAPify Bot → a username ending in bot, e.g. asapify_demo_bot. Copy the token. - Store the token.
export TOKEN=<token>
printf "%s" "$TOKEN" | gcloud secrets create telegram-bot-token --data-file=-
- Create the group
ASAPify Operator and add the bot. Public alerts do not use groups: subscribers link their own Telegram from the Notifications page (D4). - In that group send
/start@asapify_demo_bot. A bot in privacy mode only receives commands that mention it, so ordinary messages do not appear in getUpdates. - Get the group's
chat_id (a negative value; supergroups start with -100).curl -s "https://api.telegram.org/bot$TOKEN/getUpdates" | jq '.result[].message.chat | {id, title}' - Test a send to the group.
curl -s "https://api.telegram.org/bot$TOKEN/sendMessage" -d chat_id=<CHAT_ID> -d text="Uji ASAPify"
- Record them in
infra/env.sh (not secret).export TG_OPERATOR_CHAT_ID=-100...
export TG_BOT_USERNAME=asapify_demo_bot
Done check
The message Uji ASAPify appears in the operator group. If the group is upgraded to a supergroup, its chat_id changes: repeat step 5.
S0-6Role A
Repo, Python environment, check the 2023 backtest window
Everyone uses the same structure and dependencies; the backtest window is proven to contain events.
Outputs
- Repo with the folder structure
requirements.lock data/local/firms_backtest_2023_sp.csv
Steps
- Create a private GitHub repo
asapify, clone it, and create the folders.git clone <repo-url> asapify && cd asapify
mkdir -p jobs/lib jobs/tests agent api/routers shared infra data/ref data/local notebooks docs scripts
# web: team repo ktp-asapify-fe; API + Notification Engine: team repo ktp-asapify-be
- Python 3.12 environment and dependencies.
python3.12 -m venv .venv && source .venv/bin/activate
pip install satpy pyresample s3fs xarray netCDF4 numpy pandas pyarrow geopandas rasterio \
shapely scipy matplotlib pillow httpx earthengine-api google-adk google-genai fastapi uvicorn \
google-cloud-firestore google-cloud-storage pytest
pip freeze > requirements.lock
- Copy
jobs/lib/region.py from Backend & API section 05b. - Check that the 1 Sep – 15 Oct 2023 backtest window has VIIRS detections in the Central Kalimantan sub-area. The SP archive is fetched in 5-day chunks (API limit). This is for validation only, not the operational path.
python - <<'EOF'
import io, os, httpx, pandas as pd, datetime as dt
K, B = os.environ["MAP_KEY"], os.environ["BACKTEST_BBOX"]
url = "https://firms.modaps.eosdis.nasa.gov/api/area/csv/{}/{}/{}/5/{}"
d0, parts = dt.date(2023, 9, 1), []
while d0 <= dt.date(2023, 10, 15):
for src in ("VIIRS_SNPP_SP", "VIIRS_NOAA20_SP"):
parts.append(pd.read_csv(io.StringIO(httpx.get(url.format(K, src, B, d0), timeout=120).text)))
d0 += dt.timedelta(days=5)
df = pd.concat(parts).drop_duplicates()
print("acq_date range:", df.acq_date.min(), df.acq_date.max())
print("total detections:", len(df), "night:", (df.daynight == "N").sum())
df.to_csv("data/local/firms_backtest_2023_sp.csv", index=False)
EOF
Done check
acq_date range covers 2023-09-01 to 2023-10-15. If it is shifted, the FIRMS date parameter is the start or end date ⚠️: shift the dates and repeat.
total detections ≥ 20. If fewer, widen BACKTEST_BBOX by 0.3° in each direction and note it in WORKLOG open item 11.
S0-7Role A
One Himawari and one GK2A scan: read, latency
Confirm both buckets, the channels and data wait times before writing ingest.
Prerequisites
- S0-6 done (venv, region.py)
Outputs
data/local/raw/himawari/ (4 files), data/local/raw/gk2a/ (2 files)data/local/latency.csv (6 rows)
Steps
- Download Himawari-9 B07 + B14 segments S05 and S06 for 25 Sep 2023 15:00 UTC and note their sizes.
python - <<'EOF'
import s3fs
fs = s3fs.S3FileSystem(anon=True)
p = "noaa-himawari9/AHI-L1b-FLDK/2023/09/25/1500"
files = [f for f in fs.ls(p) if any(b in f for b in ("_B07_", "_B14_")) and ("S0510" in f or "S0610" in f)]
for f in files:
print(f.split("/")[-1], round(fs.size(f)/1e6, 1), "MB"); fs.get(f, "data/local/raw/himawari/")
EOF - Download GK2A SW038 + IR105 for the same time.
python - <<'EOF'
import s3fs
fs = s3fs.S3FileSystem(anon=True)
p = "noaa-gk2a-pds/AMI/L1B/FD/202309/25/15"
for ch in ("sw038", "ir105"):
f = f"{p}/gk2a_ami_le1b_{ch}_fd020ge_202309251500.nc"
print(ch, round(fs.size(f)/1e6, 1), "MB"); fs.get(f, "data/local/raw/gk2a/")
EOF - Read both onto the combined grid and compare (one area in Sumatra, one in Kalimantan).
python - <<'EOF'
import glob, numpy as np
from satpy import Scene
from jobs.lib.region import AREA
def grid(reader, files, ch):
s = Scene(reader=reader, filenames=files); s.load([ch], calibration="brightness_temperature")
return s.resample(AREA, resampler="nearest", radius_of_influence=5000)[ch].values
h = grid("ahi_hsd", sorted(glob.glob("data/local/raw/himawari/*B07*")), "B07")
g = grid("ami_l1b", glob.glob("data/local/raw/gk2a/*sw038*"), "SW038")
for n, a in (("Himawari B07", h), ("GK2A SW038", g)):
print(n, "NaN:", round(float(np.isnan(a).mean()), 4), "min/max K:", np.nanmin(a), np.nanmax(a))
m = ~np.isnan(h) & ~np.isnan(g)
print("correlation:", round(float(np.corrcoef(h[m], g[m])[0, 1]), 3))
EOF - Measure the latency of both buckets 3 times (afternoon, night and early morning WIB): the gap between the latest scan time and
LastModified. Append to data/local/latency.csv.python - <<'EOF'
import s3fs, datetime as dt
fs = s3fs.S3FileSystem(anon=True); now = dt.datetime.utcnow()
h = sorted(fs.ls(f"noaa-himawari9/AHI-L1b-FLDK/{now:%Y/%m/%d}"))[-1]
hf = [x for x in fs.ls(h) if "_B07_" in x and "S0510" in x][0]
hs = dt.datetime.strptime(h[-15:], "%Y/%m/%d/%H%M")
g = sorted(fs.ls(f"noaa-gk2a-pds/AMI/L1B/FD/{now:%Y%m/%d}"))[-1]
gf = sorted(x for x in fs.ls(g) if "sw038" in x)[-1]
gs = dt.datetime.strptime(gf[-15:-3], "%Y%m%d%H%M")
for n, s, f in (("himawari", hs, hf), ("gk2a", gs, gf)):
lm = fs.info(f)["LastModified"].replace(tzinfo=None)
print(f"{n},{s:%Y-%m-%dT%H:%MZ},{(lm - s).total_seconds()/60:.1f}")
EOF
Done check
Both satellites: NaN < 0.01, min/max 200–340 K, correlation ≥ 0.8. If Himawari NaN ≥ 0.01: add segments S04/S07 in himawari.py.
If satpy cannot read .bz2: run bunzip2 -k first and note it in the WORKLOG ⚠️.
The median latency per satellite is written in WORKLOG open item 8.
S0-8Role A
KHG and province boundaries for Sumatra + Kalimantan
The peat mask inputs and the 15-province filter are stored locally with their sources.
Outputs
data/ref/khg_sumkal.geojson data/ref/idn_adm1_meta.json (licence)data/ref/provinces.geojson (15 rows, code column)
Steps
- Pull KHG for the whole bbox (the
fetch_khg function from Backend 05b) and save it.python - <<'EOF'
from jobs.build_peat_mask import fetch_khg
from jobs.lib.region import MONITOR_BBOX
g = fetch_khg(MONITOR_BBOX)
print("features:", len(g), "area km2:", round(g.to_crs(6933).area.sum()/1e6))
g.to_file("data/ref/khg_sumkal.geojson", driver="GeoJSON")
EOF - Download geoBoundaries province boundaries and record the licence.
curl -s https://www.geoboundaries.org/api/current/gbOpen/IDN/ADM1/ > data/ref/idn_adm1_meta.json
jq -r '.boundaryLicense, .gjDownloadURL' data/ref/idn_adm1_meta.json
curl -L -o data/ref/idn_adm1.geojson "$(jq -r .gjDownloadURL data/ref/idn_adm1_meta.json)"
- Select the 15 provinces and add BPS codes (names may be in Indonesian or English).
python - <<'EOF'
import geopandas as gpd
g = gpd.read_file("data/ref/idn_adm1.geojson")
print(sorted(g.shapeName.unique()))
CODE = {"Aceh":"11","North Sumatra":"12","West Sumatra":"13","Riau":"14","Jambi":"15",
"South Sumatra":"16","Bengkulu":"17","Lampung":"18","Bangka-Belitung Islands":"19",
"Riau Islands":"21","West Kalimantan":"61","Central Kalimantan":"62",
"South Kalimantan":"63","East Kalimantan":"64","North Kalimantan":"65"}
k = g[g.shapeName.isin(CODE)].assign(code=lambda d: d.shapeName.map(CODE))
k[["shapeName","code","geometry"]].to_file("data/ref/provinces.geojson", driver="GeoJSON")
print(k[["shapeName","code"]])
EOF
Done check
KHG: feature count > 0 and the area is printed (note the figure in the log).
Provinces: the printed table has exactly 15 rows with codes 11–19, 21, 61–65. If North Kalimantan or the Riau Islands is missing (older data merges them into East Kalimantan/Riau): note it, use the rows that exist, and mark ⚠️.
The geoBoundaries licence is recorded in WORKLOG open item 12.
S0-9Role B
Test NASA POWER hourly and GIBS true colour
Confirm the environment baseline and VIIRS imagery can be fetched from Cloud Run without a key.
Outputs
- POWER latency and cell coordinates noted in the WORKLOG log
docs/gibs_VIIRS_*.jpg (3 files)
Steps
- Fetch hourly TS and T2M (UTC) for one point in Central Kalimantan over the last 10 days, then find the last valid hour.
python - <<'EOF'
import httpx, datetime as dt
end = dt.date.today(); start = end - dt.timedelta(days=10)
r = httpx.get("https://power.larc.nasa.gov/api/temporal/hourly/point", timeout=120, params=dict(
parameters="TS,T2M", community="RE", longitude=113.9, latitude=-2.2,
start=f"{start:%Y%m%d}", end=f"{end:%Y%m%d}", format="JSON", **{"time-standard": "UTC"}))
d = r.json(); p = d["properties"]["parameter"]
valid = [k for k, v in p["TS"].items() if v != -999]
print("sources:", d["header"]["sources"], "last valid hour:", valid[-1], "TS:", p["TS"][valid[-1]], "T2M:", p["T2M"][valid[-1]])
print("cell coordinates:", d["geometry"]["coordinates"])
EOF - Fetch VIIRS true-colour imagery from GIBS for the backtest sub-area, three satellites, 25 Sep 2023.
for L in VIIRS_SNPP VIIRS_NOAA20 VIIRS_NOAA21; do
curl -s -o docs/gibs_${L}.jpg -w "$L %{http_code} %{size_download}\n" \
"https://gibs.earthdata.nasa.gov/wms/epsg4326/best/wms.cgi?SERVICE=WMS&REQUEST=GetMap&VERSION=1.3.0&LAYERS=${L}_CorrectedReflectance_TrueColor&CRS=EPSG:4326&BBOX=-2.6,113.5,-1.9,114.3&WIDTH=512&HEIGHT=448&FORMAT=image/jpeg&TIME=2023-09-25"
done
Done check
POWER: sources contains GEOSIT; the last valid hour is recorded (29 Sep 2026: ~1.5 days behind).
GIBS: three 200 lines and sizes > 10 KB; open the JPGs and confirm the Central Kalimantan area is visible (clouds are fine). Mind the WMS 1.3.0 EPSG:4326 BBOX order = lat_min,lon_min,lat_max,lon_max.