Splitting bills with friends made simple and transparent.
FairSplit is a web application designed to simplify the process of dividing shared expenses among groups. Whether you're splitting rent, sharing groceries, or settling expenses from a group trip, FairSplit automatically calculates who owes what to whom, eliminating the need for manual calculations and reducing conflicts over money.
FairSplit is a modern, responsive web application that enables users to:
- Create expense groups (rooms) with multiple participants
- Record shared expenses and assign them to specific payers
- Distribute costs fairly among group members
- Automatically calculate settlement amounts using an optimized algorithm
- View a clear summary of who owes whom and how much
- Persist all data locally in the browser without requiring a backend server
The application uses an intelligent settlement algorithm that minimizes the number of transactions needed to resolve all debts, making the settlement process as efficient as possible.
- Create and manage multiple expense groups with custom names
- Add, edit, and delete expenses within groups
- Assign expense payers and distribute costs among participants
- View detailed activity history for each group
- Automatic computation of net balances for each participant
- Optimized algorithm that simplifies transactions to minimize the number of payments required
- Groups payments by payee for clarity
- Example: If three people owe money to one person, the system identifies this pattern and reduces unnecessary cross-payments
- Intuitive landing page for user identification and group selection
- Responsive design supporting both desktop and mobile devices
- Smooth animations and transitions using Framer Motion
- Material Design interface with customizable themes
- Real-time updates as expenses are modified
- Local storage-based persistence without requiring server infrastructure
- Data survives browser sessions and page refreshes
- No internet connection required for core functionality (offline-capable)
- Next.js 15.1.11 - React framework with server-side rendering and API routes
- React 19.2.3 - UI component library
- React DOM 19.2.3 - DOM rendering
- Material-UI (MUI) 6.4.7 - Enterprise-grade component library
- Emotion 11.14 - CSS-in-JS styling solution
- Framer Motion 12.5.0 - Animation library for declarative motion effects
- Zustand 5.0.3 - Lightweight state management library
- Local Storage API - Browser-based data persistence
- ESLint 9 - Code quality and consistency
- Google Fonts - Optimized typography
src/
├── app/ # Next.js app directory and pages
│ ├── page.js # Landing page (/)
│ ├── home/ # Home page (/home)
│ ├── room/[id]/ # Room detail view (/room/[id])
│ ├── nueva-actividad/ # Expense creation (/nueva-actividad)
│ ├── resumenPagos/ # Payment summary (/resumenPagos)
│ ├── ver-acciones/ # Activity history (/ver-acciones)
│ └── layout.js # Root layout with providers
├── components/ # Reusable React components
│ ├── Room.js # Room card component
│ ├── RoomView.jsx # Desktop room detail view
│ ├── RoomViewMobile.jsx # Mobile room detail view
│ ├── CreateRoomModal.jsx # Room creation modal
│ ├── Activity.js # Activity/expense component
│ └── ... # Additional UI components
├── functions/ # Utility functions
│ ├── getDebtsUsers.js # Core settlement calculation algorithm
│ ├── getRandomUserIcon.js # User avatar generation
│ └── getRandomRoomColor.js # Room color assignment
├── themes/ # MUI theme configuration
├── providers/ # React context providers
└── lib/ # Library utilities
public/
├── assets/
│ ├── images/ # Application imagery
│ ├── icons/ # SVG icons
│ └── fonts/ # Custom fonts
- Node.js 18 or higher
- npm, yarn, or similar package manager
- Clone the repository:
git clone [repository-url]
cd fair-split- Install dependencies:
npm install- Run the development server:
npm run dev- Open http://localhost:3000 in your browser
The application will automatically reload as you make changes to the code.
npm run build
npm run start- Landing Page: User enters their name and either creates a new expense group or joins an existing one
- Home Screen: User can view all their expense groups and create new ones (limited to 4 groups)
- Room Detail: User views all expenses in a group and can add, edit, or delete expenses
- Settlement: User views the calculated settlement summary showing who owes whom
The application uses a greedy algorithm to calculate the minimum number of transactions required to settle all debts:
- Calculate the net balance for each participant (total paid minus total owed)
- Identify who owes money (negative balance) and who is owed money (positive balance)
- Match debtors with creditors to minimize the number of transactions
- Aggregate payments by creditor for clarity
- Implement automatic expense categorization using natural language processing
- ML model to suggest category based on expense description
- Analytics dashboard showing spending patterns by category
- Insights like "dining expenses average 30% of total"
- AI-powered intelligent splitting suggestions based on historical patterns
- Detect common expense types (utilities, rent, groceries) and suggest appropriate split methods
- Recommend equitable splits based on group dynamics and past behavior
- Generate spending summaries and trends
- Identify potential issues (one person consistently overpaying, imbalanced contributions)
- Suggest optimization strategies to reduce settlement complexity
- Monthly or periodic reconciliation reports with AI commentary
- ML model to detect potential duplicate expense entries
- Anomaly detection for unusual transactions or patterns
- Warnings for transactions outside normal group behavior
- Voice-to-text expense creation
- Natural language processing to extract expense details from user input
- Chat-like interface for adding expenses conversationally
- Forecast future expenses based on historical data
- Estimate upcoming settlement amounts
- Budget recommendations for group activities
- Implement automatic expense description translation using AI
- Support for multilingual groups
- Backend integration with Firebase or similar for cloud synchronization
- User authentication and account management
- Real-time collaboration features
- Expense export (PDF, CSV formats)
- Mobile app versions (React Native)
- Payment gateway integration for automated settlements
- Dark/light theme toggle
- Advanced filtering and search capabilities
The application uses:
- MUI Theme: Customizable color scheme and component styling in
src/themes/theme.js - Font Configuration: Optimized fonts loaded via Next.js in
src/app/layout.js - ESLint: Code quality rules in
eslint.config.mjs
- Modern browsers supporting ES2020+
- Chrome, Firefox, Safari, and Edge
- Mobile browsers on iOS and Android
This project is available under the MIT License.
Contributions are welcome. Please ensure code follows the ESLint configuration and maintains the current code style and structure.