A modern, Splitwise-like expense tracker built with React. Track expenses, split bills with friends, and manage balances with a beautiful, responsive interface.
- 📊 Dashboard Overview - See your balance and recent activity at a glance
- 👥 Friend Management - Add and manage friends with individual balance tracking
- 💰 Expense Tracking - Add expenses with categories and detailed descriptions
- ⚖️ Smart Splitting - Split expenses equally or with custom amounts
- 📱 Responsive Design - Works perfectly on desktop and mobile devices
- 💾 Local Storage - Your data is saved locally in your browser
- 🎨 Modern UI - Beautiful gradient design with smooth animations
- Node.js (version 14 or higher)
- npm or yarn
- Supabase account (free)
-
Install dependencies:
npm install
-
Set up Supabase backend:
- Follow the complete setup guide in
SUPABASE_SETUP.md - Create a Supabase project
- Run the database schema
- Configure environment variables
- Follow the complete setup guide in
-
Start the development server:
npm run dev
-
Open your browser: Navigate to
http://localhost:3000to see the app in action!
- Click "Manage Friends" from the dashboard
- Click "Add Friend" and enter their name
- Friends will appear in your friends list with their current balance
- Click "Add Expense" from the dashboard
- Fill in the expense details:
- Description: What the expense was for
- Amount: The total cost
- Date: When the expense occurred
- Category: Choose from predefined categories
- Paid by: Who paid for this expense
- Split with: Select who should split this expense
- Choose split type:
- Equal Split: Automatically divides the amount equally
- Custom Amounts: Manually specify how much each person pays
- Click "Add Expense" to save
- Dashboard: See your personal balance and recent expenses
- Balances Tab: View all friends' balances
- Friends Page: Detailed view of each friend's balance
- Click "Groups" from the dashboard
- Click "Create Group"
- Add group name, description, and select members
- Groups help organize expenses with specific people
- React 18 - Modern React with hooks
- React Router - Client-side routing
- Vite - Fast build tool and dev server
- Supabase - Backend as a Service (Database, Auth, Real-time)
- Lucide React - Beautiful icons
- Date-fns - Date formatting utilities
- CSS3 - Custom styling with gradients and animations
src/
├── components/
│ ├── Dashboard.jsx # Main dashboard with overview
│ ├── AddExpense.jsx # Expense creation form
│ ├── Friends.jsx # Friend management
│ └── Groups.jsx # Group management
├── App.jsx # Main app with routing and state
├── main.jsx # React entry point
└── index.css # Global styles
- Email/Password - Traditional signup and login
- Google OAuth - One-click sign in with Google
- Secure Sessions - JWT-based authentication with Supabase
- Live Updates - Changes appear instantly across all users
- Offline Support - Works even when temporarily offline
- Conflict Resolution - Handles simultaneous edits gracefully
The app automatically calculates balances by:
- Adding the full expense amount to who paid
- Subtracting each person's share from their balance
- Positive balance = you're owed money
- Negative balance = you owe money
- Equal Split: Automatically divides the total by the number of people
- Custom Split: Manually specify amounts, with validation to ensure they add up to the total
- Row Level Security (RLS) - Users can only access their own data
- Friend Relationships - Share expenses only with approved friends
- Encrypted Storage - All data is encrypted at rest
- Gradient Background: Beautiful purple gradient theme
- Card-based Layout: Clean, organized information display
- Responsive Design: Works on all screen sizes
- Smooth Animations: Hover effects and transitions
- Color-coded Balances: Green for positive, red for negative balances
npm run dev- Start development servernpm run build- Build for productionnpm run preview- Preview production build
The app is built with a modular component structure, making it easy to add new features:
- Create new components in
src/components/ - Add routes in
App.jsx - Update state management as needed
- Add styles to
index.css
Feel free to fork this project and add your own features! Some ideas:
- Export expenses to CSV
- Multiple currency support
- Expense categories with icons
- Recurring expenses
- Payment tracking
This project is open source and available under the MIT License.
Happy expense tracking! 💰 "# Expense_tracker"