Bops
A team of AI bots that runs your business ops: inbox, pipeline, invoices, reports. Each one has its own computer, email and phone number, and remembers everything.
翻訳待ち
No updates detected yet. GitHub releases will appear here.
Freshroots Replenishment Copilot: Raghav's replenishment rules on a twice-weekly schedule, with a Streamlit approval app (MESA Case 01)
翻訳待ち
Loading the full README.
Read the full README ↗Live app: https://freshroots-copilot.streamlit.app/ (Raghav and procurement)
Ops dashboard: https://freshroots-dashboard.vercel.app/ (read-only, live)
Twice a week, a scheduled job reads sales and stock from Supabase, checks the data, applies Raghav's 5 written rules to every SKU, and saves one recommendation per SKU. Raghav approves, overrides or rejects each one in a web app. Procurement downloads only the approved rows as a CSV and imports it into Zoho Inventory. The system never places an order.
The component map is at docs/component_map.png, and the data mapping and every assumption are in docs/data_mapping.md.
| # | Component | Where |
|---|---|---|
| C1 | Scheduled run (Mon & Thu 07:00 IST + manual + "Run now") | .github/workflows/run.yml, run.py, copilot/pipeline.py |
| C2 | 5 seed tables | supabase/migrations/001_init.sql, scripts/seed.py |
| C3 | Validation gate | copilot/validate.py |
| C4 | Fix gaps, sign off | App pages Data gaps and Sign-off |
| C5 | 5 rules in order | copilot/engine.py, config.json |
| C6 | Store results | runs, recommendations, decisions, data_gaps, backtest_results (copilot/db.py) |
| C7 | Two queues + reasons | App page Queues |
| C8 | Approve / override / reject | Buttons on Queues (copilot/service.py) |
| C9 | Download draft POs | App page Export |
| C10 | Backtest (kill gate) | copilot/backtest.py, app page Backtest |
| C11 | On-order stock read from Zoho open POs | copilot/zoho_sync.py (sync_on_order), plugged into run_pipeline() |
| C12 | Approved rows become draft POs in Zoho | copilot/zoho_push.py (push_drafts), app page Zoho |
You need free accounts on GitHub, Supabase and Streamlit Community Cloud. You also need Python 3.11 on your computer for one step (step 2).
freshroots-copilot, pick the Mumbai region (ap-south-1), and save the database password somewhere safe.supabase/migrations/001_init.sql from this repo, copy all of it, paste it in, and click Run. You should see "Success. No rows returned". The script is safe to run again..env, then load the dataIn Supabase, go to Project Settings → API (or API Keys). Copy:
Never share this key or put it in a browser. It bypasses all security.
In the project folder, copy .env.example to .env and paste the two values in.
Open a terminal in the project folder and run:
python3.11 -m venv .venv && source .venv/bin/activate
pip install -r requirements.txt
python scripts/seed.py
You should see skus 15, weekly_sales 240 and so on. Re-running it is safe: rows are upserted, and sign-offs are kept.
Optional check: python run.py --run-date 2026-10-22 should print run 1: ok, 15 recommendations.
freshroots-copilot on GitHub, then push this folder to it. .env is git-ignored and will not be uploaded.SUPABASE_URLSUPABASE_SERVICE_ROLE_KEYfreshroots-copilot repo, branch main, and main file app.py.SUPABASE_URL = "https://YOUR-PROJECT.supabase.co"
SUPABASE_SERVICE_ROLE_KEY = "your-service-role-key"
Set Python version to 3.11, then click Deploy.config.json (via a pull request). The changed assumption's sign-off is then cleared automatically, and he signs again.This is the beginning of the README. Read the rest at the original. Read the full README ↗