← Back to home
Merizo app dashboard

Merizo

Track shared expenses and bills with your household or friends — simple, secure, and free.

Next.jsReactTypeScriptTailwind CSSDrizzle ORMPostgreSQLBetter AuthTanStack QueryZodReact Hook FormFramer Motion

Overview

Merizo is a shared household expense tracking app built for groups of people who split costs — housemates, friends, couples, or travel companions. It handles the full lifecycle of shared expenses: logging, splitting, tracking balances, and settling debts.

Unlike basic split calculators, Merizo introduces monthly periods for organized bookkeeping, a debt simplification engine that minimizes the number of transfers needed, and flexible split methods (equal, exact, percentage) with bulletproof floating-point handling.

Key Features

What makes Merizo useful

Smart Expense Splitting

Split costs equally, by exact amounts, or by percentage — with automatic rounding correction so totals always balance.

Group Management

Create groups, invite members via unique invite codes, and switch between multiple groups seamlessly.

Debt Simplification

A greedy matching algorithm minimizes the number of transfers needed to settle all balances within a group.

Monthly Periods

Organize expenses into monthly periods that can be finalized for clean bookkeeping.

Settlement Tracking

Record settlements with automatic distribution across open monthly periods, oldest first.

Activity Feed

Chronological timeline of all group expenses and settlements with per-member filtering.


Technical Challenges

Problems I solved while building Merizo

Floating-Point Precision in Expense Splits

Problem: Splitting an expense like $100 three ways produces $33.333…, and naive rounding causes totals to drift from the original amount.

Solution: Built a normalizeSplitsToTotal function that rounds each share individually, then distributes the residual cent(s) to the participant with the largest share — guaranteeing the sum always matches the expense total exactly.

Minimizing Settlement Transactions

Problem: With N group members, tracking pairwise debts can produce up to N×(N-1)/2 transactions, making settling confusing and tedious.

Solution: Implemented a greedy creditor-debtor matching algorithm that sorts participants by balance, then pairs the largest creditor with the largest debtor iteratively — reducing the typical settlement set to at most N-1 transfers.

Cross-Period Settlement Distribution

Problem: When a user pays off their balance, the payment needs to be allocated fairly across multiple open monthly periods.

Solution: Created a distributeSettlementAcrossPeriods function that allocates payments chronologically (oldest period first), supporting partial payments and handling overpayments gracefully.

Mapping Auth Concepts to the Domain Model

Problem: The app needs group-based access control, but Better Auth has no native "group" concept.

Solution: Mapped Better Auth's organization plugin to the app's group domain, extending the schema with custom fields (invite codes, currency, group type) while preserving all of Better Auth's role and permission capabilities.


Screenshots

A closer look at the interface

Dashboard overview
Dashboard with balance summary, quick actions, and recent activity
Group switcher
Switch between multiple groups or create new ones from the dropdown
Add expense form
Add expenses with flexible payer and split options
Create group form
Create a group with type, currency, and a unique invite code
Settle up page
Monthly settlement progress with suggested transfers
Settlement confirmation
Confirm a settlement with full or custom amount options
Record custom settlement
Record a custom settlement with payer, recipient, amount, and date
Empty state
Clean onboarding — create a group or join one with a code