Backend + Frontend for the Joy Juice delivery assistant.
Built with Claude Sonnet 3.5 (Oct-Dec 2024) as an early experiment in AI-assisted development.
An internal tool for Joy Juice (cold-pressed juice company, Tunisia) that:
- Manages orders & deliveries via Google Sheets as database
- Chat assistant powered by Claude API — staff can ask questions about clients, orders, stock in natural language
- Telegram bot integration for delivery notifications
- Client portal (Next.js frontend) for tracking deliveries
JoyJuice/
├── server.js # Express API server
├── routes/ # REST endpoints
│ ├── chat.js # Claude-powered assistant
│ ├── clients.js # Client management
│ ├── commandes.js # Orders
│ ├── livraisons.js # Deliveries
│ └── produits.js # Products
├── Services/
│ ├── claude/ # Claude AI integration
│ │ ├── core/ # Cache manager, context handling
│ │ ├── handlers/ # Chat request handlers
│ │ └── alertManager.js # Delivery alerts
│ ├── googleSheetsService.js # Google Sheets as DB
│ ├── odooAuth.js # Odoo ERP integration
│ └── odooSalesService.js # Odoo sales sync
└── frontend/ # Next.js client app
├── src/
│ ├── pages/ # App pages
│ ├── components/ # React components
│ │ └── client/ # Client delivery view
│ └── services/ # API client
└── package.json
| Layer | Tech |
|---|---|
| Backend | Node.js, Express |
| AI | Claude API (Anthropic SDK), OpenAI |
| Database | Google Sheets API, MongoDB |
| Frontend | Next.js, TypeScript, Tailwind CSS |
| ERP | Odoo (XML-RPC) |
| Notifications | Telegram Bot API |
- Node.js 18+
- Google Sheets API credentials
- Anthropic API key
- Telegram Bot Token (for notifications)
cp .env.example .env
# Fill in: ANTHROPIC_API_KEY, GOOGLE_SHEETS_ID, TELEGRAM_BOT_TOKEN, etc.
npm install
npm startServer runs on http://localhost:3000
cd frontend
npm install
npm run devClient app runs on http://localhost:3001
To receive delivery notifications, create a Telegram bot:
- Message @BotFather on Telegram
/newbot→ choose a name → get the token- Add
TELEGRAM_BOT_TOKEN=your_tokento.env - Add
TELEGRAM_CHAT_ID=your_chat_idto.env
To get your chat ID, message your bot then visit:
https://api.telegram.org/bot<YOUR_TOKEN>/getUpdates
This was the first Joy Juice project — a delivery management tool for the Tunisia operation. The company has since moved to Odoo 19 for the France launch (Alpes-Maritimes). This repo is kept as a reference.
MIT