KharchaKitab is a Hinglish-first, voice-powered expense tracker built for Indian urban users. Log expenses by simply speaking — "chai 20 rupees," "Netflix 499," "maid 5000" — and the app categorizes, timestamps, and stores the entry instantly. Designed for people who make 10–15 daily transactions and want each one logged in under 15 seconds.
- Voice Input (Primary): Speak in Hindi, English, or Hinglish; Sarvam AI transcribes and Gemini Flash parses to structured expense JSON in under 2.5 seconds.
- Receipt Scanning: Photograph or upload a receipt (PNG/JPG/WebP/HEIC); Gemini Vision extracts items and totals automatically.
- Manual & Bulk Entry: Type or paste multiple expenses at once; AI parses and suggests categories with a preview before saving.
- Analytics & Trends: Category breakdowns, daily line charts vs. previous month, top items, and daily averages — with month/today/custom date filters.
- Household Sync: Pair with a partner via QR code or 4-digit code; P2P WebRTC sync with AES-256 encryption — the server never sees your data.
- Recurring Expenses: 60+ pre-built templates for subscriptions, bills, and utilities; set reminder days before due date; one-tap logging.
- Budget Management: Personal and household monthly budgets with a ring chart and warnings at 80% and 100% usage.
- Apni Awaaz (AI Insights): Daily Hinglish nudges analyzing yesterday's spend — roasts, patterns, praise, streaks — generated by Gemini.
- Streak Gamification: Consecutive-day logging streak drives habit formation; daily reminder notifications.
- Offline-First PWA: All data lives in IndexedDB on your device; works without internet and installs on your home screen.
- Framework: Next.js 15 (React 19)
- Styling: Tailwind CSS v4
- Animation: Framer Motion
- Database: IndexedDB (client-side, offline-first), Upstash Redis (optional rate limiting)
- AI/LLM: Google Gemini Flash (parsing, OCR, insights), OpenRouter/Gemma-3 (fallback), Sarvam AI (voice)
- Sync: WebRTC P2P with ECDSA key exchange + AES-256-CBC encryption
- Analytics: PostHog (disabled by default)
- Node.js 18+ installed
- npm or pnpm
-
Clone the repository:
git clone https://github.com/ankitpandey2708/kharchakitab.git cd kharchakitab -
Install dependencies:
npm install # or pnpm install -
Set up Environment Variables: Create
.env.local(local) and set the same vars in your deployment platforms:Variable Vercel Render Notes GEMINI_API_KEY✅ — Required GEMINI_MODEL✅ — Default: gemini-3.1-flash-lite-preview,gemma-3-27b-itSARVAM_KEY✅ ✅ Both — Vercel for REST, Render for WebSocket STT proxy SARVAM_MODEL✅ — Default: saaras:v3SARVAM_TTS_MODEL✅ — Default: bulbul:v3OPENROUTER_API_KEY✅ — Optional — Gemini fallback OPENROUTER_MODEL✅ — Default: openrouter/freeNEXT_PUBLIC_SIGNALING_URL✅ — Set to your Render WebSocket URL in prod NEXT_PUBLIC_TURN_USERNAME✅ — Optional — WebRTC across networks NEXT_PUBLIC_TURN_CREDENTIAL✅ — Optional — WebRTC across networks NEXT_PUBLIC_POSTHOG_ENABLED✅ — Default: falseNEXT_PUBLIC_POSTHOG_KEY✅ — Optional NEXT_PUBLIC_POSTHOG_HOST✅ — Default: https://us.i.posthog.comUPSTASH_REDIS_REST_URL✅ — Optional — rate limiting UPSTASH_REDIS_REST_TOKEN✅ — Optional — rate limiting PORT— ✅ Default: 7071 -
Run the development server:
npm run dev
Open http://localhost:3000 with your browser to see the result.
This application is fully PWA-compliant. You can install it on your mobile device (iOS/Android) or desktop for a native app-like experience.