SnapBooks
SnapBooks is an AI-powered Telegram bot that converts photos of handwritten Indian bills ("kata parchi") into professional GST-compliant invoice PDFs in under 30 seconds.
Core trick
A Gemini 3 Flash tool-calling agent reads photographed Hindi-English handwritten bills, looks up contacts in Firestore, and renders a GST invoice PDF.
Description
SnapBooks is an AI-powered Telegram bot that converts photos of handwritten Indian bills ("kata parchi") into professional GST-compliant invoice PDFs in under 30 seconds. Indian SMBs — especially in mining, quarrying, and transport — handle 200+ handwritten bills daily, with accountants spending 4+ hours on manual data entry. SnapBooks eliminates this entirely. A worker simply photographs the handwritten slip and sends it to our Telegram bot. Our Gemini 3 Flash-powered AI agent reads Hindi + English mixed handwriting, extracts all fields (buyer, seller, items, weights, vehicle numbers), auto-looks up contacts from Firestore, fetches live market rates via Google Search when prices are missing, calculates GST (CGST/SGST/IGST with HSN codes), and generates a professional tax invoice PDF — all through an agentic tool-calling pipeline. No app download needed, works on any phone with Telegram.
README excerpt
# 📒 SnapBooks - AI-Powered Invoice Generator for Indian SMBs Transform handwritten bills and receipts into GST-compliant invoices using AI vision and Telegram. ## 🚀 Quick Start ### 1. Clone & Setup ```bash git clone https://github.com/IamSmokeY/SnapBooks.git cd SnapBooks ``` ### 2. Configure Environment ```bash # Copy example environment file cp .env.example .env # Edit .env and add your credentials: # - TELEGRAM_BOT_TOKEN (from @BotFather) # - GEMINI_API_KEY (from Google AI Studio) # - FIREBASE_SERVICE_ACCOUNT path nano .env ``` ### 3. Setup Firebase 1. Create project at https://console.firebase.google.com 2. Go to Project Settings > Service Accounts 3. Click "Generate New Private Key" 4. Save as `firebase-service-account.json` in project root 5. Update `.env` with the path ### 4. Start Python Backend ```bash ./start-python-backend.sh ``` Backend runs on: http://localhost:8001 ### 5. Start Frontend (Optional) ```bash cd frontend npm install npm run dev ``` Dashboard at: http://localhost:3001/demo ## 📱 How It Works ### Telegram Bot Flow 1. **Send Photo** - User sends picture of handwritten bill/receipt 2. **AI Extraction** - Gemini Vision OCR extracts all details 3. **GST Calculation** - Auto-calculates CGST/SGST/IGST based on state 4. **PDF Generation** - Creates professional GST-compliant invoice 5. **Firebase Storage** - Saves PDF and metadata to cloud 6. **Instant Delivery** - Bot sends PDF + summary back to user ### Features - ✅ **Multi-language OCR** - Hind