sundaydev-arch
@sundaydev-arch
Public Skills
schema-zod
by sundaydev-arch
Use when changing Prisma models/enums, reading or writing any Json column, or adding validation for external input (API bodies / forms / env). Requires a paired zod schema per Json column, forbids raw type assertions, and defines how coordinates/rules are unpacked and how immutable versioned models may change.
audit-security
by sundaydev-arch
Use when a new write needs an audit, when returning API errors, when handling passwords/tokens/uploads, or when doing a security self-review. Hash chain is append-only; action code + params; IP/UA capture; error codes; upload checks; company seals never sent to clients.
state-machines
by sundaydev-arch
Use for any transition of approval, signing, or signer status (approve/reject/sign/decline/expire/revoke/sequential-sign round). Status may change only via transition tables; defines transaction boundaries, independence of the two machines, and where company-seal-requires-approval is enforced.
auth-rbac
by sundaydev-arch
Use for login sessions, role checks, user admin, login-free SigningToken, file access auth, and middleware allowlists. Splits Edge vs Node config, uses a single backend auth entry, stores only token hashes, and keeps used tokens read-only.
providers
by sundaydev-arch
Use when adding or replacing signature, identity, notify, or storage implementations (e.g. PAdES/national crypto, face, DingTalk/Feishu, AWS S3/OSS/COS). Business code depends only on interfaces; registry factory usage; stage-2 empty implementations; do not build compliance features early.
shadcn-forms
by sundaydev-arch
Use when creating or changing form pages, dialog forms, list/detail/empty/error layouts, button loading feedback, or responsive pages. Prefer installed shadcn/ui components; react-hook-form+zod is the only form pattern; defines Form composition, one primary button per page, and desktop enterprise layout.
api-conventions
by sundaydev-arch
Use when adding or changing any Route Handler, dynamic page params/searchParams, unified response and error shape, paginated lists, or file-download headers. try/catch sink, Next 15 Promise params, zod at the boundary, list filter auth and pagination direction.
i18n
by sundaydev-arch
Use when adding or changing any user-visible copy (pages, components, email, notifications, error display), date/time/number/currency formatting, language switching, or message files. Forbids hardcoded copy and string concatenation; requires ICU MessageFormat, identical keys in both languages, and UI locale separate from document locale.
pdf-pipeline
by sundaydev-arch
Use for template field coordinates, PDF fill, font embedding, stamps, watermarks, handwriting overlay, and document version generation. PDFs are mutated only on the backend; defines coordinate origin, storageKey version naming, no overwrite of versions, and frontend preview/drag only.