# How to Vibe Code Your Own Splitwise (and Stop Paying for It)

> Split expenses with friends.

- Site: https://splitwise.com
- Category: Fintech / Expense Sharing
- Platforms: Web app
- Verdict: **Solid side project** (75/100 vibecodeable)
- Estimated effort: 2-3 weeks part-time

## Verdict

Build it yourself to skip the irritating ad-wall and daily expense caps, though the debt simplification graph algorithm requires careful debugging.

Splitwise is fundamentally a relational ledger paired with a graph-balancing algorithm. A solo developer can build a personal-use clone in about 2 weeks. The main engineering hurdles are writing the debt-simplification graph engine to minimize multi-party IOUs and ensuring database transactions handle balance adjustments atomically without floating-point rounding errors.

### What you can't replicate

- The massive social graph of tens of millions of real users
- Bank integrations and direct fintech payment rails (Venmo/Tink)

## What it does

A peer-to-peer expense-sharing platform designed to track shared tabs, group bills, household costs, and IOUs among friends and housemates, featuring automated debt simplification algorithms.

### Core features

- User authentication and profile management
- Group creation and management for trips, housemates, and couples
- Expense logging with equal, percentage, share, and exact-amount splits
- Debt simplification algorithm (calculating minimal directed transactions)
- Settlement tracking (recording cash or digital payments)
- Activity feed and balance summaries per friend and group
- Multi-currency support with basic conversion rates

## The business

### Pricing

- Splitwise Free: Free — Basic splitting with strict daily expense logging limits and unskippable interstitial ads.
- Splitwise Pro: $4.99/mo — Ad-free experience with advanced features, currency conversion, and receipt scanning.

### Funding

$30.5M raised.
- Seed Round (December 2014) - $1.4M
- Early Stage (October 2016) - ~$5.03M
- Mid Stage (July 2018) - ~$3.8M
- Series A (April 2021) - $20M
Investors: Insight Partners, Bullpen Capital, 500 Global, Walnut Venture Associates

Founded 2011.
Team size: ~50 employees.

## The hard parts

- Implementing the debt simplification graph algorithm (minimum-transaction balancing)
- Maintaining accurate balance ledgers across multi-currency transactions without rounding discrepancies
- Handling race conditions when concurrent users update group balances simultaneously

## How to vibe code Splitwise

### Prerequisites

- Node.js (free): Runtime environment for running the Next.js full-stack application locally.
- GitHub (free): Code repository hosting and seamless deployment integration with Cloudflare.
- Cloudflare ($0-5/mo): Hosting platform for edge deployment and serverless database storage.

### Recommended AI tools

- Claude Code: Best-in-class terminal coding agent for scaffolding full-stack CRUD schemas and complex algorithms.
- Cursor: AI code editor ideal for refining UI components, forms, and split configuration tables.

### Stack

- Frontend: Next.js (App Router, Tailwind CSS, TypeScript)
- Backend: Next.js API Routes / Server Actions
- Database: Cloudflare D1 (Serverless SQLite)
- Auth: better-auth
- Payments: none (personal use clone skips billing)
- Other: Vercel AI SDK, OpenAI API for Receipt OCR

### Hosting

- Cloudflare (Hosting Next.js frontend and serverless D1 SQLite database at the edge.): $0-5/mo

### Build guide

1. **Scaffold Project and Database Schema** — Initialize a Next.js TypeScript project configured for Cloudflare D1 with better-auth integration and relational tables for users, groups, group_members, expenses, split_shares, and settlements.

```
Create a new Next.js 16 project with Tailwind CSS and TypeScript configured to deploy on Cloudflare Workers using OpenNext. Set up better-auth with email/password authentication. Create a SQLite migration script using Cloudflare D1 containing tables: users (id, name, email, password_hash), groups (id, name, created_at), group_members (group_id, user_id), expenses (id, group_id, description, amount, currency, payer_id, created_at), split_shares (id, expense_id, user_id, owed_amount), and settlements (id, payer_id, payee_id, amount, currency, created_at). Ensure all foreign key constraints and indexes are correctly defined for fast balance lookups.
```

2. **Implement Core Expense CRUD and Split Configurations** — Build the expense creation form supporting equal splits, percentage splits, exact amounts, and itemized calculations.

```
Build a responsive expense creation modal in Next.js using Tailwind CSS. The form must allow entering a description, total amount, currency, selecting a group or friend, choosing who paid, and configuring split methods: 'equal' (divide equally among selected members), 'exact' (assign specific dollar amounts per person, validating sum equals total), and 'percentage' (assign percentages summing to 100). Implement Server Actions to handle expense creation, storing header records in 'expenses' and individual rows in 'split_shares' using database transactions to ensure atomicity.
```

3. **Build Debt Simplification Graph Engine** — Implement the core debt simplification algorithm that computes minimized directed transactions among group members.

```
Implement a TypeScript utility function for debt simplification within a group. The function must query all expenses and settlements for a given group, calculate net balances for every user (total paid minus total owed), separate users into creditors (positive net balance) and debtors (negative net balance), and compute an optimal minimized set of directed payment transactions to settle all debts. Handle floating-point rounding precision carefully using integer cents representation. Display the simplified settlement plan in a dedicated 'Simplify Debts' tab on the group page.
```

4. **Develop Dashboard, Balances, and Friend Views** — Create the main dashboard displaying total balances, individual friend ledgers, and group summaries.

```
Build the main dashboard view in Next.js. It should feature a sidebar for groups and friends, a central activity feed showing recent expenses and settlements, and a summary header displaying total user balance ('you are owed X' / 'you owe Y'). Implement dedicated detail pages for individual friends and groups that list mutual expense history and running balances. Include a 'Settle Up' button that opens a settlement recording modal to log cash or external payments between two users.
```

5. **Add Receipt Scanning OCR with AI** — Integrate an AI-powered vision endpoint to parse receipt images and extract itemized split items.

```
Implement an OCR receipt scanning feature using the OpenAI API and Vercel AI SDK. Add a file upload component to the expense form where users can upload a receipt image or PDF. Create a server action that sends the image to the vision model with a structured prompt requesting item names, prices, and taxes in JSON format. Automatically populate the expense description and exact split line items on the frontend from the parsed JSON response, allowing users to review and adjust before saving.
```

### Cost vs paying

**Starting costs (one-time):**

- AI Coding Assistant Subscription: $20.00
- Total: $20.00 one-time

**Ongoing costs (monthly):**

- Cloudflare Hosting & D1 Database: $0.00 (Hobby Tier)
- OpenAI API Usage for Receipt OCR: $2.00
- Total: ~$2.00/mo

- Paying for the SaaS instead: $4.99/mo (Splitwise Pro)
- Build time: 25 hours
- AI tool credits: $20 (1 month of Claude Pro / Cursor)
- Break-even: Never (built for ad-free personal use and learning)

## Sources

- [Splitwise Official Site](https://splitwise.com)
- [Tracxn - Splitwise Company Profile](https://www.tracxn.com/d/companies/splitwise)
- [Business Insider - Splitwise $20M Series A Announcement](https://www.businessinsider.com/fintech-startup-splitwise-raises-20m-in-fresh-funding-from-insight-2021-4)