ExpenseBot is an open-source WhatsApp-based bookkeeping assistant that automatically processes and categorizes receipts using AI. It combines fine-tuned PaliGemma for receipt processing with Google Workspace integration for organized bookkeeping.
🔗 Demo: expensebot.xyz
-
Receipt Processing
- Send receipts via WhatsApp
- AI extracts key information (amount, date, items, merchant)
- Supports multiple currencies with automatic conversion
-
Automated Organization
- Creates dedicated Google Drive folders per phone number
- Maintains organized Google Sheets for expense tracking
- Automatically categorizes transactions
- Handles VAT recording for UK businesses
-
Easy Access
- View expenses through WhatsApp or web interface
- Access organized spreadsheets directly
- Track spending patterns and categories
- Frontend: Next.js 18+, TypeScript, Tailwind CSS
- Backend: Python, Flask, Twilio API
- AI/ML:
- Gemma 2B (VLLM inference server)
- PaliGemma Fine-tuned
- Infrastructure:
- Firebase (Auth, Firestore)
- Google Cloud (App Engine, Cloud Build)
- Google Drive API (Drive, Sheets)
- Whatsapp and Twilio API for bot interaction
expensebot/
├── src/
│ ├── components/ # Frontend React components
│ ├── lib/ # Shared utilities
│ └── server/ # Python backend (see server/README.md)
-
Frontend Setup
# Install dependencies bun install # Start development server bun run dev
-
Environment Variables Create
.env.local
by copying.env.example
and replacing the values with your own Firebase configuration. -
Backend Setup See Server README for:
- WhatsApp webhook setup
- AI model deployment
- Google Workspace integration
-
Required Tokens
- Firebase configuration (see Environment Variables section)
- Hugging Face Access Token for model access
- Google Cloud project credentials
The receipt processing model was fine-tuned on:
- Dataset: Sub-set of Receipt Dataset (500 examples)
- Labels: Generated using Google Gemini 1.5 Pro
- Format: Image → JSON extraction
-
Frontend: Firebase Hosting
bun run build vercel deploy
-
Backend: See Server Deployment
- App Engine for webhook
- Cloud Build for AI inference