원클릭으로
crdt
Loro CRDT state management with loro-mirror. Use when working on files in src/lib/crdt/.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Loro CRDT state management with loro-mirror. Use when working on files in src/lib/crdt/.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
UI component patterns for React 19, shadcn/ui, and Tailwind. Use when working on files in src/components/.
Playwright E2E testing patterns. Use when working on files in tests/e2e/.
CSV and OFX transaction import parsing. Use when working on files in src/lib/import/.
Real-time sync with Supabase, Loro CRDT, and IndexedDB. Use when working on files in src/lib/sync/.
tRPC v11 API layer with Zod and Ed25519 auth. Use when working on files in src/server/.
Client-side cryptography with libsodium. Use when working on files in src/lib/crypto/.
| name | crdt |
| description | Loro CRDT state management with loro-mirror. Use when working on files in src/lib/crdt/. |
// 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 }
}));
schema.ts, don't redeclaredeletedAt = Temporal.Now.instant(), never remove from documentundefined deletedAt means "not deleted" (falsy check: if (!entity.deletedAt))crypto.randomUUID() for IDs, Temporal.Now.instant() for timestampsrich-schema.ts transforms)Schema fields use richSchema.* helpers that apply bidirectional transforms between CRDT primitives
and domain types. The richSchema factory methods must be generic over O extends SchemaOptions to
preserve required: false optionality.
| richSchema helper | CRDT primitive | Domain type |
|---|---|---|
richSchema.PlainDate() | string | Temporal.PlainDate |
richSchema.Instant() | number | Temporal.Instant |
richSchema.MoneyMinorUnits() | number | MoneyMinorUnits |
richSchema.Percentage() | number | Percentage |
richSchema.CurrencyCode() | string | CurrencyCode |
richSchema.StringEnum(values) | string | Union literal type |
export const entitySchema = schema.LoroMap({
id: schema.String({ required: true }),
name: schema.String({ required: true }),
// Optional fields use { required: false } — value type becomes T | undefined
deletedAt: richSchema.Instant({ required: false })
});
useActiveTransactions() - excludes soft-deleteduseTransactions() - includes soft-deleteduseVaultAction() - for mutations