AI-Powered Smart Expense Splitter
SplitSmart is a customer-facing smart expense splitting application. It enables users to manage shared expenses, calculate balances, generate settle-up suggestions, and leverage AI for natural language expense parsing and restaurant bill parsing.
- Create expense groups
- Seeded demo users
- Switch between users
- Automatic group filtering
- Manual expense entry
- Server-side validation using Pydantic
- Multiple split methods:
- Equal (All Members)
- Equal (Selected Members)
- Custom Amount
- Weighted Share
- Real-time balance calculation
- Minimum-transfer settlement algorithm
- Clear creditor/debtor overview
- View complete expense history
- Search expenses
- Filter by:
- Date range
- Payer
- Text search
- Natural language expense parsing
- Restaurant bill text parsing
- Assignable line items
- Structured AI responses
- Draft review before confirmation
- Graceful fallback when AI is unavailable or confidence is low
- Unit tests
- API smoke tests
| Layer | Technology |
|---|---|
| Backend | Flask |
| Validation | Pydantic |
| Database | SQLite |
| Frontend | HTML, CSS, JavaScript |
| AI | Gemini Responses API |
SplitSmart_Smart_Expense_Splitter/
│
├── client/
│ ├── static/
│ └── templates/
│
├── server/
│
├── smart_expense_splitter_full_code/
│ ├── app.py
│ ├── requirements.txt
│ ├── data/
│ ├── models/
│ ├── routes/
│ ├── services/
│ ├── schemas/
│ ├── static/
│ ├── templates/
│ ├── tests/
│ └── utils/
│
├── templates/
│
├── .env
├── .gitignore
├── ARCHITECTURE.md
├── PROMPTS.md
├── README.md
├── server.err.log
└── server.out.log
Directory names may vary slightly depending on your project organization.
- ✅ Group creation
- ✅ Seeded demo users
- ✅ User switcher
- ✅ Group filtering
- ✅ Manual expense creation
- ✅ Expense validation
- ✅ Equal split
- ✅ Equal subset split
- ✅ Custom amount split
- ✅ Weighted share split
- ✅ Group balance calculation
- ✅ Settle-up suggestions
- ✅ Expense history
- ✅ Expense search
- ✅ Date filtering
- ✅ Payer filtering
- ✅ Natural-language expense parsing
- ✅ Restaurant bill text parsing
- ✅ Line-item assignment
- ✅ Draft generation before saving
- ✅ AI confidence handling
- ✅ Graceful fallback when API key is unavailable
- ✅ SQLite integration
- ✅ Automatic database creation
- ✅ Seeded data
- 3 Groups
- 8 Users
- 24 Expenses
- ✅ Unit Tests
- ✅ API Smoke Tests
The following enhancements are intentionally left out for the assessment scope.
- Image OCR for bill photos
- Live multi-user synchronization
- Multi-currency conversion
- CSV export
- PDF export
- Recurring expenses
- Activity feed
git clone <repository-url>
cd SplitSmartpip install -r requirements.txtTo enable AI-powered expense parsing, configure your Gemini API key.
Windows PowerShell
$env:GEMINI_API_KEY="your_key_here"Linux / macOS
export GEMINI_API_KEY="your_key_here"If no API key is provided, SplitSmart automatically switches to graceful fallback mode.
python app.pyOpen your browser:
http://127.0.0.1:5000
On the first run the application will automatically:
- Create the SQLite database
- Generate all required tables
- Seed demo users
- Seed demo groups
- Seed demo expenses
Run all tests using:
python -m unittest discover -s tests -vGET /api/users/
POST /api/users/
GET /api/groups/
POST /api/groups/
GET /api/groups/<group_id>
GET /api/groups/<group_id>/expenses
POST /api/groups/<group_id>/expenses
GET /api/groups/<group_id>/balances
GET /api/groups/<group_id>/settlements
POST /api/groups/<group_id>/ai/parse-expense
POST /api/groups/<group_id>/ai/parse-bill
SplitSmart uses SQLite as its database.
The database file is automatically created at:
data/expense_splitter.db
To avoid floating-point precision issues:
- All monetary values are stored as integer paise
- No floating-point currency values are persisted
The AI integration follows a safe review-first workflow.
User Input
│
▼
Gemini API
│
▼
Structured Parsing
│
▼
Draft Generation
│
▼
User Review
│
▼
Confirm Expense
│
▼
Save to Database
Important:
- AI output is never directly stored
- Every AI response becomes a reviewable draft
- Users must explicitly confirm before data is saved
- Single-command setup
- No frontend build process
- No external database configuration
- SQLite-based persistence
- Interview-friendly architecture
- Lightweight deployment
- AI features degrade gracefully when unavailable
This project is licensed under the MIT License. See the LICENSE file for details.
SplitSmart
A Smart AI-Powered Expense Splitting Platform
Designed and Developed by Vaishnavi Misal
The application is deployed on Render and can be accessed using the live URL below.
Hosting Platform: Render Live Application: https://splitsmart-smart-expense-splitter.onrender.com