Oracle3
Oracle3: 예측시장 거래 엔진·MCP 서버
무료 룸메이트 비용 분할 서비스, 공유 비용을 나누고 누가 얼마를 내야 하는지 확인해 최소 횟수로 정산합니다
The free roommate bill splitter. Split shared bills, see who owes what, and settle up in the fewest payments — no paywall, no credit card.
금융TypeScript · JavaScriptGitHub @taylordrew4u2온라인운영자 미확인
써 보셨어요? 한 번만 눌러 주세요. 로그인은 필요 없어요.
아직 감지된 업데이트가 없습니다. GitHub 릴리스가 나오면 여기에 보입니다.
개인 계정의 공개 저장소 소유자는 GitHub로 로그인해 운영자를 확인하고 소개를 직접 관리할 수 있습니다. 관리자 승인은 필요하지 않습니다.
로그인한 뒤 확인 파일을 만들어 이 저장소의 기본 브랜치에 30분 안에 커밋해 주세요. 다른 브랜치나 포크의 파일은 인정하지 않습니다. 파일을 올린 뒤 아래에서 확인하면 관리자 승인 없이 관리할 수 있습니다. 자격을 유지하려면 파일을 남겨 두세요.
로그인이 필요하면 로그인 화면으로 이동합니다. 로그인 후 이곳으로 돌아와 원하는 확인 버튼을 다시 눌러 주세요.
프로젝트 폴더에서 /nomorevibe verify를 실행하면 소유권을 확인하고 소개를 직접 관리할 수 있습니다.
1분 만에 확인하기Roommate bill splitting made easy
저장소 README에서 가져옴
README 전체를 불러오는 중입니다. 아래는 저장된 발췌입니다.
A shared-expense app for roommates that works offline, keeps each person's numbers private, and settles the house in the fewest possible payments.
Add an expense, watch balances update, settle up. Local build with sample data.README 전문 보기 ↗A shared-expense app for roommates that works offline, keeps each person's numbers private, and settles the house in the fewest possible payments.
Shared households run on rent, utilities and groceries, and keeping track of who owes whom quickly turns into a spreadsheet nobody trusts. BillSpilt keeps that ledger on everyone's phone, works when the signal drops, and reduces a tangle of pairwise debts to a short list of payments. It also treats spending as personal: the point is to show that each person paid their share, not to publish what everyone else spends.
lib/visibility.ts decides who may see each amount. Admins see every figure; members see only their own share, their own balances, and payments they are part of. API routes redact before the JSON is sent, so hidden figures never reach the browser's network tab. Redacted values come back as null, not 0, so the UI shows "hidden" instead of a wrong number. Covered by 12 unit tests.minimizeTransfers in lib/settlement.ts collapses up to n² pairwise debts into net balances, then greedily matches the largest creditor with the largest debtor: at most n − 1 transfers. All math is in integer cents.computeSplits hands out remainder cents deterministically, so $40.00 three ways is 13.34 / 13.33 / 13.33 for equal, exact and percentage splits alike.BEGIN/COMMIT available, an expense and all its splits are written by one CTE that fans out via jsonb_to_recordset: one round trip, all or nothing (lib/expenses.ts).lib/sync.ts).lib/db.ts picks Neon's HTTP driver for *.neon.tech and pg over TCP for everything else, behind one tagged-template sql helper. Receipts live in the same database as BYTEA, so there is no second storage service.| Area | What it does |
|---|---|
| Expenses | Equal, exact or percentage splits · receipt photo or PDF (downscaled to 1600px on the client) · search, category filters, CSV export |
| Balances | Your net position and what you owe each roommate, updated as expenses land |
| Settle up | "A pays B $X" plan with history and undo · Venmo and Cash App deep links · admin can settle everyone at once |
| Privacy | Members see only their own money; household totals and recurring-bill costs are admin-only; only the two people in a payment (or an admin) can record or undo it |
| Recurring bills | Fixed bills are logged by a daily Vercel Cron job; variable bills prompt for the real amount when due |
| Households | One-tap invite links · multiple admins · member management · activity log |
| App | Installable PWA · offline queue · dark mode · home-screen shortcuts · email password reset |
flowchart LR
subgraph Client["Browser · installable PWA"]
UI["React UI<br/>App Router pages"]
IDB[("IndexedDB queue<br/>Dexie")]
SW["Service worker<br/>Serwist"]
end
PX["proxy.ts<br/>auth gate · nonce CSP"]
subgraph Server["Route handlers · Node runtime"]
API["/api/expenses · /balances<br/>/settle · /recurring …"]
VIS["visibility.ts<br/>per-viewer redaction"]
SET["settlement.ts<br/>min-cash-flow"]
DB["db.ts<br/>Neon HTTP or pg TCP"]
end
PG[("Postgres<br/>data + receipts")]
KV[("Vercel KV<br/>optional cache")]
CRON["Vercel Cron<br/>daily 06:00 UTC"]
UI -->|pages| PX
UI -->|fetch| API
IDB -->|sync on reconnect| API
SW -.->|caches| UI
API --> SET
API --> DB --> PG
API -.-> KV
API -->|filtered JSON| VIS --> UI
CRON --> API
Design decisions
redactExpenses, redactTransfers, redactSettlements or the recurring-bill redactors first. The same rule closes indirect leaks: recording a payment is limited to its two parties, so the "more than they owe" check cannot be used to probe someone else's balance.proxy.ts guards pages and sets a per-request nonce CSP with 'strict-dynamic'. API routes authorize themselves and return JSON 401s instead of HTML redirects./api/health reports whether login and password reset actually work (database reachable, auth secret set, email provider accepting credentials), and provider failures are stored in the database so every instance sees them.| Layer | Choice |
|---|---|
| Framework | Next.js 16 (App Router), React 19, TypeScript (strict) |
| UI | Tailwind CSS, shadcn/ui on Radix, Framer Motion, Lucide icons |
| Data | PostgreSQL via @neondatabase/serverless or pg; Zod validation |
| Auth | NextAuth.js v5 (Credentials, JWT sessions, bcrypt) |
| Resend or SMTP via Nodemailer | |
| Offline | Serwist service worker, Dexie (IndexedDB) |
| Platform | Vercel hosting, Cron, optional KV |
| Testing | Vitest |
Requires Node.js and a PostgreSQL connection string.
git clone https://github.com/taylordrew4u2/Bill-Spilt.git
cd Bill-Spilt
npm install
cp .env.example .env.local # set POSTGRES_URL and AUTH_SECRET at minimum
npm run dev # http://localhost:3000
The schema is created on first request. The service worker is off in development; PWA behavior runs in production builds (npm run build && npm start).
| Command | Purpose |
|---|---|
npm run dev | Development server |
npm run build / npm start | Production build and server |
npm run lint | ESLint |
npm test | Vitest suite |
npm run icons | Regenerate PWA icons |
npm run set-password | Reset a password directly in the database |
npm run migrate-receipts | Move legacy Blob receipts into Postgres |
Environment variables, Vercel deployment, /api/health and the recovery scripts are covered in docs/operations.md.
npm test
70 tests across 8 files, colocated with the code they cover:
| File | Covers |
|---|---|
lib/settlement.test.ts | Split math and minimum-transfer settlement |
lib/visibility.test.ts | Who can see which amount, and who can settle |
lib/payments.test.ts | Venmo and Cash App deep links |
lib/receipts.test.ts | Receipt storage round-trips |
lib/credentials.test.ts, lib/email-health.test.ts | Credential handling and email-provider health |
lib/utils.test.ts, app/api/auth/forgot/route.test.ts | Formatting helpers and the forgot-password route |
app/
(app)/ Home, expenses, settle and stats tabs
(auth)/ Login, register, forgot and reset password
api/ Route handlers (Node runtime)
join/[code]/ One-tap invite entry
guide/ Long-form guides for the marketing site
sw.ts Service worker
components/ Feature components; ui/ holds shadcn/ui primitives
lib/
visibility.ts Who may see which amount
settlement.ts Split and min-cash-flow math
expenses.ts Atomic expense + splits write
db.ts Driver selection and schema bootstrap
sync.ts Offline queue flush
proxy.ts Auth gate and Content-Security-Policy
scripts/ Icon generator, password reset, receipt migration
docs/ Operations guide, screenshots, launch copy