Welcome to the Daily Expense Sharing App! This project simplifies the often tedious task of splitting expenses among friends, colleagues, or family. Whether it's a weekend getaway, dinner with friends, or shared utilities—this app has got you covered. Split expenses with precision and fairness through multiple methods, and manage all your transactions effortlessly.
-
User Management
- Add users with their email, name, and mobile number.
-
Expense Management
- Record and track expenses added by users.
- Split expenses in three convenient ways:
- Equal Split: Divide the amount equally among participants.
- Exact Split: Specify exact amounts for each participant.
- Percentage Split: Allocate expenses based on predefined percentages (must sum up to 100%).
-
Balance Sheet
- Get a detailed breakdown of individual and group expenses.
- Generate and download balance sheets for easy tracking.
-
Data Validation
- Smart validation of user inputs to ensure consistency.
- Auto-checks percentage-based splits to guarantee they sum up to 100%.
Scenario: You go out with 3 friends, and the total bill is 3000. Each friend owes 1000.
Scenario: You shop with 2 friends and pay 4299. Friend 1 owes 799, Friend 2 owes 2000, and you owe 1500.
Scenario: You attend a party with 2 friends and 1 cousin. You owe 50%, Friend 1 owes 25%, and Friend 2 owes 25%.
- Backend: Python Flask
- Database: SQLite
POST/user
- Create a new userGET/user/id
- Retrieve user details by ID
POST/expenses
- Add a new expenseGET/expense/user/id
- Get individual user expensesGET/expenses
- Retrieve overall expensesGET/balance-sheet
- Download the balance sheet
-
Clone the repository:
git clone https://github.com/your-username/daily-expense-sharing-app.git cd daily-expense-sharing-app
-
Set up a virtual environment:
python -m venv venv source venv/bin/activate
-
Install the required packages:
pip install -r requirements.txt
-
Set up your environment variables in a
.env
file:SECRET_KEY=YOUR_SECRET_KEY DATABASE_URL=YOUR_DATABASE_URL
-
Make sure you're in the project root directory and your virtual environment is activated.
-
Run the following command:
python run.py
- Create a user: POST /users
- Get user details: GET /users/<user_id>
- Add an expense: POST /expenses
- Get user expenses: GET /users/<user_id>/expenses
- Get all expenses: GET /expenses
- Get balance sheet: GET /balance-sheet

http://127.0.0.1:5000/expenses
http://127.0.0.1:5000/expenses
http://127.0.0.1:5000/users/1/expenses
http://127.0.0.1:5000/expenses
http://127.0.0.1:5000/balance-sheet
-
User Authentication & Authorization: Secure your app with login systems and permission-based access.
-
Error Handling & Input Validation: Robust error responses and comprehensive validation for even better user experience.
-
Performance Optimization: Optimize for large datasets and faster query times.
-
Testing: Add unit and integration tests to ensure code reliability.