A full-stack application to track shared expenses, split costs (equally or by percentage), and view balances within groups. Built with FastAPI (Python), PostgreSQL, React, and TailwindCSS.
- Group Management: Create groups and add users
- Expense Management: Add expenses, split equally or by percentage
- Balance Tracking: View who owes whom in a group and personal balances
- Modern UI: Clean, responsive interface with TailwindCSS
- API-first: RESTful backend with OpenAPI docs
- Backend: FastAPI, SQLAlchemy, PostgreSQL
- Frontend: React, TailwindCSS
- Python 3.9+
- Node.js & npm
- (Optional) Git
- Install dependencies:
cd backend pip install -r requirements.txt - Start the backend server:
uvicorn app.main:app --reload
-
Install dependencies:
cd frontend npm install -
Start the frontend app:
npm start
-
Access the app:
- Frontend: http://localhost:3000
- Backend API: http://localhost:8000/docs (OpenAPI docs)
POST /groups– Create a new group- Body:
{ name: string, user_ids: [int] }
- Body:
GET /groups/{group_id}– Get group details
POST /groups/{group_id}/expenses– Add expense- Body:
{ description, amount, paid_by, split_type, splits }
- Body:
GET /groups/{group_id}/expenses– List expenses in group
GET /groups/{group_id}/balances– Group balances (who owes whom)GET /users/{user_id}/balances– User’s balances across groups
For full details and schemas, see http://localhost:8000/docs
assignment/
├── backend/ # FastAPI app
├── frontend/ # React app
└── README.md
- No authentication/authorization required
- No payment/settlement functionality
- All users in a group are assumed to exist before group creation
- Only equal and percentage splits are supported
This project is for educational/demo purposes only.


