Skip to content

joani-k/ice-scope-th

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

11 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿ ๐Ÿ’ธ Roomies Ledger

Roomies Ledger banner

A modern expense-splitting app for roommates โ€” track shared purchases, split bills (equal/custom/%), and settle up fast.
Built for hackathons, dorms, apartments, and anyone tired of โ€œwho owes who?โ€ texts.

App demo


๐Ÿท๏ธ Badges

Status License Next.js React TypeScript Supabase Postgres Tailwind shadcn/ui date--fns lucide

Stars Forks Issues Last Commit


โšก TL;DR

  • โœ… Auth + Profiles (Supabase Auth + profiles table + auto-profile trigger)
  • ๐Ÿ˜๏ธ Multi-household groups with invite codes
  • ๐Ÿงพ Add transactions with:
    • โž— Equal split
    • ๐Ÿงฎ Custom amounts
    • ๐Ÿ“Š Percent split
  • ๐Ÿ’ฑ Optional multi-currency input + stored exchange rate
  • ๐Ÿ” Recurring expense flag
  • ๐Ÿ” Row-Level Security (RLS) across tables
  • ๐Ÿงช Demo mode: seed 3 users + 3 households via /api/seed

๐Ÿ“š Table of Contents


๐Ÿ’ก Inspiration

Roommates split groceries, utilities, random Target runs, and it always turns into:

  • โ€œDid you Venmo me?โ€
  • โ€œI paid last timeโ€
  • โ€œWait how much do I owe?โ€

Roomies Ledger makes it dead simple to track shared spending and settle up.


โœ… What it does

Roomies Ledger lets you:

  • Create or join a household using an invite code
  • Add an expense with:
    • amount + date + optional place
    • payer selection
    • split type: equal / custom amounts / percentages
  • View transactions in a clean feed + drill into details
  • See net balances and who should pay whom to settle

๐Ÿง  How it works

  1. Auth: Supabase Auth signs users in/out.
  2. Profile: A trigger creates a profiles row on signup (handle_new_user).
  3. Groups: Users can create a group (with an invite code) or join an existing one by code.
  4. Members: group_members ties users โ†” groups and stores permissions.
  5. Transactions: Stored per group, always normalized to group currency (with optional original currency metadata).
  6. UI: Transaction creation is a 3-step sheet: details โ†’ amount โ†’ split.

โœจ Key features

๐Ÿ˜๏ธ Groups + Invite Codes

  • Create a household โ†’ invite roommates with a short code
  • Join household with code โ†’ instant access to the groupโ€™s transactions

๐Ÿงพ Transaction flow (3-step)

  • Step 1: Title, date, place, payer
  • Step 2: Amount + currency + optional receipt + recurring toggle
  • Step 3: Split equal / exact / percentage

๐Ÿ’ฑ Multi-currency input (optional)

  • Input expense in a different currency than the group
  • Store:
    • originalCurrency
    • originalAmount
    • exchangeRate
  • Normalize to group currency so balances stay consistent

๐Ÿ” Recurring payments

  • Tag expenses as recurring with:
    • daily / weekly / biweekly / monthly / yearly

๐Ÿงช Demo accounts + households

  • /api/seed creates demo users + groups so judges can try it instantly

๐Ÿ—๏ธ Architecture

Frontend

  • Next.js + React + TypeScript
  • UI: shadcn/ui + Tailwind
  • State: useStore() (central store)

Backend

  • Supabase:
    • Postgres tables + RLS policies
    • Auth + profiles trigger
    • SQL RPCs for group creation + join by invite code

๐Ÿงฐ Tech stack

  • Next.js
  • React
  • TypeScript
  • Supabase (Auth + Postgres + RLS + RPC)
  • Tailwind CSS
  • shadcn/ui
  • date-fns
  • lucide-react

๐Ÿ—„๏ธ Database schema

profiles

Stores display name + avatar color for each auth user.

groups

Households (name, currency, invite code, creator).

group_members

Members tied to a group. Also holds permissions for actions like adding/deleting transactions.

transactions

Expenses per group:

  • normalized amount in group currency
  • optional original currency metadata
  • split metadata (equal/exact/percent)
  • optional recurring + receipt URL

Database schema


๐Ÿ” Security (RLS)

Row-level security is enabled for core tables. Policies ensure:

  • users only see groups they belong to (and creators always see their own groups)
  • members can only access transactions for groups theyโ€™re in
  • write permissions are constrained by membership/ownership rules

๐Ÿš€ Quick start

1) Install deps

npm install

About

Roomies Ledger is a mobile-first expense splitting app for roommates. Create/join households with invite codes, log purchases, split costs, and see who owes who at a glance.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors