# DealPilot AI

- **Event:** [Meta Global AI Developer Hackathon](https://cerebralvalley.ai/e/meta-ai-developer-hackathon)
- **When:** Oct 26, 12:00 PM – Nov 4, 9:00 PM (EST)
- **Where:** Online
- **Team:** [Junior Mpolo](https://cerebralvalley.ai/u/Heureu)
- **GitHub:** https://github.com/Mpolo-hub/dealpilot-ai.git
- **Demo video:** https://youtu.be/u1ZTHfaAcgY
- **Gallery:** https://cerebralvalley.ai/e/meta-ai-developer-hackathon/hackathon/gallery
- **Page:** https://cerebralvalley.ai/e/meta-ai-developer-hackathon/hackathon/gallery/2099

DealPilot AI – Sales intelligence for African SMEs

 The problem
In many African countries, companies and SMEs sell every day: retailers, wholesalers, distributors. Their sales live in spreadsheets, cash-register exports and notebooks. They don't know what sold, where, or what next month will bring, so decisions are made by feel.

 The solution
DealPilot AI turns raw sales rows into clear answers: how the business is doing, which products matter, and what is coming next. The Stage 1 MVP is live online, protected by invitation:

- Dashboard: total sales, orders, units, average order, daily trend, sales by region.
- Sales Analysis: trends, comparisons and breakdowns, with date filters that update every figure.
- Products: units and revenue per product, best and weakest sellers.
- Data: source, period and status of the data, with a clear synthetic-data notice.
- Prediction: daily unit forecasts up to 28 days ahead, by total, category or product and region, with a forecast table and real backtest scores.

All figures come from a synthetic dataset (generator seed 42: 3 years, 5 regions, 50 products, 2,000 customers, 90,643 orders). No real customer data.

 Technology
Frontend: React, TypeScript, Vite, React Router, CSS Modules, hand-drawn SVG charts (no chart library). Responsive from 375 px mobile to desktop.

Backend: Python 3.13, FastAPI, Uvicorn. Analytics run on DuckDB over read-only Parquet files. A versioned REST API (`/v1`) with strict parameter validation and a shared error format.

Forecasting: Seasonal Naive v1.0 (same weekday of the last observed week, with a fallback for closed days), plus a Naive control model. Evaluated with a 13-fold rolling backtest of 28 days each (WAPE, MAE, Bias, MASE, RelMAE): about 9.3% WAPE at the total level. Tests prove there is no leakage of future data. This is the reference model every future model must beat.

Security: invitation-only access, server-side sessions (60 min idle, 8 h max) in a separate SQLite store, secure HttpOnly cookies, origin checks, rate limits with HMAC-hashed IP addresses (no raw IP is stored or logged), fail-closed behaviour, security headers (CSP, HSTS), API docs disabled online. The demo shuts down automatically on December 4, 2026.

Quality: 1,110 backend tests and 107 frontend tests passing, plus linting and type checks. Key figures cross-checked against independent DuckDB queries. An independent code review found no critical issue; the one high-severity issue was fixed and tested before going live.

Deployment: multi-stage Docker image (Node build, Python 3.13 slim runtime, non-root user), deployed on Render (free tier, Frankfurt) from a private GitHub repository with a Blueprint (`render.yaml`). HTTPS everywhere. Hosting cost: USD 0 per month.

 Built with Claude
DealPilot AI was built with Claude Code, Anthropic's coding agent, running in the VS Code terminal. The project follows spec-driven development: written specifications and Product Owner decisions come first, then the agent implements them.

- The agent wrote the backend, frontend, forecasting API, tests and deployment files, and ran every test suite before each commit.
- A separate Claude sub-agent performed an independent security review.
- The agent checked layouts in headless Chrome at four screen widths.
- Strict repository rules (no destructive Git commands, no push without approval) kept the human in control as Product Owner.

 What comes next
Import of the customer's own Excel and CSV files, a data quality center, business insights in plain words, AI explanations of results (explain, never decide), and Portuguese and French interfaces. Pilot in Angola, then the DRC.

Online Softaware link : https://dealpilot-ai-demo.onrender.com/access#CODE

 Judge access

Each judge has a personal link. Open it, or go to the site and paste it on the login page. The first load can take up to one minute while the free server wakes up.

- Judge 1: https://dealpilot-ai-demo.onrender.com/accessJRfGGbA0_H25nM8hbmrHj8Y6XZzwzxIVkZtK1qKJoKw
- Judge 2: https://dealpilot-ai-demo.onrender.com/accessSTPdeD_bZsDnQaAW39QBDORoR5ArjMgq6jI7tOWDFys
- Judge 3: https://dealpilot-ai-demo.onrender.com/accessGqhVSF7T3SvOGwN9ieFp9TBAVJpy7QPHhpbpRZR4Iq0
- Judge 4: https://dealpilot-ai-demo.onrender.com/accessehUjbZ65j-PHS8GldkaVl-74fPgQhaMvla_0nYXxsaQ
- Judge 5: https://dealpilot-ai-demo.onrender.com/accessI8k0za-ZHNmIslN_nKfpCxl_6_XN_9Ove5Y1zUvna9U

## More from Meta Global AI Developer Hackathon

- [Oren AI](https://cerebralvalley.ai/e/meta-ai-developer-hackathon/hackathon/gallery/2096)
- [Ashish Sharma](https://cerebralvalley.ai/e/meta-ai-developer-hackathon/hackathon/gallery/2097)
- [Amreen Hassan](https://cerebralvalley.ai/e/meta-ai-developer-hackathon/hackathon/gallery/2098)
- [The_Plant_Scout](https://cerebralvalley.ai/e/meta-ai-developer-hackathon/hackathon/gallery/2100)
- [CausalFly](https://cerebralvalley.ai/e/meta-ai-developer-hackathon/hackathon/gallery/2101)
- [Synapse Three](https://cerebralvalley.ai/e/meta-ai-developer-hackathon/hackathon/gallery/2102)

---

Markdown version of https://cerebralvalley.ai/e/meta-ai-developer-hackathon/hackathon/gallery/2099. Site index for agents: https://cerebralvalley.ai/llms.txt · full text: https://cerebralvalley.ai/llms-full.txt
