FitOrder is an AI agent that matches your remaining daily macros to real Swiggy meals — querying Swiggy Food MCP and Instamart MCP live, ranking options by macro fit, and adding to cart in one command.
- Frontend: React + Vite
- Agent: Claude API (claude-sonnet-4) with MCP servers
- MCP: Swiggy Food + Instamart + Dineout
- Hosting: Netlify (frontend) + Netlify Functions (API proxy)
git clone https://github.com/YOUR_USERNAME/fitorder.git
cd fitorder
npm installcp .env.example .env
# Open .env and add your Anthropic API keygit init
git add .
git commit -m "FitOrder — Swiggy Builders Club"
git remote add origin https://github.com/YOUR_USERNAME/fitorder.git
git push -u origin main- Go to netlify.com → New site from Git
- Connect your GitHub repo
- Build settings auto-detected from
netlify.toml:- Build command:
npm run build - Publish directory:
dist
- Build command:
- Click Deploy
- Site Settings → Environment Variables
- Add:
ANTHROPIC_API_KEY= your key - Redeploy
Your site is live. Share the URL with builders@swiggy.in
npm install
npm run devThe Vite proxy routes /api/* → Netlify Functions locally.
For local function testing, install Netlify CLI:
npm install -g netlify-cli
netlify devfitorder/
├── netlify/
│ └── functions/
│ └── agent.js # Secure API proxy — API key never in browser
├── src/
│ ├── components/
│ │ ├── MacroSetup.jsx # Goal + macro configuration UI
│ │ └── Chat.jsx # Agent conversation UI
│ ├── hooks/
│ │ └── useAgent.js # Agent state + API calls
│ ├── App.jsx # View orchestration
│ └── main.jsx # Entry point
├── public/
│ └── index.html
├── netlify.toml # Netlify config + redirects
├── vite.config.js
└── package.json
| Command | What happens |
|---|---|
| "Find meals for my macros" | Calls search_restaurants + scores by macro fit |
| "Check Instamart too" | Calls search_products on Instamart MCP |
| "Add to cart" | Calls update_food_cart on your Swiggy account |
| "What did I order last time?" | Calls get_food_orders for history |
| "Veg options only" | Filters with vegFilter=1 on search_menu |
| "Stay under ₹250" | Budget-aware meal filtering |
Submitted by Sanchit · builders@swiggy.in