A modern, full-stack expense splitting application built with Flask and React, designed to help friends and groups manage shared expenses with ease.
SplitFree simplifies expense management for groups by automatically calculating who owes whom and how much. Whether you're splitting restaurant bills, shared apartment expenses, or travel costs, SplitFree handles the complex calculations and keeps everyone informed about their financial obligations.
| Feature | Description |
|---|---|
| π Authentication | Secure login/signup with JWT tokens |
| π₯ Group Management | Create groups, add/remove members |
| οΏ½ Group Invitations | Invite members via email or shareable codes |
| π Invite Codes | Generate SPLIT-ABC123 format codes for easy joining |
| οΏ½π³ Expense Tracking | Add expenses, automatic equal splitting |
| π° Balance Calculation | Real-time who-owes-whom calculations |
| π Settlement System | Record payments between members |
| π± Responsive Design | Works on desktop and mobile |
- π₯ Create Groups - Organize expenses with roommates, friends, or travel buddies
- οΏ½ Invite Members - Send email invitations or share SPLIT-ABC123 codes
- π Public/Private Groups - Control group visibility and joining methods
- οΏ½π³ Add Expenses - Record shared costs and automatically split them equally
- π° Track Balances - See who owes what at a glance
- π Settle Up - Record payments and keep balances updated
- π Stay Secure - JWT authentication keeps your data safe
- π Python - Programming language
- πΆοΈ Flask - Web framework
- ποΈ SQLAlchemy - Database ORM
- π JWT - Authentication
- π Swagger - API documentation
- π³ Docker - Containerization
- βοΈ React 18 - UI library
- π¨ CSS3 - Styling
- π Axios - HTTP client
- π£οΈ React Router - Navigation
- πΎ SQLite - Development database
- π PostgreSQL - Production ready
- Equal splits only (no custom percentages)
- No expense categories
- Manual payment recording
- π Custom split ratios
- π·οΈ Expense categories
- πΈ Receipt photos
- π Push notifications
- Python 3.8+
- Node.js 14+
- npm or yarn
-
Clone the repository
git clone <repository-url> cd splitwise
-
Create and activate virtual environment
python -m venv .venv .venv\Scripts\activate # Windows # or source .venv/bin/activate # Linux/Mac
-
Install Python dependencies
pip install -r requirements.txt
-
Set up environment variables (optional)
# Create .env file for custom configurations echo "JWT_SECRET_KEY=your-secret-key" > .env
-
Initialize database
flask db upgrade
-
Start the backend server
python app.py
Backend will run on
http://localhost:5000
-
Navigate to frontend directory
cd frontend -
Install dependencies
npm install
-
Start the development server
npm start
Frontend will run on
http://localhost:3000
- Start the backend server (
python app.py) - Start the frontend server (
cd frontend && npm start) - Open
http://localhost:3000in your browser - Register a new account or login
- Create groups and start splitting expenses!
POST /register- User registrationPOST /login- User loginPOST /logout- User logoutPOST /refresh- Refresh JWT token
GET /group- Get user's groupsPOST /group- Create new groupGET /group/{id}- Get group detailsDELETE /group/{id}- Delete groupPOST /group/{id}/user- Add user to groupDELETE /group/{id}/user/{user_id}- Remove user from group
GET /group/{id}/expense- Get group expensesPOST /group/{id}/expense- Create new expenseGET /group/{id}/expense/{expense_id}- Get expense detailsDELETE /group/{id}/expense/{expense_id}- Delete expense
GET /user- Search usersGET /user/{id}- Get user details
- JWT-based authentication with refresh tokens
- Authorization checks for all group/expense operations
- Users can only access groups they are members of
- Password hashing with secure algorithms
- Protected API endpoints with role-based access
splitwise/
βββ app.py # Flask application entry point
βββ db.py # Database configuration
βββ requirements.txt # Python dependencies
βββ migrations/ # Database migration files
βββ models/ # SQLAlchemy models
β βββ user.py
β βββ group.py
β βββ expense.py
β βββ ...
βββ resources/ # API route handlers
β βββ user.py
β βββ group.py
β βββ expense.py
β βββ ...
βββ schemas.py # Marshmallow schemas
βββ frontend/ # React application
βββ src/
β βββ components/ # Reusable UI components
β βββ pages/ # Page components
β βββ services/ # API service layer
β βββ contexts/ # React contexts
β βββ hooks/ # Custom hooks
β βββ utils/ # Utility functions
βββ public/ # Static assets
βββ package.json # Frontend dependencies
python app.py # Start development server
flask db migrate # Create new migration
flask db upgrade # Apply migrationsnpm start # Start development server
npm run build # Build for production
npm test # Run tests- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License.
For issues and questions, please open an issue on GitHub.