A full-stack group expense splitting app. Add expenses, invite friends, and calculate who owes whom with a minimum-transactions algorithm.
Live demo: zeroed-five.vercel.app
- Authentication — JWT-based register and login
- Groups — Create expense groups, invite members by email
- Expenses — Add and split expenses across group members
- Smart balancing — Minimum transactions algorithm calculates the fewest payments needed to settle a group (the same approach used by Splitwise)
- Settlements — Mark groups as fully settled
- Invitations — Email-based invite flow with accept/decline
- NestJS + TypeScript
- Prisma 7 + PostgreSQL (Neon)
- JWT + bcrypt
- Deployed on Railway
- React + TypeScript + Vite
- TanStack Query + React Router
- Tailwind CSS
- Deployed on Vercel
When a group has multiple shared expenses, each person ends up with a net balance — either positive (they're owed money) or negative (they owe money).
Zeroed uses a greedy algorithm to settle all debts with the fewest possible transactions. It repeatedly matches the person who is owed the most with the person who owes the most, until all balances reach zero.
Example:
Nastia: +80 → Ron pays Nastia 60
Shir: -40 → Shir pays Nastia 20
Dana: -20 → (2 transactions to settle the whole group)
Ron: -60
- Node.js 22+
- PostgreSQL database (or a Neon free account)
cd backend
npm installCreate a .env file:
DATABASE_URL="your_postgres_connection_string"
JWT_SECRET="your_jwt_secret"Run migrations and start:
npx prisma migrate dev
npm run start:devcd frontend
npm install
npm run devThe frontend runs on http://localhost:5173 and expects the backend at http://localhost:3000.
zeroed/
├── backend/
│ ├── src/
│ │ ├── auth/ # JWT auth, register, login
│ │ ├── groups/ # Group CRUD, settlements
│ │ ├── expenses/ # Expense splitting, balance algorithm
│ │ ├── invites/ # Email invite flow
│ │ └── prisma/ # Database service
│ └── prisma/
│ └── schema.prisma # DB schema
└── frontend/
└── src/
├── api/ # Axios client + API functions
├── components/ # Reusable modals
└── pages/ # Login, Register, Dashboard, Group