Expense Expert is a full-stack expense sharing and settlement platform for trips, roommates, events, and teams. It helps groups track spending, split costs flexibly, and settle with the minimum number of transfers.
- Real-time multi-user session updates.
- Smart settle-up recommendations.
- Advanced split logic for real-world scenarios.
- Rich analytics and what-if simulation.
- Easy sharing and export workflows.
- Create a session with trip/group name.
- Add members one by one using chip-style input.
- Join an existing session using session code.
- Live member presence tracking with SSE.
- Activity feed for expense and settlement events.
- Add and delete expenses.
- Payer tracking with paid-by payload.
- Split type badges in expense list.
- Expandable per-expense split breakdown.
- Inline validation in add-expense flow.
Unified backend split engine supports 4 modes:
- EQUAL: even split with remainder handling.
- EXACT: fixed amount per member.
- PERCENTAGE: split by percentage values.
- SHARE: split by integer share units.
Validation rules:
- EXACT total must match expense amount (tolerance 0.01).
- PERCENTAGE total must be 100 (tolerance 0.01).
- SHARE values must be positive integers.
- Session member integrity is enforced for split and payer data.
Structured backend validation response:
{
"message": "Exact split total does not match expense amount.",
"expected": 1000.00,
"actual": 700.00,
"delta": 300.00
}- Net balance view per member.
- Optimized settle-up suggestions.
- Mark settlement payments as partial or complete.
- Payment tracking visible in settle-up panel.
- What-if simulator to preview the impact of a hypothetical expense.
- Analytics dashboard with:
- category breakdown,
- member spending,
- fairness/health indicators,
- trip-level summary metrics.
- Shareable session links.
- WhatsApp-friendly settlement summary copy.
- PDF export endpoint integration.
- Premium, animated UI with Framer Motion and GSAP.
- Smooth scrolling using Lenis.
- Reusable shadcn-style UI primitives.
- In-app name capture for presence (replaces browser prompt).
Settlement optimization uses a greedy debtor-creditor matching strategy to reduce transaction count.
1. Compute net balance for each member:
net = total_paid - total_owed
2. Split members into:
- debtors (net < 0)
- creditors (net > 0)
3. Repeatedly match largest debtor with largest creditor.
4. Transfer min(abs(debtor), creditor), update balances.
5. Continue until all balances reach zero.
- Frontend: React, Vite, Tailwind CSS, Framer Motion, GSAP, Lenis, Axios, React Router.
- UI Layer: Custom shadcn-style primitives (Button, Card, Input, Badge).
- Backend: Java 21, Spring Boot, Maven.
- Database: PostgreSQL.
- Realtime: Server-Sent Events (SSE).
- Expense_Expert: Spring Boot backend.
- frontend: React frontend.
- UI_REFACTOR_PLAN.md: UI design and migration planning notes.
- Node.js 18+
- Java 21+
- Maven 3.9+
- PostgreSQL 14+
git clone https://github.com/Team-Zemo/Expense_Expert.git
cd ExpenseUpdate Expense_Expert/src/main/resources/application.properties:
server.port=8080
spring.datasource.url=jdbc:postgresql://localhost:5432/expense_expert
spring.datasource.username=postgres
spring.datasource.password=your_password
spring.jpa.hibernate.ddl-auto=update
spring.jpa.show-sql=truecd Expense_Expert
mvn clean install
mvn spring-boot:runBackend URL: http://localhost:8080
cd frontend
npm install
npm run devFrontend URL: http://localhost:5173
# backend tests
cd Expense_Expert
mvn test
# frontend production build
cd frontend
npm run build- Backward compatibility for legacy split JSON is maintained while new expenses are saved in normalized split-array structure.
- Split engine behavior is covered by tests in Expense_Expert/src/test/java/com/teamzemo/exp/SplitEngineTest.java.
- Core split processing lives in backend service utilities and ExpenseService orchestration.
Built by Team Zemo.



