Inspiration

What it does

Weather-Driven Ops Copilot is an AI-powered dashboard for retail and cafe managers who want to stop guessing and start acting on data.

Upload your store's historical sales CSV. The app fetches real weather data from Open-Meteo, computes Pearson correlations (e.g., r = -0.495 for precipitation × sales at our Gangnam store), and visualizes the patterns across scatter charts, a day-of-week bar chart, and a 1-year stacked timeline.

Then GPT-5.6 takes over with two structured-output reports:

  1. Insight Report - 3–5 data-backed findings with r-values and an executable action for each (e.g., "Order 40% more iced ingredients when max temp ≥ 28°C")

  2. 7-Day Operational Briefing - daily sales forecasts using real forecast data, with inventory / staffing / promotion directives for each day, plus a ready-to-paste Slack card.

How we built it

Next.js 14 (App Router) + TypeScript + Tailwind for the frontend. Open-Meteo API (free, no key) for historical archive and 7-day forecast with file-based caching (24h archive / 1h forecast, OS-aware path for Vercel). Client-side Pearson correlation engine — the raw CSV never leaves the browser. GPT-5.6 via OpenAI SDK v6 with response_format: json_schema (strict: true) for both report endpoints, ensuring every field is present and typed. Deployed on Vercel with OPENAI_API_KEY as a server environment variable.

Challenges we ran into

  • react-leaflet v5 is incompatible with React 18 (silent "render is not a function" crash) — downgraded to v4.2.1.
  • Recharts Tooltip formatter prop has a union ValueType that makes TypeScript reject (v: number) => string — switched to the content render prop.
  • Keeping GPT-5.6 prompts lean: excluding the 375-row scatter array and sending only summary statistics + top-5 outliers cut token cost significantly while preserving analytical quality.

Accomplishments that we're proud of

  • Genuine Pearson correlations (r ≈ -0.45 to -0.50 rain×sales, r ≈ +0.82 to +0.85 temp×ice) detected from synthetic data that mirrors real meteorological patterns.
  • GPT-5.6 structured output with zero hallucinated fields across both endpoints.
  • Full pipeline from CSV upload to AI operational briefing in under 10 seconds.

What we learned

Structured output (json_schema + strict) is the right default for any business report use case — it makes downstream formatting trivial and eliminates the need for defensive JSON parsing. Minimal, statistics-only prompts outperform data-dump prompts for analytical tasks.

What's next for Weather-Driven Ops Copilot (WeDOC)

  • Connect to real POS systems (Square, Toast) via webhook
  • Push daily briefings to Slack / KakaoTalk automatically
  • Expand to multi-store comparison and anomaly alerts

Built With

Share this project:

Updates