SplitSense is a full-stack web app for managing shared expenses, group balances, settlements, activity, notifications, receipts, recurring bills, and analytics.
Live Demo: https://sakshyasinha.github.io/splitwise/
SplitSense helps groups track who paid, who participated, who owes money, and what still needs to be settled. It supports advanced split methods, group dashboards, real-time activity, payment-style settlement entries, and analytics for understanding shared spending.
Useful for:
- Roommates splitting rent, utilities, and recurring bills
- Travel groups tracking trip expenses
- Friends splitting food, events, and shared purchases
- Teams or families coordinating shared costs
- Email/password registration and login
- Google sign-in support
- Google profile avatar support
- JWT access tokens and refresh-token infrastructure
- Current-user session refresh via
/api/auth/me - Protected frontend routes for dashboard, groups, activity, analytics, profile, and settings
- Session cleanup on auth expiry
- Responsive dashboard with summary cards for spend, owed, lent, and group count
- Top navigation for Dashboard, Groups, Activity, Analytics, Profile, and Settings
- Profile menu with avatar or initials fallback
- Dashboard search for expenses and groups
- Quick actions for creating groups, adding expenses, and managing recurring bills
- Dark/light theme toggle
- Toast feedback and loading skeletons
- Create, edit, and delete groups
- Add and remove group members
- Group types such as trip, home, couple, project, and other
- Group detail modal with members, spending, outstanding balances, and related expenses
- Deduped group summaries for repeated/group-like records
- Add, edit, delete, and view expenses
- Assign payer and participants
- Support for multiple split types:
- Equal
- Exact/custom amount
- Percentage
- Shares
- Itemized
- Adjustment
- Payment/direct settlement-style entries
- Expense categories such as food, travel, utilities, shopping, rent, entertainment, healthcare, education, and other
- Expense notes, tags, date, and optional receipt attachment fields
- Audit logs for expense changes
- Per-expense chat entry point and unread indicators
- My Dues view for money the signed-in user owes
- My Lents view for money owed to the signed-in user
- Direct settle action for dues
- Settlement history endpoints
- Friend balance summaries
- Smart settlement services for group settlement suggestions, alternative payments, and settlement analysis
- Activity feed for user and group activity
- Unread notification count
- Notification dropdown
- Mark selected activities or all activities as read
- Real-time notification updates through Socket.IO events
- Email workflows for expense, settlement, invite, and payment reminder notifications
- Expense-level message routes
- Socket.IO client/server support
- Unread message count handling
- Chat modal connected to expense rows
- Create recurring expenses
- Daily, weekly, monthly, and yearly recurrence support
- Pause and resume recurring expenses
- Generate an expense immediately from a recurring rule
- Process due recurring expenses
- Recurring expense stats
- User analytics overview
- Group analytics
- System analytics endpoint
- Spending, category, group, relationship, trend, and time-distribution calculations
- Analytics dashboard view with summary and breakdown components
- Upload one or multiple receipts for an expense
- View receipts linked to an expense
- Set a primary receipt
- Delete receipts
- Admin-style cleanup and storage stats endpoints
- Dashboard AI chat panel
- Intent-aware replies for settlement planning, overspending, savings, and general finance questions
- Local document retrieval helper for contextual answers
- Password hashing with bcrypt
- JWT auth middleware
- Joi validation middleware
- Rate limiting for auth and expense routes
- Helmet/security headers
- CORS configuration
- Redis-backed caching helpers
- Socket authentication support
- Winston logging and Sentry integration
- Soft-delete and audit-oriented expense handling
- React 18 with Vite
- React Router
- Zustand state management
- Axios API client
- Socket.IO client
- Custom CSS with CSS variables and dark mode
- Node.js and Express
- MongoDB with Mongoose
- JWT authentication
- bcryptjs password hashing
- Joi validation
- Redis/ioredis caching
- Socket.IO
- Nodemailer email service
- Multer receipt uploads
- Winston and Sentry
- Docker and Docker Compose
- PM2 production runtime
- GitHub Actions
- GitHub Pages frontend deployment
- Render backend deployment
- Mocha, Supertest, and NYC for backend tests
splitwise/
├── client/
│ ├── app/ # Main React app and routes
│ ├── components/ # Dashboard, expense, group, analytics, chat, UI components
│ ├── hooks/ # useAuth, useExpenses, and shared hooks
│ ├── services/ # API service clients
│ ├── src/services/ # Socket service
│ ├── store/ # Zustand stores
│ ├── styles/ # Global CSS
│ └── utils/ # Formatting and transaction helpers
│
├── server/
│ ├── controllers/ # Express route handlers
│ ├── middleware/ # Auth, validation, rate limiting, upload, security
│ ├── models/ # Mongoose schemas
│ ├── routes/ # API routes
│ ├── schemas/ # Joi request schemas
│ ├── services/ # Business logic, analytics, activity, email, cache
│ ├── tests/ # Backend tests
│ └── utils/ # Logging and helpers
│
├── docs/
├── uploads/
└── docker-compose.yml
- A user signs in with email/password or Google.
- The user creates or joins groups.
- Expenses are added with payer, participants, category, date, and split method.
- The backend calculates participant balances and ledger rows.
- Dashboard views show total spend, dues, lents, group summaries, and recent activity.
- Users can settle dues, record payment-style entries, upload receipts, and discuss expenses in chat.
- Analytics and AI assistant views help explain spending and settlement patterns.
Expense: 3000 for dinner
Payer: Alice
Participants: Alice, Bob, Charlie
Equal split:
- Alice paid
3000, owes1000, and is owed2000 - Bob owes
1000 - Charlie owes
1000
Custom split:
- Alice share:
2000 - Bob share:
500 - Charlie share:
500
POST /api/auth/register- Register a userPOST /api/auth/login- Login with email/passwordGET /api/auth/google/config- Get Google auth client configPOST /api/auth/google- Login with Google credentialGET /api/auth/me- Get current authenticated userPOST /api/auth/refresh- Refresh access tokenPOST /api/auth/logout- Revoke refresh token
GET /api/groups- List groupsPOST /api/groups- Create groupGET /api/groups/:id- Get group detailsPUT /api/groups/:id- Update groupDELETE /api/groups/:id- Delete groupPATCH /api/groups/:id/members/add- Add memberPATCH /api/groups/:id/members/remove- Remove member
GET /api/expenses- List expensesPOST /api/expenses/add- Add expenseGET /api/expenses/my- Get my duesGET /api/expenses/lent- Get my lentsGET /api/expenses/breakdown- Get expense breakdownGET /api/expenses/friends- Get friend balancesGET /api/expenses/:id- Get expense by IDPUT /api/expenses/:id- Update expenseDELETE /api/expenses/:id- Delete expensePATCH /api/expenses/:id/settle- Settle a dueGET /api/expenses/group/:groupId- Get group expensesPOST /api/expenses/:id/payers- Add payerGET /api/expenses/:id/audit- Get expense audit log
POST /api/settlements- Create settlement/payment recordGET /api/settlements/history- Get settlement historyGET /api/settlements/group/:groupId- Get settlements for a groupPOST /api/settlements/nudge- Send payment reminderGET /api/groups/:groupId/smart-settlements- Smart settlement suggestionsGET /api/groups/:groupId/alternative-payments- Alternative payment optionsGET /api/groups/:groupId/settlement-analysis- Settlement analysis
GET /api/activity/feed- Current user's activity feedGET /api/activity/group/:groupId- Group activity feedGET /api/activity/unread-count- Unread notification countPUT /api/activity/read- Mark activities as readPUT /api/activity/read-all- Mark all activities as readGET /api/activity/statistics- Activity statisticsPOST /api/activity- Create activity
GET /api/messages/:expenseId- Get expense messagesPOST /api/messages/:expenseId- Post expense message
GET /api/analytics/user- User analyticsGET /api/analytics/group/:groupId- Group analyticsGET /api/analytics/system- System analytics
POST /api/recurring-expenses- Create recurring expenseGET /api/recurring-expenses- List recurring expensesGET /api/recurring-expenses/stats- Recurring expense statsPOST /api/recurring-expenses/process-due- Process due recurring expensesGET /api/recurring-expenses/:id- Get recurring expensePUT /api/recurring-expenses/:id- Update recurring expensePOST /api/recurring-expenses/:id/pause- Pause recurring expensePOST /api/recurring-expenses/:id/resume- Resume recurring expensePOST /api/recurring-expenses/:id/generate- Generate expense nowDELETE /api/recurring-expenses/:id- Delete recurring expense
POST /api/receipts/:expenseId- Upload receiptPOST /api/receipts/:expenseId/multiple- Upload multiple receiptsGET /api/receipts/:expenseId- List receipts for expensePUT /api/receipts/:expenseId/primary- Set primary receiptDELETE /api/receipts/:expenseId- Delete receiptPOST /api/receipts/cleanup- Clean up orphaned filesGET /api/receipts/stats/storage- Storage stats
POST /api/ai/chat- Ask the AI assistant
- Node.js 18+
- npm
- MongoDB 5+
- Redis, recommended for cache/session features
cd server
npm install
cp .env.example .env
npm startcd client
npm install
cp .env.example .env
npm run devDefault local URLs:
- Frontend: http://localhost:5173
- Backend API: http://localhost:5000
docker-compose upPORT=5000
NODE_ENV=development
MONGODB_URI=mongodb://localhost:27017/splitwise
JWT_SECRET=your-secret-key
CORS_ORIGIN=http://localhost:5173
GOOGLE_CLIENT_ID=your-google-client-id
SENTRY_DSN=optional-sentry-dsnDepending on your local setup, Redis and email variables may also be required for caching, notifications, and outgoing email.
VITE_API_BASE_URL=http://localhost:5000/apicd server
npm test
npm run coverageSuggested manual checks:
- Login with email/password and Google
- Verify avatar display after Google login and page refresh
- Create a group and add/remove members
- Add expenses with each split type
- Settle a due and verify dues/lents refresh
- Open activity and notification dropdown
- Send an expense chat message
- Upload and view a receipt
- Create, pause, resume, and generate a recurring expense
- Review analytics after creating expenses
- Toggle dark mode and test responsive layouts
- Vite static build
- GitHub Pages deployment
- Render deployment
- PM2 runtime available through
npm run start:prod
docker build -t splitwise-client client/
docker build -t splitwise-server server/
docker-compose up -d- The app uses
sessionStoragefor the active browser session and clears stale auth state on401. - Google avatars are stored as
avatarUrl; the header falls back to initials if no image is available or loading fails. - Expense and balance logic distinguishes normal expenses from payment-style settlement entries.
- Activity, unread counts, messages, and notification refreshes use a mix of API calls, browser events, and Socket.IO.
- Some admin-labeled endpoints are route-protected but do not yet include a dedicated admin role check.
- Stronger role-based access control for admin-only endpoints
- More complete profile/settings editing
- Better receipt metadata extraction
- Export/reporting workflows
- Mobile-first polish for dense dashboard views
- Optional payment provider integration
- Offline support with sync
MongoDB connection failed
Check MONGODB_URI and confirm MongoDB is running.
Google sign-in does not show
Set GOOGLE_CLIENT_ID on the backend and ensure the frontend origin is allowed in Google Cloud Console.
Avatar still shows initials
Sign in again or refresh the session. The current user response should include avatarUrl.
CORS errors
Set CORS_ORIGIN to the frontend URL, usually http://localhost:5173 in development.
Notifications or chat do not update live
Confirm the backend Socket.IO server is running and the client has a valid token.
Developed by Sakshya Sinha as a full-stack project focused on real-world shared-finance workflows, splitting logic, settlements, analytics, and scalable backend architecture.
Last Updated: June 2026
Version: 1.0.0