An AI-powered expense splitter app built with React, TypeScript, and Tailwind CSS.
Split bills with friends — equally, by item, or by percentage — in seconds.
- 3 Split Modes — Equal split, item-based assignment, or custom percentage
- AI Bill Parsing — Paste a bill as text or snap a photo and let Gemini AI extract items automatically
- Group Management — Save your regular squads and load them instantly for future splits
- Expense History — Track all past settlements, mark payments as done, and filter by group
- Smart Settlement Algorithm — Minimizes the number of transactions between people
- LocalStorage Persistence — Your groups and history survive browser refreshes
- Confetti on Settlement — Because splitting bills should feel good 🎉
- Responsive UI — Works beautifully on mobile and desktop
Live App: splitsmart-expense.vercel.app
| Technology | Purpose |
|---|---|
| React 19 + TypeScript | UI and state management |
| Tailwind CSS v4 | Styling |
| Vite 6 | Build tool |
| Framer Motion | Animations |
| Gemini AI (Google) | AI bill parsing |
| canvas-confetti | Settlement celebration |
| Lucide React | Icons |
| Vercel Functions | Serverless API (production) |
useStatefor all app stateuseEffectfor localStorage syncuseMemofor derived calculations- Component-based architecture with props
- Conditional rendering and dynamic lists
- Form handling and user input
- LocalStorage persistence
- Node.js 18+
- A free Gemini API key
1. Clone the repository
git clone https://github.com/YOUR_USERNAME/splitsmart.git
cd splitsmart2. Install dependencies
npm install3. Set up environment variables
cp .env.example .envOpen .env and add your Gemini API key:
GEMINI_API_KEY=your_gemini_api_key_here4. Start the development server
npm run devOpen http://localhost:3000 in your browser.
Note: The AI bill parsing feature requires a valid
GEMINI_API_KEY. Manual entry of bill items works without a key.
1. Push your code to GitHub (see GitHub setup below)
2. Go to vercel.com → Import Project
3. Connect your GitHub repo
4. Add environment variable
In Vercel project settings → Environment Variables:
Name: GEMINI_API_KEY
Value: your_gemini_api_key_here
5. Deploy — Vercel auto-detects Vite and deploys. Your app is live! 🎉
splitsmart/
├── api/
│ └── parse-bill.ts # Vercel serverless function (Gemini AI proxy)
├── src/
│ ├── App.tsx # Main app component
│ ├── main.tsx # React entry point
│ ├── index.css # Global styles
│ ├── types.ts # TypeScript interfaces
│ ├── services/
│ │ └── aiService.ts # API client
│ └── utils/
│ └── algorithm.ts # Settlement algorithm
├── public/
├── server.ts # Express dev server (local only)
├── vercel.json # Vercel deployment config
├── vite.config.ts
└── package.json
- Add bill items — paste text, scan a photo, or add manually
- Add people — enter names or load a saved group
- Choose split mode — Equal / Item-based / Percentage
- Settle up — see who owes what with minimum transactions
Uses a greedy approach to minimize transactions:
- Calculate each person's net balance (paid − consumed)
- Sort debtors and creditors
- Greedily match largest debtor with largest creditor
- Repeat until settled
MIT License — see LICENSE for details.
- Part of 100+ React JS Projects
- AI powered by Google Gemini
- Icons by Lucide