Skip to content

Anuraj-dev/Khata

Repository files navigation

📒 Khata

Money clarity for everyday India

Khata auto-logs your UPI spends from SMS, keeps your udhaar (lending) straight by person, splits trips with friends, flags recurring bills before they hit, and shows you where the money actually goes — all in an installable PWA.

Version PWA React Convex Tailwind CSS Vite Capacitor License: MIT


📱 Screenshots

Web — Expenses
Web — Expenses
PWA — Installed
PWA — Installed
Mobile — Home
Mobile — Home
Insights
Insights — trends & charts
Udhaar ledger
Udhaar — person ledger
Auto-logged UPI SMS
Auto-logged UPI SMS

✨ Features

  • Auto-log UPI from SMS — On Android (via Capacitor), Khata reads UPI transaction SMS and logs them automatically. It captures the underlying UPI handle so garbled or truncated merchant/person names get cleaned up — name a handle once and every future transaction from it is labelled correctly.
  • Udhaar ledger that tracks a person, not a string — A contact can have many handles (phone numbers, VPAs, name spellings); their balance rolls up across all of them. Record cash lending/repayment by hand, and merge duplicate people.
  • Trip splitter — Split group expenses and settle up, with a one-tap "everyone's settled" close that records remaining transfers as paid and silences reminders.
  • Recurring-bill radar — Detects monthly billers (rent, mess, Spotify, recharge) from your spend history and reminds you a few days before they're due.
  • Per-category budgets — Set spend caps and see safe-to-spend at a glance.
  • Insights — Month-over-month trends, projected month-end, top-merchant drill-down, and real donut/line charts.
  • Installable PWA — Works offline-friendly, installs to your home screen. Amounts are stored in paise (integers) to avoid floating-point errors.

🧱 Tech stack

Layer Tech
Frontend Vite 6 + React 19 PWA (vite-plugin-pwa)
Styling Tailwind CSS v4 (CSS custom-property theme tokens)
Backend Convex — queries, mutations, actions, crons
Auth better-auth + Convex adapter (Google Sign-In)
Native wrapper Capacitor (UPI SMS reading, push notifications)
Tests Vitest + convex-test

📂 Project layout

Khata/
├── apps/
│   ├── web/        # Vite + React PWA — primary target, active development
│   └── mobile/     # Expo / React Native app — abandoned, left in place
├── convex/         # Convex backend (schema, queries, mutations, actions, crons)
├── docs/           # PRDs and screenshots
└── plan.md         # Milestone source of truth

Pivot note: apps/mobile/ (Expo) is abandoned; all active work targets apps/web/. UPI SMS uses a thin Capacitor wrapper around the same web app.


🚀 Getting started

Prerequisites: Bun and a Convex account.

# 1. Install dependencies
bun install

# 2. Configure env — copy the example and fill in your values
cp apps/web/.env.example apps/web/.env.local
#   VITE_GOOGLE_CLIENT_ID   — your Google OAuth web client ID
#   VITE_APP_URL            — public origin for trip-invite links (optional in dev)

# 3. Start the Convex backend (in one terminal)
bunx convex dev

# 4. Start the web app (in another terminal)
bun run web:dev

Open the printed local URL. The app boots → Google Sign-In → connects to Convex. In Chrome you can Install app to run it as a PWA.

Browser-exposed env vars are prefixed VITE_. SMS reading is gated behind native platforms — on the web you log expenses manually.


☁️ Backend & deploy

Convex functions, schema, and crons live in convex/. Schema changes and scheduled jobs register automatically on deploy.

bunx convex dev      # local/dev deployment with live reload + codegen
bunx convex deploy   # push schema, functions, and crons to your deployment

Releases for the web PWA are automated via release-please (.github/workflows/release-please.yml); version source is apps/web/package.json.


🛠️ Scripts

Run from the repo root:

Script Description
bun run web:dev Start the web PWA dev server
bun run web:build Production build of the web PWA
bun run web:preview Preview the production build
bun run web:typecheck Type-check the web app (tsc --noEmit)
bun run test Run the test suite once (Vitest)
bun run test:watch Run tests in watch mode

🧪 Testing

bun run test        # 33 tests across the Convex backend (Vitest + convex-test)
bun run web:typecheck

Convex modules are tested with convex-test, which runs queries/mutations against an in-memory deployment.


📄 License

Released under the MIT License © 2026 Anuraj Jit Saikia.

About

UPI-aware personal finance PWA for India — auto-logs spending from SMS, per-person udhaar ledger, trip splits and budgets (React 19, Convex, Capacitor)

Topics

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Packages

 
 
 

Contributors