[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6FA0VFYP4WCDRCMCH2F6BNT":3,"skill-same:01M6FA0VFYP4WCDRCMCH2F6BNT":74},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":39,"linkOnly":40,"markdownContent":41,"markdownBody":42,"frontMatter":43,"refName":51,"commitSha":52,"skillDirectory":53,"forksCount":54,"repositoryHtmlUrl":55,"repositoryHomepageUrl":56,"ownerHtmlUrl":57,"ownerBlogUrl":6,"ownerDescription":58,"updatedAt":59,"install":60,"resources":73},"01M6FA0VFYP4WCDRCMCH2F6BNT","documenso-reference-architecture",null,"Implement Documenso reference architecture with best-practice project layout.\nUse when designing new Documenso integrations, reviewing project structure,\nor establishing architecture standards for document signing applications.\nTrigger with phrases like \"documenso architecture\", \"documenso best practices\",\n\"documenso project structure\", \"how to organize documenso\".","ComeOnOliver\u002Fskillshub","ComeOnOliver","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F43215937?v=4","01M6E5JNFECJAAVFE0W7SMWWD2","Haoran Shu","01M6E5JNNDQS7AJZDYFQ8TPZCK",67,"MIT","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fjeremylongshore\u002Fclaude-code-plugins-plus-skills\u002Fdocumenso-reference-architecture\u002FSKILL.md",[],[19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38],"architecture","documenso","documenso reference architecture","reference","organize","documenso-reference","how to","trigger","io","layout","project","structure","openclaw","standards","read","integrations","how","applications","code","project structure","2026-11-10 10:12:30",false,"---\nname: documenso-reference-architecture\ndescription: |\n  Implement Documenso reference architecture with best-practice project layout.\n  Use when designing new Documenso integrations, reviewing project structure,\n  or establishing architecture standards for document signing applications.\n  Trigger with phrases like \"documenso architecture\", \"documenso best practices\",\n  \"documenso project structure\", \"how to organize documenso\".\nallowed-tools: Read, Grep\nversion: 1.0.0\nlicense: MIT\nauthor: Jeremy Longshore \u003Cjeremy@intentsolutions.io>\ncompatible-with: claude-code, codex, openclaw\ntags: [saas, documenso, documenso-reference]\n\n---\n# Documenso Reference Architecture\n\n## Overview\n\nProduction-ready architecture for Documenso document signing integrations. Covers project layout, layered service architecture, webhook processing, and data flow.\n\n## Prerequisites\n\n- Understanding of layered architecture principles\n- Documenso SDK knowledge (see `documenso-sdk-patterns`)\n- TypeScript project with Node.js 18+\n\n## Recommended Project Structure\n\n```\nmy-signing-app\u002F\n├── src\u002F\n│   ├── documenso\u002F\n│   │   ├── client.ts              # Singleton SDK client\n│   │   ├── errors.ts              # Custom error classes\n│   │   ├── retry.ts               # Retry\u002Fbackoff logic\n│   │   └── types.ts               # Shared types\n│   ├── services\u002F\n│   │   ├── document-service.ts    # Document CRUD operations\n│   │   ├── template-service.ts    # Template-based workflows\n│   │   └── signing-service.ts     # Orchestrates signing flows\n│   ├── webhooks\u002F\n│   │   ├── handler.ts             # Express webhook router\n│   │   ├── verify.ts              # Secret verification\n│   │   └── processors\u002F\n│   │       ├── document-completed.ts\n│   │       ├── document-signed.ts\n│   │       └── document-rejected.ts\n│   ├── api\u002F\n│   │   ├── health.ts              # Health check endpoint\n│   │   └── routes.ts              # API routes\n│   └── config\u002F\n│       └── index.ts               # Environment configuration\n├── scripts\u002F\n│   ├── verify-connection.ts       # Quick health check\n│   ├── create-test-doc.ts         # Test document generator\n│   └── cleanup-test-docs.ts       # Test data cleanup\n├── tests\u002F\n│   ├── unit\u002F\n│   │   └── document-service.test.ts\n│   ├── integration\u002F\n│   │   └── document-lifecycle.test.ts\n│   └── mocks\u002F\n│       └── documenso.ts           # Mock client factory\n├── .env.development\n├── .env.production\n├── docker-compose.yml             # Self-hosted Documenso (dev)\n└── package.json\n```\n\n## Layer Architecture\n\n```\n┌─────────────────────────────────────────────────────────┐\n│  API \u002F Controllers                                       │\n│  Routes, request validation, response formatting         │\n├─────────────────────────────────────────────────────────┤\n│  Service Layer                                           │\n│  Business logic, orchestration, authorization            │\n│  (document-service, template-service, signing-service)   │\n├─────────────────────────────────────────────────────────┤\n│  Documenso Client Layer                                  │\n│  SDK wrapper, retry, error handling, caching             │\n│  (client.ts, retry.ts, errors.ts)                       │\n├─────────────────────────────────────────────────────────┤\n│  External Services                                       │\n│  Documenso API, S3\u002FGCS storage, email, database         │\n└─────────────────────────────────────────────────────────┘\n```\n\n**Rules:**\n- Controllers never call Documenso directly -- always go through services\n- Services never import `@documenso\u002Fsdk-typescript` directly -- use the client wrapper\n- Webhook processors are isolated -- one file per event type\n- Error handling happens at the client layer, not in controllers\n\n## Data Flow\n\n```\nUser Request\n     │\n     ▼\n┌──────────┐   POST \u002Fapi\u002Fsign\n│   API    │──────────────────────────────┐\n│  Router  │                              │\n└──────────┘                              ▼\n                                   ┌──────────────┐\n                                   │   Signing    │\n                                   │   Service    │\n                                   └──────┬───────┘\n                                          │\n                    ┌─────────────────────┼─────────────────────┐\n                    ▼                     ▼                     ▼\n             ┌──────────┐         ┌──────────┐          ┌──────────┐\n             │ Template │         │ Document │          │   Your   │\n             │ Service  │         │ Service  │          │    DB    │\n             └────┬─────┘         └────┬─────┘          └──────────┘\n                  │                    │\n                  └────────┬───────────┘\n                           ▼\n                    ┌──────────────┐\n                    │  Documenso   │\n                    │  Client      │──→ Documenso API\n                    │  (singleton) │\n                    └──────────────┘\n\nWebhook Flow:\nDocumenso API ──POST──→ \u002Fwebhooks\u002Fdocumenso\n                             │\n                        ┌────▼────┐\n                        │ Verify  │──→ Check X-Documenso-Secret\n                        │ Secret  │\n                        └────┬────┘\n                             │\n                        ┌────▼────┐\n                        │ Router  │──→ Route by event type\n                        └────┬────┘\n                             │\n              ┌──────────────┼──────────────┐\n              ▼              ▼              ▼\n        completed.ts    signed.ts     rejected.ts\n        (archive PDF)  (update DB)  (alert sender)\n```\n\n## Setup Script\n\n```bash\n#!\u002Fbin\u002Fbash\nset -euo pipefail\n\nmkdir -p src\u002F{documenso,services,webhooks\u002Fprocessors,api,config}\nmkdir -p scripts tests\u002F{unit,integration,mocks}\n\n# Create .env.example\ncat > .env.example \u003C\u003C 'EOF'\nDOCUMENSO_API_KEY=\nDOCUMENSO_BASE_URL=https:\u002F\u002Fapp.documenso.com\u002Fapi\u002Fv2\nDOCUMENSO_WEBHOOK_SECRET=\nLOG_LEVEL=info\nNODE_ENV=development\nEOF\n\necho \"Project scaffolded. Copy .env.example to .env and fill in values.\"\n```\n\n## Key Design Decisions\n\n| Decision | Rationale |\n|----------|-----------|\n| Singleton client | Avoids re-initialization overhead per request |\n| Service layer | Separates business logic from API details |\n| One processor per webhook event | Isolates side effects, easy to test |\n| Mock client for tests | Fast unit tests without API calls |\n| Template-first approach | Fewer API calls, consistent field placement |\n\n## Error Handling\n\n| Issue | Cause | Solution |\n|-------|-------|----------|\n| Circular dependencies | Wrong layering | Services import client, never the reverse |\n| Config not loading | Wrong env file | Verify `NODE_ENV` matches config loader |\n| Webhook processor crash | Unhandled error in processor | Wrap each processor in try\u002Fcatch |\n| Test isolation | Shared client state | Call `resetClient()` in `beforeEach` |\n\n## Resources\n\n- [Clean Architecture](https:\u002F\u002Fblog.cleancoder.com\u002Funcle-bob\u002F2012\u002F08\u002F13\u002Fthe-clean-architecture.html)\n- [Documenso SDK](https:\u002F\u002Fgithub.com\u002Fdocumenso\u002Fsdk-typescript)\n- [12-Factor App](https:\u002F\u002F12factor.net\u002F)\n\n## Next Steps\n\nFor multi-environment setup, see `documenso-multi-env-setup`.\n\n","# Documenso Reference Architecture\n\n## Overview\n\nProduction-ready architecture for Documenso document signing integrations. Covers project layout, layered service architecture, webhook processing, and data flow.\n\n## Prerequisites\n\n- Understanding of layered architecture principles\n- Documenso SDK knowledge (see `documenso-sdk-patterns`)\n- TypeScript project with Node.js 18+\n\n## Recommended Project Structure\n\n```\nmy-signing-app\u002F\n├── src\u002F\n│   ├── documenso\u002F\n│   │   ├── client.ts              # Singleton SDK client\n│   │   ├── errors.ts              # Custom error classes\n│   │   ├── retry.ts               # Retry\u002Fbackoff logic\n│   │   └── types.ts               # Shared types\n│   ├── services\u002F\n│   │   ├── document-service.ts    # Document CRUD operations\n│   │   ├── template-service.ts    # Template-based workflows\n│   │   └── signing-service.ts     # Orchestrates signing flows\n│   ├── webhooks\u002F\n│   │   ├── handler.ts             # Express webhook router\n│   │   ├── verify.ts              # Secret verification\n│   │   └── processors\u002F\n│   │       ├── document-completed.ts\n│   │       ├── document-signed.ts\n│   │       └── document-rejected.ts\n│   ├── api\u002F\n│   │   ├── health.ts              # Health check endpoint\n│   │   └── routes.ts              # API routes\n│   └── config\u002F\n│       └── index.ts               # Environment configuration\n├── scripts\u002F\n│   ├── verify-connection.ts       # Quick health check\n│   ├── create-test-doc.ts         # Test document generator\n│   └── cleanup-test-docs.ts       # Test data cleanup\n├── tests\u002F\n│   ├── unit\u002F\n│   │   └── document-service.test.ts\n│   ├── integration\u002F\n│   │   └── document-lifecycle.test.ts\n│   └── mocks\u002F\n│       └── documenso.ts           # Mock client factory\n├── .env.development\n├── .env.production\n├── docker-compose.yml             # Self-hosted Documenso (dev)\n└── package.json\n```\n\n## Layer Architecture\n\n```\n┌─────────────────────────────────────────────────────────┐\n│  API \u002F Controllers                                       │\n│  Routes, request validation, response formatting         │\n├─────────────────────────────────────────────────────────┤\n│  Service Layer                                           │\n│  Business logic, orchestration, authorization            │\n│  (document-service, template-service, signing-service)   │\n├─────────────────────────────────────────────────────────┤\n│  Documenso Client Layer                                  │\n│  SDK wrapper, retry, error handling, caching             │\n│  (client.ts, retry.ts, errors.ts)                       │\n├─────────────────────────────────────────────────────────┤\n│  External Services                                       │\n│  Documenso API, S3\u002FGCS storage, email, database         │\n└─────────────────────────────────────────────────────────┘\n```\n\n**Rules:**\n- Controllers never call Documenso directly -- always go through services\n- Services never import `@documenso\u002Fsdk-typescript` directly -- use the client wrapper\n- Webhook processors are isolated -- one file per event type\n- Error handling happens at the client layer, not in controllers\n\n## Data Flow\n\n```\nUser Request\n     │\n     ▼\n┌──────────┐   POST \u002Fapi\u002Fsign\n│   API    │──────────────────────────────┐\n│  Router  │                              │\n└──────────┘                              ▼\n                                   ┌──────────────┐\n                                   │   Signing    │\n                                   │   Service    │\n                                   └──────┬───────┘\n                                          │\n                    ┌─────────────────────┼─────────────────────┐\n                    ▼                     ▼                     ▼\n             ┌──────────┐         ┌──────────┐          ┌──────────┐\n             │ Template │         │ Document │          │   Your   │\n             │ Service  │         │ Service  │          │    DB    │\n             └────┬─────┘         └────┬─────┘          └──────────┘\n                  │                    │\n                  └────────┬───────────┘\n                           ▼\n                    ┌──────────────┐\n                    │  Documenso   │\n                    │  Client      │──→ Documenso API\n                    │  (singleton) │\n                    └──────────────┘\n\nWebhook Flow:\nDocumenso API ──POST──→ \u002Fwebhooks\u002Fdocumenso\n                             │\n                        ┌────▼────┐\n                        │ Verify  │──→ Check X-Documenso-Secret\n                        │ Secret  │\n                        └────┬────┘\n                             │\n                        ┌────▼────┐\n                        │ Router  │──→ Route by event type\n                        └────┬────┘\n                             │\n              ┌──────────────┼──────────────┐\n              ▼              ▼              ▼\n        completed.ts    signed.ts     rejected.ts\n        (archive PDF)  (update DB)  (alert sender)\n```\n\n## Setup Script\n\n```bash\n#!\u002Fbin\u002Fbash\nset -euo pipefail\n\nmkdir -p src\u002F{documenso,services,webhooks\u002Fprocessors,api,config}\nmkdir -p scripts tests\u002F{unit,integration,mocks}\n\n# Create .env.example\ncat > .env.example \u003C\u003C 'EOF'\nDOCUMENSO_API_KEY=\nDOCUMENSO_BASE_URL=https:\u002F\u002Fapp.documenso.com\u002Fapi\u002Fv2\nDOCUMENSO_WEBHOOK_SECRET=\nLOG_LEVEL=info\nNODE_ENV=development\nEOF\n\necho \"Project scaffolded. Copy .env.example to .env and fill in values.\"\n```\n\n## Key Design Decisions\n\n| Decision | Rationale |\n|----------|-----------|\n| Singleton client | Avoids re-initialization overhead per request |\n| Service layer | Separates business logic from API details |\n| One processor per webhook event | Isolates side effects, easy to test |\n| Mock client for tests | Fast unit tests without API calls |\n| Template-first approach | Fewer API calls, consistent field placement |\n\n## Error Handling\n\n| Issue | Cause | Solution |\n|-------|-------|----------|\n| Circular dependencies | Wrong layering | Services import client, never the reverse |\n| Config not loading | Wrong env file | Verify `NODE_ENV` matches config loader |\n| Webhook processor crash | Unhandled error in processor | Wrap each processor in try\u002Fcatch |\n| Test isolation | Shared client state | Call `resetClient()` in `beforeEach` |\n\n## Resources\n\n- [Clean Architecture](https:\u002F\u002Fblog.cleancoder.com\u002Funcle-bob\u002F2012\u002F08\u002F13\u002Fthe-clean-architecture.html)\n- [Documenso SDK](https:\u002F\u002Fgithub.com\u002Fdocumenso\u002Fsdk-typescript)\n- [12-Factor App](https:\u002F\u002F12factor.net\u002F)\n\n## Next Steps\n\nFor multi-environment setup, see `documenso-multi-env-setup`.\n\n",{"name":5,"tags":44,"author":46,"license":15,"version":47,"description":48,"allowed-tools":49,"compatible-with":50},[45,20,24],"saas","Jeremy Longshore \u003Cjeremy@intentsolutions.io>","1.0.0","Implement Documenso reference architecture with best-practice project layout.\nUse when designing new Documenso integrations, reviewing project structure,\nor establishing architecture standards for document signing applications.\nTrigger with phrases like \"documenso architecture\", \"documenso best practices\",\n\"documenso project structure\", \"how to organize documenso\".\n","Read, Grep","claude-code, codex, openclaw","main","def8531e65114c0fca8fb8551c1871ee0eed705c","skills\u002Fjeremylongshore\u002Fclaude-code-plugins-plus-skills\u002Fdocumenso-reference-architecture",24,"https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub","https:\u002F\u002Fskillshub.wtf","https:\u002F\u002Fgithub.com\u002FComeOnOliver","AI & Blockchain Engineer\r\n","2026-06-24 22:07:19",{"source":8,"skillName":5,"commands":61,"prompt":71,"zipAvailable":72},[62,65,68],{"tool":63,"command":64},"npx","npx skills add ComeOnOliver\u002Fskillshub --skill documenso-reference-architecture",{"tool":66,"command":67},"bunx","bunx skills add ComeOnOliver\u002Fskillshub --skill documenso-reference-architecture",{"tool":69,"command":70},"pnpm","pnpm dlx skills add ComeOnOliver\u002Fskillshub --skill documenso-reference-architecture","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fjeremylongshore\u002Fclaude-code-plugins-plus-skills\u002Fdocumenso-reference-architecture\u002FSKILL.md",true,[],[75,89,99,108,114,121],{"skillNo":76,"name":77,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":78,"categories":79,"keywords":85,"publishedAt":39},"01M6FKJN13GMG4KY57J3QD8GY5","model-hierarchy-skill","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzscole\u002Fmodel-hierarchy-skill\u002Fmodel-hierarchy-skill\u002FSKILL.md",[80],{"categoryNo":81,"categoryName":82,"taxonomyType":83,"taxonomyTypeDesc":84},"01JBSEEDCAT000000000000023","Skill与智能体开发","SCENARIO","使用场景",[86,87,88],"model","model hierarchy","model hierarchy skill",{"skillNo":90,"name":91,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":92,"categories":93,"keywords":95,"publishedAt":39},"01M6FKJJJ6GCAMR4PPPRD12M5X","zoom-mcp","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fzoom-mcp\u002FSKILL.md",[94],{"categoryNo":81,"categoryName":82,"taxonomyType":83,"taxonomyTypeDesc":84},[96,97,98],"MCP","zoom","zoom mcp",{"skillNo":100,"name":101,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":102,"categories":103,"keywords":104,"publishedAt":39},"01M6FKJE3KYT3KPEZMEEHYKA6K","zoom-apps-sdk","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fzoom-apps-sdk\u002FSKILL.md",[],[105,106,107,97],"sdk","zoom apps sdk","apps",{"skillNo":109,"name":110,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":111,"categories":112,"keywords":113,"publishedAt":39},"01M6FKJ9EDH9Q5VWDF8HAJRSP0","windows","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwindows\u002FSKILL.md",[],[110],{"skillNo":115,"name":116,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":117,"categories":118,"keywords":120,"publishedAt":39},"01M6FKJ666BEEFC3AE9GJ72Q93","whiteboard","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwhiteboard\u002FSKILL.md",[119],{"categoryNo":81,"categoryName":82,"taxonomyType":83,"taxonomyTypeDesc":84},[116],{"skillNo":122,"name":123,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":124,"categories":125,"keywords":126,"publishedAt":39},"01M6FKJ21WFCDGTJQ2Q91T9DVW","websockets","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwebsockets\u002FSKILL.md",[],[123]]