A modern, full-stack expense sharing application for seamless group expense management
Features β’ Demo β’ Installation β’ Documentation β’ Contributing
- Overview
- Features
- Tech Stack
- Architecture
- Installation
- Configuration
- API Documentation
- Usage Guide
- Development
- Testing
- Deployment
- Contributing
- License
SplitEase is a production-ready expense sharing application designed to simplify group expense management. Whether you're splitting bills with roommates, organizing trip expenses with friends, managing office expenses, or tracking family budgets, SplitEase provides an intuitive platform for transparent and hassle-free expense tracking.
- Real-time Updates: Instant synchronization across all group members
- Smart Splitting: Multiple split options (equal, percentage, custom amounts)
- Debt Simplification: Automatic calculation of optimal settlement paths
- Comprehensive Analytics: Visual insights into spending patterns
- Secure & Scalable: JWT authentication with MongoDB backend
- Mobile Responsive: Seamless experience across all devices
- β Secure user registration and authentication
- β Profile management with avatar support
- β Password recovery and reset functionality
- β Session management with JWT tokens
- β Create unlimited expense groups
- β Invite members via unique invite codes
- β Add members by email address
- β Role-based permissions (Admin, Member)
- β Group settings and customization
- β Add expenses with multiple payers
- β Split expenses equally or by custom amounts
- β Categorize expenses (Food, Transport, Accommodation, etc.)
- β Attach receipts and notes
- β Edit and delete expense records
- β Recurring expense support
- β Real-time balance calculation
- β Smart debt simplification algorithm
- β Mark settlements as paid
- β Settlement history tracking
- β Payment reminders
- β Interactive charts and graphs
- β Category-wise expense breakdown
- β Monthly/Weekly spending trends
- β Individual contribution analysis
- β Export reports (PDF/CSV)
- β Email notifications for new expenses
- β Payment reminders
- β Group activity updates
- β Customizable notification preferences
| Technology | Purpose |
|---|---|
| Node.js | Runtime environment |
| Express.js | Web application framework |
| MongoDB | NoSQL database |
| Mongoose | ODM for MongoDB |
| JWT | Authentication |
| Bcrypt | Password hashing |
| Nodemailer | Email services |
| Express Validator | Input validation |
| Technology | Purpose |
|---|---|
| React 18 | UI library |
| Vite | Build tool |
| React Router | Client-side routing |
| Axios | HTTP client |
| Chart.js | Data visualization |
| Tailwind CSS | Styling |
| React Query | Server state management |
| React Hook Form | Form handling |
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Frontend (React) β
β βββββββββββββββ βββββββββββββββ βββββββββββββββ β
β β Components β β Services β β Store β β
β βββββββββββββββ βββββββββββββββ βββββββββββββββ β
βββββββββββββββββββββββββββ¬ββββββββββββββββββββββββββββββββ
β HTTP/WebSocket
βββββββββββββββββββββββββββ΄ββββββββββββββββββββββββββββββββ
β Backend (Express) β
β βββββββββββββββ βββββββββββββββ βββββββββββββββ β
β β Controllers β β Services β β Middleware β β
β βββββββββββββββ βββββββββββββββ βββββββββββββββ β
βββββββββββββββββββββββββββ¬ββββββββββββββββββββββββββββββββ
β
βββββββββββββββββββββββββββ΄ββββββββββββββββββββββββββββββββ
β Database (MongoDB) β
β βββββββββββββββ βββββββββββββββ βββββββββββββββ β
β β Users β β Groups β β Expenses β β
β βββββββββββββββ βββββββββββββββ βββββββββββββββ β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Before you begin, ensure you have the following installed:
- Node.js (v16.0.0 or higher)
- npm (v7.0.0 or higher)
- MongoDB (v4.4 or higher) or MongoDB Atlas account
- Git
-
Clone the repository
git clone https://github.com/pranavisback/Expense_Tracker.git cd Expense_Tracker/fullstack-app -
Install dependencies
# Install backend dependencies cd backend npm install # Install frontend dependencies cd ../frontend npm install
-
Set up environment variables
# In backend directory cp .env.example .env # Edit .env with your configuration
-
Start the application
# Start backend (from backend directory) npm run dev # Start frontend (from frontend directory) npm run dev
-
Access the application
- Frontend: http://localhost:5173
- Backend API: http://localhost:5000
Create a .env file in the backend directory:
# Server Configuration
PORT=5000
NODE_ENV=development
# Database
MONGODB_URI=mongodb://localhost:27017/splitease
# For MongoDB Atlas:
# MONGODB_URI=mongodb+srv://<username>:<password>@cluster.mongodb.net/splitease
# Authentication
JWT_SECRET=your-super-secret-jwt-key-change-this-in-production
JWT_EXPIRE=30d
COOKIE_EXPIRE=30
# Frontend URL (for CORS)
FRONTEND_URL=http://localhost:5173
# Email Configuration (Optional)
SMTP_HOST=smtp.gmail.com
SMTP_PORT=587
SMTP_EMAIL=your-email@gmail.com
SMTP_PASSWORD=your-app-password
FROM_EMAIL=noreply@splitease.com
FROM_NAME=SplitEase
# File Upload (Optional)
MAX_FILE_UPLOAD=10000000
FILE_UPLOAD_PATH=./public/uploads
# Rate Limiting (Optional)
RATE_LIMIT_WINDOW=15
RATE_LIMIT_MAX=100Create a .env file in the frontend directory:
# API Configuration
VITE_API_URL=http://localhost:5000/api
VITE_SOCKET_URL=http://localhost:5000
# Application Settings
VITE_APP_NAME=SplitEase
VITE_APP_VERSION=1.0.0
# Feature Flags (Optional)
VITE_ENABLE_ANALYTICS=true
VITE_ENABLE_NOTIFICATIONS=truehttp://localhost:5000/api
| Method | Endpoint | Description | Auth Required |
|---|---|---|---|
| POST | /auth/register |
Register new user | No |
| POST | /auth/login |
User login | No |
| GET | /auth/logout |
User logout | Yes |
| GET | /auth/me |
Get current user | Yes |
| PUT | /auth/updateprofile |
Update user profile | Yes |
| PUT | /auth/updatepassword |
Update password | Yes |
| POST | /auth/forgotpassword |
Request password reset | No |
| PUT | /auth/resetpassword/:token |
Reset password | No |
| Method | Endpoint | Description | Auth Required |
|---|---|---|---|
| GET | /groups |
Get user's groups | Yes |
| POST | /groups |
Create new group | Yes |
| GET | /groups/:id |
Get group details | Yes |
| PUT | /groups/:id |
Update group | Yes |
| DELETE | /groups/:id |
Delete group | Yes |
| POST | /groups/:id/members |
Add member to group | Yes |
| DELETE | /groups/:id/members/:userId |
Remove member | Yes |
| POST | /groups/join |
Join group by code | Yes |
| Method | Endpoint | Description | Auth Required |
|---|---|---|---|
| GET | /expenses/group/:groupId |
Get group expenses | Yes |
| POST | /expenses |
Create expense | Yes |
| GET | /expenses/:id |
Get expense details | Yes |
| PUT | /expenses/:id |
Update expense | Yes |
| DELETE | /expenses/:id |
Delete expense | Yes |
| Method | Endpoint | Description | Auth Required |
|---|---|---|---|
| GET | /settlements/group/:groupId |
Get group settlements | Yes |
| POST | /settlements |
Create settlement | Yes |
| PUT | /settlements/:id |
Update settlement | Yes |
| DELETE | /settlements/:id |
Delete settlement | Yes |
| Method | Endpoint | Description | Auth Required |
|---|---|---|---|
| GET | /analytics/group/:groupId |
Get group analytics | Yes |
| GET | /analytics/user/:userId |
Get user analytics | Yes |
| GET | /analytics/trends/:groupId |
Get spending trends | Yes |
Register User
curl -X POST http://localhost:5000/api/auth/register \
-H "Content-Type: application/json" \
-d '{
"name": "John Doe",
"email": "john@example.com",
"password": "securepassword123"
}'Create Group
curl -X POST http://localhost:5000/api/groups \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_JWT_TOKEN" \
-d '{
"name": "Weekend Trip",
"description": "Trip to mountains",
"currency": "USD"
}'-
Create an Account
- Navigate to the registration page
- Enter your name, email, and password
- Verify your email (if enabled)
-
Create or Join a Group
- Click "Create Group" to start a new expense group
- Or enter an invite code to join an existing group
-
Add Members
- Go to group settings
- Add members by email or share the invite code
-
Add Expenses
- Click "Add Expense"
- Enter amount, description, and category
- Select who paid and how to split
-
Track Balances
- View real-time balances on the dashboard
- See who owes whom and how much
-
Settle Debts
- Click on a debt to mark it as settled
- Add settlement notes if needed
-
View Analytics
- Navigate to the Analytics section
- View spending trends and category breakdowns
Expense_Tracker/
βββ fullstack-app/
β βββ backend/
β β βββ config/ # Configuration files
β β βββ controllers/ # Route controllers
β β βββ middleware/ # Custom middleware
β β βββ models/ # Database models
β β βββ routes/ # API routes
β β βββ services/ # Business logic
β β βββ utils/ # Utility functions
β β βββ validators/ # Input validators
β β βββ .env.example # Environment variables example
β β βββ server.js # Entry point
β β βββ package.json
β β
β βββ frontend/
β βββ public/ # Static files
β βββ src/
β β βββ components/ # React components
β β βββ pages/ # Page components
β β βββ services/ # API services
β β βββ hooks/ # Custom hooks
β β βββ utils/ # Utility functions
β β βββ styles/ # CSS/SCSS files
β β βββ App.jsx # Main App component
β β βββ main.jsx # Entry point
β βββ .env.example # Environment variables example
β βββ package.json
βββ docs/ # Documentation
βββ scripts/ # Utility scripts
βββ README.md
Backend
# Development mode with nodemon
npm run dev
# Production mode
npm start
# Run tests
npm test
# Lint code
npm run lint
# Format code
npm run formatFrontend
# Development mode
npm run dev
# Build for production
npm run build
# Preview production build
npm run preview
# Run tests
npm test
# Lint code
npm run lint- Use ES6+ features
- Follow Airbnb JavaScript Style Guide
- Use async/await for asynchronous operations
- Implement proper error handling
- Write meaningful commit messages
- Add JSDoc comments for functions
# Backend tests
cd backend
npm test
# Frontend tests
cd frontend
npm test
# E2E tests
npm run test:e2e# Generate coverage report
npm run test:coverage-
Build Docker images
docker-compose build
-
Run containers
docker-compose up -d
Backend Deployment (Heroku)
# Install Heroku CLI
# Login to Heroku
heroku login
# Create Heroku app
heroku create splitease-api
# Set environment variables
heroku config:set NODE_ENV=production
heroku config:set MONGODB_URI=your_production_mongodb_uri
heroku config:set JWT_SECRET=your_production_secret
# Deploy
git push heroku mainFrontend Deployment (Vercel/Netlify)
# Build the frontend
cd frontend
npm run build
# Deploy to Vercel
vercel --prod
# Or deploy to Netlify
netlify deploy --prod- Set strong JWT secret
- Enable HTTPS
- Configure CORS properly
- Set up rate limiting
- Enable request logging
- Configure error monitoring (Sentry)
- Set up backup strategy
- Configure CDN for static assets
- Enable caching
- Set up CI/CD pipeline
We welcome contributions! Please see our Contributing Guide for details.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
- Write clean, maintainable code
- Add tests for new features
- Update documentation as needed
- Follow the existing code style
- Create detailed pull request descriptions
This project is licensed under the MIT License - see the LICENSE file for details.
- Thanks to all contributors who have helped shape SplitEase
- Special thanks to the open-source community
- Icons by Lucide Icons
- UI components inspired by Tailwind UI
- π§ Email: support@splitease.com
- π¬ Discord: Join our community
- π Documentation: Read the docs
- π Issues: Report bugs
- Mobile app (React Native)
- Multi-currency support
- Bill scanning with OCR
- Integration with payment apps
- Budget planning features
- AI-powered expense categorization
- Voice commands
- Blockchain settlements
- Advanced analytics dashboard
- Team collaboration features