@friehub/blueprint 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (138) hide show
  1. package/.github/workflows/ci.yml +122 -0
  2. package/.github/workflows/publish.yml +24 -0
  3. package/README.md +266 -0
  4. package/adapters/analytics/amplitude.yaml +44 -0
  5. package/adapters/analytics/mixpanel.yaml +47 -0
  6. package/adapters/analytics/segment.yaml +40 -0
  7. package/adapters/auth/auth0.yaml +56 -0
  8. package/adapters/auth/clerk.yaml +53 -0
  9. package/adapters/auth/supertokens.yaml +55 -0
  10. package/adapters/billing/paddle.yaml +57 -0
  11. package/adapters/billing/stripe.yaml +49 -0
  12. package/adapters/caching/memcached.yaml +28 -0
  13. package/adapters/caching/redis.yaml +37 -0
  14. package/adapters/chargebacks/chargebacks911.yaml +45 -0
  15. package/adapters/chargebacks/stripe.yaml +45 -0
  16. package/adapters/crm_leads/hubspot.yaml +43 -0
  17. package/adapters/crm_leads/salesforce.yaml +60 -0
  18. package/adapters/customer_support/intercom.yaml +44 -0
  19. package/adapters/customer_support/zendesk.yaml +51 -0
  20. package/adapters/donations/paypal.yaml +47 -0
  21. package/adapters/donations/stripe.yaml +47 -0
  22. package/adapters/emails/mailgun.yaml +47 -0
  23. package/adapters/emails/resend.yaml +43 -0
  24. package/adapters/emails/sendgrid.yaml +43 -0
  25. package/adapters/error_tracking/bugsnag.yaml +52 -0
  26. package/adapters/error_tracking/sentry.yaml +58 -0
  27. package/adapters/feature_flags/flagsmith.yaml +41 -0
  28. package/adapters/feature_flags/launchdarkly.yaml +41 -0
  29. package/adapters/feature_flags/unleash.yaml +41 -0
  30. package/adapters/fraud_detection/riskified.yaml +41 -0
  31. package/adapters/fraud_detection/sift.yaml +40 -0
  32. package/adapters/fulfillment/easyship.yaml +51 -0
  33. package/adapters/fulfillment/shipengine.yaml +51 -0
  34. package/adapters/incident_management/opsgenie.yaml +49 -0
  35. package/adapters/incident_management/pagerduty.yaml +48 -0
  36. package/adapters/invoicing/freshbooks.yaml +54 -0
  37. package/adapters/invoicing/stripe.yaml +47 -0
  38. package/adapters/ip_intelligence/ipinfo.yaml +37 -0
  39. package/adapters/ip_intelligence/maxmind.yaml +39 -0
  40. package/adapters/jobs/bullmq.yaml +54 -0
  41. package/adapters/jobs/temporal.yaml +53 -0
  42. package/adapters/kyc/jumio.yaml +54 -0
  43. package/adapters/kyc/onfido.yaml +53 -0
  44. package/adapters/media/cloudinary.yaml +48 -0
  45. package/adapters/media/imgix.yaml +47 -0
  46. package/adapters/notifications/firebase.yaml +45 -0
  47. package/adapters/notifications/novu.yaml +46 -0
  48. package/adapters/notifications/onesignal.yaml +45 -0
  49. package/adapters/payments/adyen.yaml +46 -0
  50. package/adapters/payments/paystack.yaml +45 -0
  51. package/adapters/payments/stripe.yaml +49 -0
  52. package/adapters/payouts/paypal.yaml +49 -0
  53. package/adapters/payouts/stripe.yaml +49 -0
  54. package/adapters/projects/asana.yaml +49 -0
  55. package/adapters/projects/jira.yaml +58 -0
  56. package/adapters/projects/linear.yaml +49 -0
  57. package/adapters/queues/bullmq.yaml +47 -0
  58. package/adapters/queues/rabbitmq.yaml +51 -0
  59. package/adapters/queues/sqs.yaml +45 -0
  60. package/adapters/rate_limiting/cloudflare.yaml +37 -0
  61. package/adapters/rate_limiting/upstash.yaml +35 -0
  62. package/adapters/search/algolia.yaml +39 -0
  63. package/adapters/search/meilisearch.yaml +39 -0
  64. package/adapters/search/typesense.yaml +42 -0
  65. package/adapters/shipping/easyship.yaml +45 -0
  66. package/adapters/shipping/shipengine.yaml +45 -0
  67. package/adapters/sms/twilio.yaml +41 -0
  68. package/adapters/sms/vonage.yaml +41 -0
  69. package/adapters/storage/azure-blob.yaml +42 -0
  70. package/adapters/storage/gcs.yaml +41 -0
  71. package/adapters/storage/s3.yaml +49 -0
  72. package/adapters/subscriptions/chargebee.yaml +32 -0
  73. package/adapters/subscriptions/stripe.yaml +37 -0
  74. package/adapters/tasks/asana.yaml +50 -0
  75. package/adapters/tasks/jira.yaml +59 -0
  76. package/adapters/tasks/linear.yaml +50 -0
  77. package/adapters/taxation/avalara.yaml +52 -0
  78. package/adapters/taxation/taxjar.yaml +48 -0
  79. package/adapters/trace_query/datadog.yaml +49 -0
  80. package/adapters/trace_query/honeycomb.yaml +42 -0
  81. package/adapters/trace_query/jaeger.yaml +42 -0
  82. package/adapters/web_analytics/google-analytics.yaml +42 -0
  83. package/adapters/web_analytics/plausible.yaml +34 -0
  84. package/adapters/web_analytics/posthog.yaml +34 -0
  85. package/adapters/webhooks/relay.yaml +35 -0
  86. package/adapters/webhooks/svix.yaml +41 -0
  87. package/blueprint.json +5 -0
  88. package/blueprinter_system_design.svg +139 -0
  89. package/catalog.json +37943 -0
  90. package/dist/cli/commands.js +362 -0
  91. package/dist/cli/help.js +211 -0
  92. package/dist/cli/render.js +109 -0
  93. package/dist/cli.js +69 -0
  94. package/dist/core/adapters/adapter-audit.test.js +85 -0
  95. package/dist/core/adapters/adapter.test.js +66 -0
  96. package/dist/core/adapters/index.js +4 -0
  97. package/dist/core/adapters/load.js +131 -0
  98. package/dist/core/adapters/resolve.js +78 -0
  99. package/dist/core/adapters/select.js +80 -0
  100. package/dist/core/adapters/types.js +1 -0
  101. package/dist/core/adapters/validate.js +121 -0
  102. package/dist/core/catalog.js +3 -0
  103. package/dist/core/collectors.js +126 -0
  104. package/dist/core/discovery.js +57 -0
  105. package/dist/core/edge-cases.test.js +147 -0
  106. package/dist/core/envelope.js +1 -0
  107. package/dist/core/graph.js +123 -0
  108. package/dist/core/graph.test.js +62 -0
  109. package/dist/core/implement.js +48 -0
  110. package/dist/core/index.js +9 -0
  111. package/dist/core/load-catalog.js +24 -0
  112. package/dist/core/parse-document.js +114 -0
  113. package/dist/core/parse-document.test.js +104 -0
  114. package/dist/core/parser.js +6 -0
  115. package/dist/core/parser.test.js +134 -0
  116. package/dist/core/resolve.js +119 -0
  117. package/dist/core/resolve.test.js +108 -0
  118. package/dist/core/scanner.js +163 -0
  119. package/dist/core/search.js +34 -0
  120. package/dist/core/search.test.js +43 -0
  121. package/dist/core/section-body.js +258 -0
  122. package/dist/core/sections.js +53 -0
  123. package/dist/core/verify-implement.test.js +123 -0
  124. package/dist/core/verify.js +156 -0
  125. package/dist/generators/engine.js +86 -0
  126. package/dist/generators/generator.test.js +112 -0
  127. package/dist/generators/index.js +3 -0
  128. package/dist/generators/prototype/index.js +242 -0
  129. package/dist/generators/render.js +146 -0
  130. package/dist/generators/types.js +124 -0
  131. package/dist/generators/typescript/helpers.js +125 -0
  132. package/dist/generators/typescript/index.js +206 -0
  133. package/dist/index.js +8 -0
  134. package/dist/mcp/server.js +202 -0
  135. package/dist/mcp/server.test.js +136 -0
  136. package/dist/utils/args.js +142 -0
  137. package/package.json +38 -0
  138. package/tsconfig.json +16 -0
@@ -0,0 +1,122 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
+ branches: [main]
8
+
9
+ jobs:
10
+ audit:
11
+ runs-on: ubuntu-latest
12
+ steps:
13
+ - uses: actions/checkout@v4
14
+ - uses: actions/setup-node@v4
15
+ with:
16
+ node-version: 20
17
+ cache: npm
18
+ - run: npm ci
19
+ - run: npm run build
20
+ - name: System audit
21
+ run: |
22
+ node -e "
23
+ const {loadCatalogFromRoot} = require('./dist/core/load-catalog.js');
24
+ const {loadAdapters} = require('./dist/core/adapters/load.js');
25
+ const {validateAdapter} = require('./dist/core/adapters/validate.js');
26
+
27
+ async function audit() {
28
+ let failed = false;
29
+ const catalog = await loadCatalogFromRoot(process.cwd(), 'loose');
30
+
31
+ console.log('Modules:', catalog.value?.modules.length);
32
+ console.log('Core:', catalog.value?.core.length);
33
+ console.log('Parse errors:', catalog.issues.filter(i => i.severity === 'error').length);
34
+
35
+ const {adapters, errors: loadErrors} = await loadAdapters('./adapters');
36
+ console.log('Adapters:', adapters.length);
37
+ console.log('Load errors:', loadErrors.length);
38
+
39
+ let validationErrors = 0;
40
+ for (const adapter of adapters) {
41
+ const result = validateAdapter(adapter, catalog.value);
42
+ validationErrors += result.issues.filter(i => i.severity === 'error').length;
43
+ }
44
+ console.log('Validation errors:', validationErrors);
45
+
46
+ if (catalog.issues.filter(i => i.severity === 'error').length > 0) { console.error('FAIL: parse errors'); failed = true; }
47
+ if (loadErrors.length > 0) { console.error('FAIL: load errors'); failed = true; }
48
+ if (validationErrors > 0) { console.error('FAIL: validation errors'); failed = true; }
49
+ if (catalog.value?.modules.length !== 108) { console.error('FAIL: expect 108 modules, got ' + catalog.value?.modules.length); failed = true; }
50
+ if (catalog.value?.core.length !== 3) { console.error('FAIL: expect 3 core, got ' + catalog.value?.core.length); failed = true; }
51
+ if (adapters.length < 82) { console.error('FAIL: expect at least 82 adapters'); failed = true; }
52
+
53
+ if (failed) process.exit(1);
54
+ console.log('AUDIT PASSED');
55
+ }
56
+ audit();
57
+ "
58
+
59
+ test:
60
+ runs-on: ubuntu-latest
61
+ strategy:
62
+ matrix:
63
+ node-version: [18, 20, 22]
64
+ steps:
65
+ - uses: actions/checkout@v4
66
+ - uses: actions/setup-node@v4
67
+ with:
68
+ node-version: ${{ matrix.node-version }}
69
+ cache: npm
70
+ - run: npm ci
71
+ - run: npm test
72
+
73
+ integration:
74
+ runs-on: ubuntu-latest
75
+ needs: [audit, test]
76
+ steps:
77
+ - uses: actions/checkout@v4
78
+ - uses: actions/setup-node@v4
79
+ with:
80
+ node-version: 20
81
+ cache: npm
82
+ - run: npm ci
83
+ - name: Integration test
84
+ run: |
85
+ npm run build
86
+
87
+ # 1. Select adapters
88
+ node dist/cli.js adapters add stripe payments
89
+ node dist/cli.js adapters add redis caching
90
+ node dist/cli.js adapters add bullmq queues
91
+
92
+ # 2. Generate code for selected modules
93
+ node dist/cli.js generate --lang typescript --module payments --output /tmp/integration
94
+ node dist/cli.js generate --lang typescript --module caching --output /tmp/integration
95
+ node dist/cli.js generate --lang typescript --module queues --output /tmp/integration
96
+
97
+ # 3. Verify generated files exist
98
+ test -f /tmp/integration/interfaces/shared.ts || { echo 'FAIL: shared types missing'; exit 1; }
99
+ test -f /tmp/integration/interfaces/payments.ts || { echo 'FAIL: payments interface missing'; exit 1; }
100
+ test -f /tmp/integration/adapters/payments/stripe.ts || { echo 'FAIL: stripe adapter missing'; exit 1; }
101
+ test -f /tmp/integration/adapters/caching/redis.ts || { echo 'FAIL: redis adapter missing'; exit 1; }
102
+ test -f /tmp/integration/adapters/queues/bullmq.ts || { echo 'FAIL: bullmq adapter missing'; exit 1; }
103
+
104
+ # 4. Verify generated adapters implement all contract methods
105
+ node dist/cli.js verify /tmp/integration/adapters/payments/stripe.ts --module payments
106
+ node dist/cli.js verify /tmp/integration/adapters/caching/redis.ts --module caching
107
+ node dist/cli.js verify /tmp/integration/adapters/queues/bullmq.ts --module queues
108
+
109
+ # 5. Generate prototype
110
+ node dist/cli.js prototype --name test-project --output /tmp/test-project
111
+
112
+ # 6. Verify prototype files exist
113
+ test -f /tmp/test-project/package.json || { echo 'FAIL: package.json missing'; exit 1; }
114
+ test -f /tmp/test-project/tsconfig.json || { echo 'FAIL: tsconfig.json missing'; exit 1; }
115
+ test -f /tmp/test-project/src/config/adapters.ts || { echo 'FAIL: adapters config missing'; exit 1; }
116
+
117
+ # 7. Verify package.json has correct dependencies
118
+ grep -q "stripe" /tmp/test-project/package.json || { echo 'FAIL: stripe dependency missing'; exit 1; }
119
+ grep -q "redis" /tmp/test-project/package.json || { echo 'FAIL: redis dependency missing'; exit 1; }
120
+ grep -q "bullmq" /tmp/test-project/package.json || { echo 'FAIL: bullmq dependency missing'; exit 1; }
121
+
122
+ echo "INTEGRATION TESTS PASSED"
@@ -0,0 +1,24 @@
1
+ name: Publish to npm
2
+
3
+ on:
4
+ release:
5
+ types: [published]
6
+
7
+ jobs:
8
+ publish:
9
+ runs-on: ubuntu-latest
10
+ permissions:
11
+ contents: read
12
+ steps:
13
+ - uses: actions/checkout@v4
14
+ - uses: actions/setup-node@v4
15
+ with:
16
+ node-version: 20
17
+ registry-url: 'https://registry.npmjs.org'
18
+ - run: npm ci
19
+ - run: npm run build
20
+ - run: npm test
21
+ - name: Publish
22
+ run: npm publish --access public
23
+ env:
24
+ NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
package/README.md ADDED
@@ -0,0 +1,266 @@
1
+ # Engineering Blueprinter
2
+
3
+ ## A Provider-Agnostic Interface Specification for AI-Assisted Backend Development
4
+
5
+ Every backend system is an assembly of recurring domain problems: payments, notifications, auth, caching. The implementations differ. The interface does not.
6
+
7
+ This catalogue defines those interfaces -- function signatures, types, and error contracts for 108 backend domain modules. Each contract is:
8
+
9
+ - **Provider-agnostic** -- Stripe, Twilio, or S3. Pick any
10
+ - **Language-portable** -- TypeScript types, Rust traits, Python protocols, Go interfaces
11
+ - **AI-consumable** -- no ambiguous prose, just structured data
12
+ - **Versioned** -- semver discipline, adapters declare compatible versions
13
+
14
+ ---
15
+
16
+ ## Why Blueprinter?
17
+
18
+ | Task | Raw Markdown | Blueprinter |
19
+ |---|---|---|
20
+ | Get module contract | Read 108 `.md` files, parse `→` by eye | `loadCatalog()`, 1 call |
21
+ | Parameter types | Guess from context | `order_id: string`, `amount: number` inferred |
22
+ | Dependencies | Scan prose for "Depends On" | `hardDeps: ["payments", "users"]` resolved |
23
+ | Transitive deps | Trace manually across files | `resolve(["billing"])` walks entire graph |
24
+ | Available providers | Search for "Providers" section | `adapters list payments` shows 3 options |
25
+ | Write types | Manually from scratch | Generated interfaces with full SDK code |
26
+ | Verify completeness | Hope you didn't miss a function | `verify` says "10/10" or "missing: X" |
27
+ | Feed to AI | Paste markdown, hope it parses correctly | `mcp` server, 7 tools, typed JSON over stdio |
28
+ | Project scaffold | Create package.json, tsconfig, dirs | `prototype` generates complete structure |
29
+
30
+ ---
31
+
32
+ ## Quick Start
33
+
34
+ ```bash
35
+ npm install -g engineering-blueprint
36
+ blueprint list
37
+ blueprint inspect billing
38
+ blueprint graph billing
39
+ blueprint resolve --modules billing,payments,users
40
+ ```
41
+
42
+ Or import as a library:
43
+
44
+ ```typescript
45
+ import { loadCatalogFromRoot } from 'engineering-blueprint';
46
+ const catalog = await loadCatalogFromRoot('./contracts');
47
+ ```
48
+
49
+ ---
50
+
51
+ ## CLI Reference
52
+
53
+ ### Commands
54
+
55
+ | Command | Description |
56
+ |---|---|
57
+ | `build` | Load contracts, output catalog.json |
58
+ | `list` | List all modules with deps and adapter status |
59
+ | `search <query>` | Interactive module picker |
60
+ | `inspect <module>` | Full contract for a module |
61
+ | `graph <module>` | ASCII or Mermaid dependency graph |
62
+ | `resolve` | Resolve modules with transitive deps |
63
+ | `adapters` | Manage adapter selections (83 adapters, 35 modules) |
64
+ | `generate` | Generate TypeScript code from contracts |
65
+ | `prototype` | Generate project scaffold with dependencies |
66
+ | `schema` | Export catalog as JSON Schema |
67
+ | `verify <file>` | Check implementation against contract |
68
+ | `implement` | Generate AI prompts for implementation |
69
+ | `mcp` | Start MCP server for AI tools |
70
+
71
+ ### Flags
72
+
73
+ `--root`, `--strict`, `--output`, `--compact`, `--minimal`, `--quiet`, `--format <ascii|mermaid>`, `--lang <typescript|rust|python|go>`, `--module`, `--modules`, `--name`
74
+
75
+ ---
76
+
77
+ ## Adapter Registry
78
+
79
+ 33 modules with 83 adapters. Bridge between contracts and concrete providers:
80
+
81
+ | Module | Adapters |
82
+ |---|---|
83
+ | payments | stripe, paystack, adyen |
84
+ | billing | stripe, paddle |
85
+ | subscriptions | stripe, chargebee |
86
+ | emails | resend, sendgrid, mailgun |
87
+ | sms | twilio, vonage |
88
+ | notifications | onesignal, firebase, novu |
89
+ | caching | redis, memcached |
90
+ | storage | s3, gcs, azure-blob |
91
+ | search | algolia, meilisearch, typesense |
92
+ | queues | bullmq, sqs, rabbitmq |
93
+ | auth | clerk, auth0, supertokens |
94
+ | kyc | jumio, onfido |
95
+ | analytics | segment, mixpanel, amplitude |
96
+ | fraud_detection | sift, riskified |
97
+ | error_tracking | sentry, bugsnag |
98
+ | incident_management | pagerduty, opsgenie |
99
+ | trace_query | jaeger, datadog, honeycomb |
100
+ | *and 17 more modules* | |
101
+
102
+ ```bash
103
+ blueprint adapters list
104
+ blueprint adapters add stripe payments
105
+ blueprint adapters verify
106
+ ```
107
+
108
+ ---
109
+
110
+ ## Code Generation
111
+
112
+ Generates TypeScript interfaces, adapter skeletons, and conformance tests from contracts:
113
+
114
+ ```bash
115
+ blueprint generate --lang typescript
116
+ blueprint generate --module billing --lang typescript
117
+ ```
118
+
119
+ Output for payments module:
120
+
121
+ ```typescript
122
+ // generated/interfaces/payments.ts
123
+ export interface PaymentsContract {
124
+ initiatePayment(orderId: string, amount: number, currency: string, method: string): Promise<Payment>;
125
+ verifyPayment(paymentId: string): Promise<Payment>;
126
+ getWallet(userId: string): Promise<Wallet>;
127
+ // ... 10 functions with inferred types
128
+ }
129
+
130
+ // generated/adapters/payments/stripe.ts
131
+ import Stripe from 'stripe';
132
+
133
+ export class StripeAdapter implements PaymentsContract {
134
+ async initiatePayment(orderId: string, amount: number, currency: string, method: string): Promise<Payment> {
135
+ const paymentIntent = await this.stripe.paymentIntents.create({
136
+ amount: Math.round(amount * 100),
137
+ currency: currency.toLowerCase(),
138
+ payment_method: method,
139
+ metadata: { orderId },
140
+ });
141
+ return this.toPayment(paymentIntent);
142
+ }
143
+ // ... full SDK implementations
144
+ }
145
+ ```
146
+
147
+ Languages supported: TypeScript (full), Rust/Go/Python (planned).
148
+
149
+ ---
150
+
151
+ ## Prototype Generation
152
+
153
+ Generate a project scaffold with selected adapters and correct dependencies:
154
+
155
+ ```bash
156
+ blueprint adapters add stripe payments
157
+ blueprint adapters add redis caching
158
+ blueprint adapters add bullmq queues
159
+ blueprint prototype --name my-saas
160
+ ```
161
+
162
+ Produces:
163
+ - `package.json` with stripe, redis, bullmq dependencies
164
+ - `tsconfig.json`, `.gitignore`, `.env.example`
165
+ - `src/config/adapters.ts` with working configuration
166
+ - `src/index.ts` with entry point and function list
167
+
168
+ ---
169
+
170
+ ## MCP Server
171
+
172
+ AI tools (Claude Desktop, Cursor, Copilot) can query the catalog directly via the Model Context Protocol.
173
+
174
+ **Configuration** -- add to Claude Desktop config:
175
+
176
+ ```json
177
+ {
178
+ "mcpServers": {
179
+ "blueprint": {
180
+ "command": "npx",
181
+ "args": ["engineering-blueprint", "mcp"]
182
+ }
183
+ }
184
+ }
185
+ ```
186
+
187
+ **7 tools exposed:**
188
+
189
+ | Tool | What it does |
190
+ |---|---|
191
+ | `list_modules` | List all 108 modules with deps |
192
+ | `get_module` | Full contract with functions, types |
193
+ | `search_modules` | Search by name, summary, function |
194
+ | `resolve_deps` | Transitive dependency resolution |
195
+ | `list_adapters` | 83 adapters across 35 modules |
196
+ | `get_adapter` | Adapter details with config |
197
+ | `get_dependency_graph` | Hard/soft deps + reverse deps |
198
+
199
+ **Start manually:**
200
+ ```bash
201
+ blueprint mcp
202
+ # or with a specific root:
203
+ BLUEPRINTER_ROOT=/path/to/project blueprint mcp
204
+ ```
205
+
206
+ ---
207
+
208
+ ## Project Structure
209
+
210
+ ```
211
+ engineering-blueprint/
212
+ ├── contracts/ # 108 markdown contract files
213
+ │ └── core/ # Global standards, runtime, sagas
214
+ ├── adapters/ # 83 YAML adapter definitions
215
+ ├── src/
216
+ │ ├── core/ # Parser, resolver, search, adapters
217
+ │ ├── generators/ # Code generation engine
218
+ │ ├── cli.ts # CLI entrypoint (68 lines)
219
+ │ └── utils/ # Argument parsing
220
+ ├── schemas/ # JSON schemas
221
+ ├── completions/ # Bash/zsh completions
222
+ └── scripts/ # CI integration tests
223
+ ```
224
+
225
+ ---
226
+
227
+ ## Verification
228
+
229
+ Check that implementations match contracts:
230
+
231
+ ```bash
232
+ blueprint verify ./src/adapters/payments/stripe.ts --module payments
233
+ # All 10 functions implemented. PASS
234
+ ```
235
+
236
+ ---
237
+
238
+ ## Production Status
239
+
240
+ | Check | Result |
241
+ |---|---|
242
+ | 108 contracts parsed | 0 errors, 0 warnings |
243
+ | 83 adapters loaded | 0 errors |
244
+ | Adapter validation | 0 errors, 0 warnings |
245
+ | Tests | 91 passing (58 unit + 25 integration + 8 MCP) |
246
+ | Edge cases | 33 tests covering malformed input, empty state, 50-module chains |
247
+ | CI (Node 18/20/22) | Passing |
248
+ | MCP server | 7 tools, stdio transport |
249
+ | npm publish | On GitHub release |
250
+
251
+ ---
252
+
253
+ ## The Boundary
254
+
255
+ A module belongs here if:
256
+
257
+ 1. It is a named domain problem (payments, not database transactions)
258
+ 2. It recurs across at least three different application types
259
+ 3. Its interface is stable across providers
260
+ 4. It cannot be trivially derived from a single-table CRUD
261
+
262
+ The catalogue defines *what* your system does. The prototype generator produces the project structure (*how* you start). Adapter implementations and business logic are yours to write.
263
+
264
+ ---
265
+
266
+ *Version 0.1.0 -- Production Ready*
@@ -0,0 +1,44 @@
1
+ name: amplitude
2
+ module: analytics
3
+ version: 1.0.0
4
+ description: Amplitude analytics adapter
5
+
6
+ implements:
7
+ - trackEvent
8
+ - identifyUser
9
+ - trackPageView
10
+ - getMetrics
11
+ - getFunnel
12
+ - getCohort
13
+ - getRetention
14
+
15
+ does_not_implement: []
16
+
17
+ config:
18
+ required:
19
+ - name: api_key
20
+ type: string
21
+ description: Amplitude API key
22
+ secret: false
23
+ - name: secret_key
24
+ type: string
25
+ description: Amplitude secret key
26
+ secret: true
27
+ optional:
28
+ - name: server_url
29
+ type: string
30
+ default: https://api.amplitude.com
31
+ description: Amplitude server URL
32
+ - name: batch_size
33
+ type: integer
34
+ default: 10
35
+ description: Event batch size
36
+
37
+ dependencies:
38
+ - module: audit_log
39
+ purpose: Log analytics events
40
+ required: false
41
+
42
+ metadata:
43
+ provider_url: https://amplitude.com
44
+ docs_url: https://docs.amplitude.com
@@ -0,0 +1,47 @@
1
+ name: mixpanel
2
+ module: analytics
3
+ version: 1.0.0
4
+ description: Mixpanel analytics adapter
5
+
6
+ implements:
7
+ - trackEvent
8
+ - identifyUser
9
+ - trackPageView
10
+ - getMetrics
11
+ - getFunnel
12
+ - getCohort
13
+ - getRetention
14
+
15
+ does_not_implement: []
16
+
17
+ config:
18
+ required:
19
+ - name: project_token
20
+ type: string
21
+ description: Mixpanel project token
22
+ secret: false
23
+ - name: secret
24
+ type: string
25
+ description: Mixpanel API secret
26
+ secret: true
27
+ optional:
28
+ - name: api_secret
29
+ type: string
30
+ description: Mixpanel API secret for data export
31
+ secret: true
32
+ - name: service_account_username
33
+ type: string
34
+ description: Mixpanel service account username
35
+ - name: service_account_secret
36
+ type: string
37
+ description: Mixpanel service account secret
38
+ secret: true
39
+
40
+ dependencies:
41
+ - module: audit_log
42
+ purpose: Log analytics events
43
+ required: false
44
+
45
+ metadata:
46
+ provider_url: https://mixpanel.com
47
+ docs_url: https://docs.mixpanel.com
@@ -0,0 +1,40 @@
1
+ name: segment
2
+ module: analytics
3
+ version: 1.0.0
4
+ description: Segment analytics adapter
5
+
6
+ implements:
7
+ - trackEvent
8
+ - identifyUser
9
+ - trackPageView
10
+ - getMetrics
11
+ - getFunnel
12
+ - getCohort
13
+ - getRetention
14
+
15
+ does_not_implement: []
16
+
17
+ config:
18
+ required:
19
+ - name: write_key
20
+ type: string
21
+ description: Segment write key
22
+ secret: true
23
+ optional:
24
+ - name: cdn_host
25
+ type: string
26
+ default: https://cdn.segment.com
27
+ description: Segment CDN host
28
+ - name: flush_interval
29
+ type: integer
30
+ default: 1000
31
+ description: Flush interval in milliseconds
32
+
33
+ dependencies:
34
+ - module: audit_log
35
+ purpose: Log analytics events
36
+ required: false
37
+
38
+ metadata:
39
+ provider_url: https://segment.com
40
+ docs_url: https://segment.com/docs
@@ -0,0 +1,56 @@
1
+ name: auth0
2
+ module: auth
3
+ version: 1.0.0
4
+ description: Auth0 authentication adapter
5
+
6
+ implements:
7
+ - signUp
8
+ - signIn
9
+ - signInWithProvider
10
+ - signOut
11
+ - refreshToken
12
+ - verifyToken
13
+ - requestPasswordReset
14
+ - confirmPasswordReset
15
+ - verifyEmail
16
+ - resendVerification
17
+
18
+ does_not_implement: []
19
+
20
+ config:
21
+ required:
22
+ - name: domain
23
+ type: string
24
+ description: Auth0 domain
25
+ secret: false
26
+ - name: client_id
27
+ type: string
28
+ description: Auth0 client ID
29
+ secret: false
30
+ - name: client_secret
31
+ type: string
32
+ description: Auth0 client secret
33
+ secret: true
34
+ - name: audience
35
+ type: string
36
+ description: Auth0 API audience
37
+ secret: false
38
+ optional:
39
+ - name: connection
40
+ type: string
41
+ description: Auth0 connection name
42
+
43
+ dependencies:
44
+ - module: sessions
45
+ purpose: Manage user sessions
46
+ required: true
47
+ - module: users
48
+ purpose: User data storage
49
+ required: true
50
+ - module: audit_log
51
+ purpose: Log authentication events
52
+ required: false
53
+
54
+ metadata:
55
+ provider_url: https://auth0.com
56
+ docs_url: https://auth0.com/docs
@@ -0,0 +1,53 @@
1
+ name: clerk
2
+ module: auth
3
+ version: 1.0.0
4
+ description: Clerk authentication adapter
5
+
6
+ implements:
7
+ - signUp
8
+ - signIn
9
+ - signInWithProvider
10
+ - signOut
11
+ - refreshToken
12
+ - verifyToken
13
+ - requestPasswordReset
14
+ - confirmPasswordReset
15
+ - verifyEmail
16
+ - resendVerification
17
+
18
+ does_not_implement: []
19
+
20
+ config:
21
+ required:
22
+ - name: publishable_key
23
+ type: string
24
+ description: Clerk publishable key
25
+ secret: false
26
+ - name: secret_key
27
+ type: string
28
+ description: Clerk secret key
29
+ secret: true
30
+ - name: frontend_api
31
+ type: string
32
+ description: Clerk frontend API URL
33
+ secret: false
34
+ optional:
35
+ - name: jwt_key
36
+ type: string
37
+ description: Clerk JWT key for token verification
38
+ secret: true
39
+
40
+ dependencies:
41
+ - module: sessions
42
+ purpose: Manage user sessions
43
+ required: true
44
+ - module: users
45
+ purpose: User data storage
46
+ required: true
47
+ - module: audit_log
48
+ purpose: Log authentication events
49
+ required: false
50
+
51
+ metadata:
52
+ provider_url: https://clerk.com
53
+ docs_url: https://clerk.com/docs