How PADI Works

7 AI modules working together as a unified food logistics intelligence system — from demand prediction to payment settlement

System Architecture

Built on production-grade open-source stack

Next.js 16 Frontend

SSR + Turbopack, Tailwind CSS, Recharts

PostgreSQL + Prisma

20 models, full relational schema

Python FastAPI ML

Prophet, XGBoost, scikit-learn sidecar

Gemini 2.0 Flash

Menu generation, insight analysis

BPS + BMKG APIs

Live price & weather data sync

QRIS + BI-FAST

Payment settlement & audit trail

Module 1 of 7

PADI-SENSE

Demand Forecasting & Price Prediction

Open Module

Problem

School coordinators currently estimate food needs by guesswork, leading to 20-30% over/under-ordering across 514 kabupaten.

PADI Solution

Prophet + TFT hybrid model combines BPS price data, BMKG weather, school enrollment (DAPODIK), and historical consumption to forecast demand per kabupaten with 92% accuracy.

Data Flow Pipeline

1Ingest

BPS API (prices), BMKG API (weather), DAPODIK (enrollment) → daily sync

2Model

Prophet for trend/seasonality + Temporal Fusion Transformer for multi-variate

3Predict

7/14/30-day demand forecast per kabupaten per commodity with confidence intervals

4Alert

Gemini 2.0 Flash generates natural-language insights when anomalies detected

KEY TECHNOLOGIES

ProphetTFT (PyTorch)BPS APIBMKG APIGemini 2.0 FlashFastAPI

92%

Forecast accuracy (MAPE < 8%)

Module 3 of 7

PADI-MATCH

Smart Supplier Matching

Open Module

Problem

Procurement is manual, opaque, and biased toward incumbent distributors. Local UMKM farmers are excluded from the MBG supply chain.

PADI Solution

Multi-factor supplier scoring algorithm (quality, price, distance, reliability, capacity) with geographic optimization — prioritizes local UMKM and farmer cooperatives within 50km radius.

Data Flow Pipeline

1Requirements

PADI-MENU generates ingredient list → quantities calculated from enrollment × recipe

2Discovery

Search supplier registry within configurable radius, filter by product, capacity, certifications

3Score

Weighted scoring: quality (30%), price (25%), distance (20%), reliability (15%), capacity (10%)

4Match

Top-N suppliers selected per ingredient, auto-generate purchase orders with QRIS payment links

KEY TECHNOLOGIES

XGBoost (scoring model)Haversine distancePrisma ORMQRIS Integration

78%

Orders fulfilled by local UMKM/farmers

Module 4 of 7

PADI-ROUTE

Multi-Modal Route Optimization

Open Module

Problem

Indonesia spans 17,000+ islands. Manual logistics planning results in 30-40% cost overruns and frequent cold-chain breaks, especially for eastern Indonesia routes.

PADI Solution

Constrained optimization across truck, ship, and air modes with cold-chain requirements, port schedules, and real-time weather from BMKG. Minimizes cost × time × spoilage risk.

Data Flow Pipeline

1Graph

Build logistics graph: 514 kabupaten as nodes, road/sea/air as weighted edges

2Constraints

Cold-chain requirements, port schedules, ferry capacity, perishability windows

3Optimize

Modified Dijkstra with multi-objective: cost (weight 0.4), time (0.3), spoilage risk (0.3)

4Monitor

GPS + temperature IoT sensors → real-time re-routing if cold-chain breach detected

KEY TECHNOLOGIES

OR-Tools (Google)BMKG Weather APIGraph DBIoT SensorsWebSocket

-32%

Avg cost reduction vs manual routing

Module 5 of 7

PADI-WASTE

Waste Prediction & Redistribution

Open Module

Problem

Indonesia wastes 23-48 million tons of food annually. School-level waste data is untracked — surplus food goes to landfill instead of nearby panti asuhan or food banks.

PADI Solution

ML model predicts waste risk per school based on menu, weather, day-of-week, and historical patterns. Surplus auto-matched to nearest redistribution points (panti asuhan, food banks, PMI).

Data Flow Pipeline

1Track

Daily meal reports: prepared vs consumed, per school, per menu item

2Predict

Random Forest classifies waste risk: LOW (<10%), MEDIUM (10-20%), HIGH (>20%)

3Prevent

Portion adjustment suggestions sent to kitchen staff via WhatsApp/dashboard

4Redistribute

Surplus matched to nearest recipient, tracked donation for tax/compliance

KEY TECHNOLOGIES

Random Forestscikit-learnWhatsApp Business APIGPS Matching

34%

Waste redistributed instead of discarded

Module 6 of 7

PADI-BAYAR

QRIS Payment & Supply Chain Finance

Open Module

Problem

Government food procurement payments take 30-90 days via traditional banking, forcing UMKM suppliers to take loans. Payment trail is opaque, enabling corruption.

PADI Solution

QRIS-based direct payment to farmer/UMKM wallets with BI-auditable trail. UMKM credit scoring unlocks micro-financing. Digital Rupiah concept for programmable budget enforcement.

Data Flow Pipeline

1Order

Purchase order generated by PADI-MATCH → QRIS payment link created

2Pay

Coordinator scans QRIS → funds settle to supplier in <5 seconds via BI-FAST

3Score

Transaction history builds UMKM credit score (300-850) across 5 factors

4Finance

Credit score enables micro-loans from partnering banks for capacity expansion

KEY TECHNOLOGIES

QRIS APIBI-FAST SettlementCredit Scoring (XGBoost)Digital Rupiah SDK

<5s

Payment settlement time (vs 30-90 days)

Module 7 of 7

PADI-PANTAU

National Monitoring Dashboard

Open Module

Problem

No unified view of MBG program performance across 514 kabupaten. Decision-makers rely on monthly Excel reports — too slow for early intervention.

PADI Solution

Real-time national dashboard with choropleth map, KPI cards, alert system, and drill-down to kabupaten/school level. Powered by aggregated data from all 6 other modules.

Data Flow Pipeline

1Aggregate

All module outputs feed into unified metrics store (meals, waste, spend, alerts)

2Visualize

514-kabupaten choropleth map, time-series charts, KPI sparklines

3Alert

Rules engine: price spikes >20%, waste >15%, cold-chain >4°C, stock <3-day threshold

4Report

Auto-generated weekly PDF reports for BGN, KEMENKO PMK, and Bank Indonesia

KEY TECHNOLOGIES

RechartsGeoJSON (514 kabupaten)WebSocket (real-time)PDF Generation

Real-time

Data freshness (vs monthly Excel)

Ready to explore?

See all 7 modules in action with real dummy data — or walk through the end-to-end demo scenario