← Back to list

crdt
by bentefay
A web app to help you understand where your money is going.
⭐ 2🍴 0📅 Jan 10, 2026
SKILL.md
name: crdt description: Loro CRDT state management with loro-mirror. Use when working on files in src/lib/crdt/.
CRDT Guidelines
Critical: Draft-Style Mutations Only
// CORRECT - mutate in place
setState((state) => {
state.transactions[id] = transaction;
});
// WRONG - returning new objects breaks change tracking
setState((state) => ({
...state,
transactions: { ...state.transactions, [id]: transaction },
}));
Rules
- Import types from
schema.ts, don't redeclare - Soft deletes: Set
deletedAttimestamp, never remove from document - Use
crypto.randomUUID()for IDs,Date.now()for timestamps
Schema Pattern
export const entitySchema = schema.LoroMap({
id: schema.String({ required: true }),
// ... fields
deletedAt: schema.Number(), // 0 = not deleted, >0 = timestamp
});
React Hooks
useActiveTransactions()- excludes soft-deleteduseTransactions()- includes soft-deleteduseVaultAction()- for mutations
Sync
- Updates encrypted before leaving client
- Loro handles versioning via version vectors
- Conflicts: last-write-wins per field
Score
Total Score
50/100
Based on repository quality metrics
✓SKILL.md
SKILL.mdファイルが含まれている
+20
○LICENSE
ライセンスが設定されている
0/10
○説明文
100文字以上の説明がある
0/10
○人気
GitHub Stars 100以上
0/15
○最近の活動
3ヶ月以内に更新がある
0/10
○フォーク
10回以上フォークされている
0/5
✓Issue管理
オープンIssueが50未満
+5
✓言語
プログラミング言語が設定されている
+5
○タグ
1つ以上のタグが設定されている
0/5
Reviews
💬
Reviews coming soon