pgx
PGX — Lightweight Postgres for AI agents. Written in Rust. Thousands of isolated databases in one runtime. 🐘
Translation pending
Monitor, analyze and predict how rainfall affects ShopFlow India's delivery network: live operations, impact map, future order risk and history.
Translation pending
DataPython · JavaScriptGitHub @fbivinayOnlineOwner unconfirmed
Have you tried it? One tap is enough. No sign-in needed.
No updates detected yet. GitHub releases will appear here.
Owners of public repositories under a personal GitHub account can sign in to verify ownership and manage the introduction themselves. No administrator approval is needed.
Sign in, generate a verification file, and commit it to this repository’s default branch within 30 minutes. Files on other branches or forks do not count. Then check the file below to manage the project without administrator approval. Keep the file to retain your access.
If needed, you will go to sign-in. After signing in, return here and press your chosen verification button again.
Run /nomorevibe verify in your project folder to verify ownership and manage the introduction yourself.
Verify in one minuteAsk about other verification options
WeatherOps — Weather-aware e-commerce delivery intelligence platform for monitoring, predicting, and analyzing rainfall-driven delivery risks.
Taken from the repository README
Loading the full README. The saved excerpt is shown below.
Live: https://weather-ops-delivery-intelligence.vercel.app · desktop and laptop only (1366 px and wider)
WeatherOps is an internal tool for ShopFlow India, a fictional e-commerce company, used by
delivery operations managers and logistics analysts. It answers, within seconds:
Loop: Monitor → Analyze → Predict → Simulate. All customers, orders, routes and costs are
synthetic demo data. Rainfall is real: Open-Meteo archive (ERA5) daily rain 2015–2025 and hourly
rain 2022–2025 for 40 Indian cities (CC BY 4.0).Read the full README ↗Live: https://weather-ops-delivery-intelligence.vercel.app · desktop and laptop only (1366 px and wider)
WeatherOps is an internal tool for ShopFlow India, a fictional e-commerce company, used by delivery operations managers and logistics analysts. It answers, within seconds:
| Question | Where |
|---|---|
| What is happening right now? | 01 Overview — live KPIs, alerts, rain-hit regions, critical orders |
| Where is rainfall affecting deliveries? | 02 Map — India heat map (Delivery impact / Historical rainfall), drill-down India → state → city → warehouse/hub → route → orders |
| Which upcoming orders are at risk, and why? | 03 Future — 6/12/24/48 h risk table, 48 h timeline, per-order explanation |
| What could reduce the impact? | 03 Future — scenario simulation (dispatch shift, reroute, micro-hub, rain severity) |
| What happened historically? | 04 History — monthly, yearly, seasonal, geographic, product and rain-severity analysis |
Loop: Monitor → Analyze → Predict → Simulate. All customers, orders, routes and costs are synthetic demo data. Rainfall is real: Open-Meteo archive (ERA5) daily rain 2015–2025 and hourly rain 2022–2025 for 40 Indian cities (CC BY 4.0).
seed job (once) ShopFlow master data · 2015-2025 rainfall + climatology · synthetic history
2021 → Jul 2025 (0.8 M route-day rows, 26 M orders) · SLA-breach model ─▶ PostgreSQL
simulator ──▶ Kafka shopflow-events orders, assignments, dispatches, vehicle movement,
(~50-100 events/s) hub arrivals, delays, deliveries, hourly weather;
replays real Jul-Aug 2025 rain at 60x; injects
duplicates and invalid events
Spark Structured Streaming ─┬─ invalid ─▶ shopflow-quarantine
├─ valid, deduplicated ─▶ shopflow-clean + Postgres delivery_events
├─ 30 s windows per city ─▶ shopflow-metrics + Postgres stream_metrics
└─ raw ─▶ S3 (data lake) progress listener ─▶ Redis (health)
engine live operations state · weather → delay impact · future-order risk · alerts
─▶ Redis (views + pub/sub) and Postgres (orders, predictions, weather risk, live history)
FastAPI REST + WebSocket ─▶ Next.js dashboard (Vercel); committed demo snapshot when offline
One on-demand k3s node on AWS (Terraform), Traefik + Let's Encrypt (35-170-210-110.sslip.io).
weatherops/)delay.py): weather ETA = normal ETA × (1 + (m − 1) × route sensitivity),
m = 1.00 / 1.12 / 1.30 / 1.56 for dry / rain / heavy / extreme (IMD-based classes). BLR → MYS:
5.8 h normal, 6.5 h rain, 7.6 h heavy, 9.1 h extreme. Weather-induced delay = weather ETA − normal ETA.risk.py): 0–100 = rainfall severity (≤30) + historical route impact (≤20)
scenario.py): the same models re-applied to upcoming order cohorts with levers;
results are labelled simulated impact / estimated outcome and saved to simulation_runs.db/schema.sql)cities, warehouses, hubs, routes, categories, products, customers, vehicles · weather_history,
weather_climatology, weather_risk · orders, order_items, delivery_events, stream_metrics,
delivery_predictions · history_daily (+ history_monthly materialized view), route_weather_impact,
weather_impact view · model_coefficients · simulation_runs, scenario_results.
WEATHEROPS_HOST=35-170-210-110.sslip.io TF_AUTO_APPROVE=1 ./deploy.sh # node, Kafka, Redis, Postgres, seed, apps
./deploy.sh --status
./deploy.sh --restart-replay # start the simulated operations over
./deploy.sh --down # stop paying for the node (Elastic IP, S3, IAM stay)
Dashboard: cd dashboard && NEXT_PUBLIC_API_HOST=35-170-210-110.sslip.io npm run dev.
Refresh the offline snapshot: API=https://35-170-210-110.sslip.io npm run capture-demo.
Rainfall baseline: python -m seed.fetch_rain (≈25 min, Open-Meteo rate limits).
pytest # models, seed, simulator, engine, API (83 tests; 5 SQL tests need TEST_PG_DSN)
TEST_PG_DSN="host=... dbname=weatherops ..." pytest serving/tests/test_queries_pg.py # SQL on live data
cd dashboard && npm test
# Spark plans (Python 3.8, in the Spark image):
MSYS_NO_PATHCONV=1 docker run --rm --user 0 -v "$PWD:/repo" -w /repo \
-e PYTHONPATH=/opt/spark/python:/opt/spark/python/lib/py4j-0.10.9.7-src.zip:/repo \
apache/spark:3.5.3-python3 bash -c "pip install -q pytest && python3 -m pytest -q spark_processor/tests"
Design: docs/specs/2026-10-02-shopflow-delivery-intelligence-design.md.