Self-hosted expense-splitting app. Groups, equal/exact splits, balances, settle up, activity feed, and debt simplification.
- Next.js 15 (App Router, TypeScript)
- Postgres + Prisma v7 (with
@prisma/adapter-pg) - Auth.js v5 (NextAuth) — Google OAuth
- Tailwind + shadcn/ui (base-ui components)
- Node 22+ and pnpm
- Postgres (or Docker)
- Google OAuth app (see below)
pnpm installcp .env.example .env.local
# Fill in DATABASE_URL, AUTH_SECRET, AUTH_GOOGLE_ID, AUTH_GOOGLE_SECRET, NEXTAUTH_URLGenerate AUTH_SECRET: openssl rand -base64 32
Google OAuth: Go to Google Cloud Console → Credentials → Create OAuth 2.0 Client ID (Web) → add http://localhost:3000/api/auth/callback/google as redirect URI.
# Local Postgres via Docker:
docker run -d -p 5432:5432 -e POSTGRES_DB=splitwise -e POSTGRES_USER=splitwise -e POSTGRES_PASSWORD=password postgres:16-alpine
pnpm exec prisma migrate dev --name initpnpm dev# On VPS
git clone <repo> && cd custom-splitwise
cp .env.production .env && nano .env # fill in all values
nano Caddyfile # replace your-domain.com
docker compose --env-file .env up -d --build
# Run migrations (from local machine via SSH tunnel or temporary port exposure):
DATABASE_URL="postgresql://splitwise:<pw>@<vps-ip>:5432/splitwise" pnpm exec prisma migrate deployCaddy auto-provisions TLS. Visit https://your-domain.com.
- Groups with shareable invite links
- Expenses: equal or exact-amount splits
- Per-group balances + greedy debt simplification
- Settle up (record payments)
- Activity feed (expenses + settlements)
- Categories + notes on expenses
- 1-on-1 friend expense tracking
- Mobile-responsive
First, run the development server:
npm run dev
# or
yarn dev
# or
pnpm dev
# or
bun devOpen http://localhost:3000 with your browser to see the result.
You can start editing the page by modifying app/page.tsx. The page auto-updates as you edit the file.
This project uses next/font to automatically optimize and load Geist, a new font family for Vercel.
To learn more about Next.js, take a look at the following resources:
- Next.js Documentation - learn about Next.js features and API.
- Learn Next.js - an interactive Next.js tutorial.
You can check out the Next.js GitHub repository - your feedback and contributions are welcome!
The easiest way to deploy your Next.js app is to use the Vercel Platform from the creators of Next.js.
Check out our Next.js deployment documentation for more details.