Expense Splitter PWA
A Progressive Web App for splitting expenses among friends with a Python Flask backend and SQL Server database.
Features
- ✅ Add transactions with merchant name, amount, date, and split details
- ✅ Select who paid and who the expense is split with
- ✅ View all transactions in a clean interface
- ✅ View balances and insights showing who owes what
- ✅ Download PDF reports of balances and transactions
- ✅ Progressive Web App (PWA) - can be installed on mobile devices
- ✅ Responsive design that works on all devices
Live Demo
🚀 Try the Live Demo
Screenshots

Setup Instructions
1. Database Setup
- Open SQL Server Management Studio (SSMS)
- Connect to your SQL Server instance (
SUMANTH\SQLEXPRESS
)
- Run the
database_schema.sql
file to create the database and tables
- The script will create:
ExpenseSplitter
database
Users
table with 5 users: venkat, aria, kiran, sai, sumanth
Transactions
table for storing expense records
Transaction_Splits
table for split details
2. Python Backend Setup
- Clone the repository:
git clone https://github.com/sumanth2525/expense-splitter-pwa.git
cd expense-splitter-pwa
- Install Python dependencies:
pip install -r requirements.txt
-
Make sure you have the ODBC Driver 17 for SQL Server installed
- Run the Flask application:
- The app will be available at
http://localhost:5000
3. Using the App
- Add Transaction Tab:
- Enter merchant name (e.g., “McDonald’s”)
- Enter the total amount
- Select the date when the expense occurred
- Select who paid for the expense
- Check the boxes for people to split with
- Click “Add Transaction”
- View Transactions Tab:
- See all transactions with details
- Shows merchant, amount, date, who paid, and who it’s split with
- Balances & Insights Tab:
- View individual balances (positive = owed money, negative = owes money)
- See overall insights like total transactions and amounts
- Download PDF reports
4. PWA Installation
- On mobile devices, you can install this as a native app
- Look for “Add to Home Screen” option in your browser
- The app will work offline for basic functionality
Database Schema
The app uses three main tables:
- Users: Stores the 5 friends (venkat, aria, kiran, sai, sumanth)
- Transactions: Stores expense records with merchant name, amount, date, and who paid
- Transaction_Splits: Stores how much each person owes for each transaction
API Endpoints
GET /api/users
- Get all users
POST /api/transactions
- Create a new transaction
GET /api/transactions
- Get all transactions
GET /api/balances
- Get user balances and insights
GET /api/balances/pdf
- Download PDF report
Technology Stack
- Backend: Python Flask
- Database: SQL Server
- Frontend: HTML, CSS, JavaScript (Vanilla)
- PWA: Service Worker, Web App Manifest
- PDF Generation: ReportLab
- Styling: Custom CSS with responsive design
Contributing
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature
)
- Commit your changes (
git commit -m 'Add some AmazingFeature'
)
- Push to the branch (
git push origin feature/AmazingFeature
)
- Open a Pull Request
License
This project is licensed under the MIT License - see the LICENSE file for details.
Author
Sumanth
Acknowledgments
- Built with ❤️ using Flask and vanilla JavaScript
- PWA features for mobile-first experience
- SQL Server for robust data storage