Back to list
bentefay

trpc

by bentefay

A web app to help you understand where your money is going.

2🍴 0📅 Jan 10, 2026

SKILL.md


name: trpc description: tRPC v11 API layer with Zod and Ed25519 auth. Use when working on files in src/server/.

tRPC Guidelines

Authentication

All authenticated procedures verify Ed25519 signatures:

  • Verify signature matches pubkeyHash
  • Verify timestamp is recent (prevent replay)
  • Verify message matches request

Patterns

Router:

export const vaultRouter = router({
  create: authedProcedure
    .input(createVaultSchema)
    .mutation(async ({ ctx, input }) => { ... }),
});

Schema:

export const createVaultSchema = z.object({
  name: z.string().min(1).max(100),
  encryptedSnapshot: z.string(),
  wrappedKey: z.string(),
});

Critical Rules

  1. Never trust client data - always validate with Zod
  2. Never store unencrypted data - all sensitive data comes pre-encrypted
  3. Verify signatures - every mutation must be signed
  4. Check permissions - verify user has vault access
  5. Use transactions - wrap multi-step operations

Error Handling

throw new TRPCError({
  code: "NOT_FOUND", // or "FORBIDDEN"
  message: "Vault not found",
});

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