We built a Splitwise alternative where the link is the account
说明与用途
PeanutSplit 让朋友们在无需创建账户的情况下共享费用,使用单一 URL 作为凭证和数据密钥,具备确定性分摊处理、离线支持和安全实时更新。
问题
Friends will not create accounts, so the room URL must serve as invite, login, and data key.
结果
PeanutSplit allows friends to share expenses without account creation, using a single URL as credential and data key, with deterministic split handling, offline support, and secure real-time updates.
工作流
- Generate 16 random bytes, base64url encode, append to readable stem to form URL
- Use URL as bearer credential; no recovery or owner override
- Store money as strings + BigInt; display only with Number
- Handle equal splits deterministically; test with 300 random rooms
- Lock FX rates at entry; fetch rates via same-origin route
- Queue new expenses offline; replay when online; limit features to avoid CRDT complexity
- Use SSE to notify changes; client refetches data; stream carries no room data
- Route push, FX, receipt model through allowlisted proxy; containers cannot reach internet
证据
If your friends have to make an account, they won't. So the room URL had to be the whole product: the invite, the login and the data key in one string.
The link is a bearer credential. 16 random bytes, base64url, appended to a readable stem. No recovery, no owner override. Treat it like a key.
Money as strings + BigInt. A Number never touches an amount except for display. Equal splits hand out remainders deterministically.
FX locked at entry. Editing an expense never re-prices history. Rates are fetched through a same-origin route so the browser never talks to a second host.
Realtime that leaks nothing. SSE sends "something changed", the client refetches. The stream itself carries no room data.
No egress in prod. Containers can't reach the internet; push, FX and the receipt model go through an allowlisted proxy.
- 记录日期: 2026-10-01T04:08:10.207Z