@howlil/ez-agents 2.0.0 → 2.0.1
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.
- package/LICENSE +21 -21
- package/README.md +93 -93
- package/agents/ez-plan-checker.md +2 -2
- package/agents/ez-research-synthesizer.md +1 -1
- package/agents/ez-ui-researcher.md +1 -1
- package/agents/ez-verifier.md +1 -1
- package/bin/install.js +132 -132
- package/get-shit-done/bin/lib/assistant-adapter.cjs +205 -205
- package/get-shit-done/bin/lib/audit-exec.cjs +150 -150
- package/get-shit-done/bin/lib/auth.cjs +175 -175
- package/get-shit-done/bin/lib/circuit-breaker.cjs +118 -118
- package/get-shit-done/bin/lib/commands.cjs +666 -666
- package/get-shit-done/bin/lib/config.cjs +183 -183
- package/get-shit-done/bin/lib/core.cjs +495 -495
- package/get-shit-done/bin/lib/file-lock.cjs +236 -236
- package/get-shit-done/bin/lib/frontmatter.cjs +299 -299
- package/get-shit-done/bin/lib/fs-utils.cjs +153 -153
- package/get-shit-done/bin/lib/git-utils.cjs +203 -203
- package/get-shit-done/bin/lib/health-check.cjs +163 -163
- package/get-shit-done/bin/lib/index.cjs +113 -113
- package/get-shit-done/bin/lib/init.cjs +710 -710
- package/get-shit-done/bin/lib/logger.cjs +117 -117
- package/get-shit-done/bin/lib/milestone.cjs +241 -241
- package/get-shit-done/bin/lib/model-provider.cjs +146 -146
- package/get-shit-done/bin/lib/phase.cjs +908 -908
- package/get-shit-done/bin/lib/retry.cjs +119 -119
- package/get-shit-done/bin/lib/roadmap.cjs +305 -305
- package/get-shit-done/bin/lib/safe-exec.cjs +128 -128
- package/get-shit-done/bin/lib/safe-path.cjs +130 -130
- package/get-shit-done/bin/lib/state.cjs +721 -721
- package/get-shit-done/bin/lib/temp-file.cjs +239 -239
- package/get-shit-done/bin/lib/template.cjs +222 -222
- package/get-shit-done/bin/lib/test-file-lock.cjs +112 -112
- package/get-shit-done/bin/lib/test-graceful.cjs +93 -93
- package/get-shit-done/bin/lib/test-logger.cjs +60 -60
- package/get-shit-done/bin/lib/test-safe-exec.cjs +38 -38
- package/get-shit-done/bin/lib/test-safe-path.cjs +33 -33
- package/get-shit-done/bin/lib/test-temp-file.cjs +125 -125
- package/get-shit-done/bin/lib/timeout-exec.cjs +62 -62
- package/get-shit-done/bin/lib/verify.cjs +820 -820
- package/get-shit-done/references/checkpoints.md +776 -776
- package/get-shit-done/references/questioning.md +162 -162
- package/get-shit-done/references/tdd.md +263 -263
- package/get-shit-done/templates/codebase/concerns.md +310 -310
- package/get-shit-done/templates/codebase/conventions.md +307 -307
- package/get-shit-done/templates/codebase/integrations.md +280 -280
- package/get-shit-done/templates/codebase/stack.md +186 -186
- package/get-shit-done/templates/codebase/testing.md +480 -480
- package/get-shit-done/templates/config.json +37 -37
- package/get-shit-done/templates/continue-here.md +78 -78
- package/get-shit-done/templates/milestone-archive.md +123 -123
- package/get-shit-done/templates/milestone.md +115 -115
- package/get-shit-done/templates/requirements.md +231 -231
- package/get-shit-done/templates/research-project/ARCHITECTURE.md +204 -204
- package/get-shit-done/templates/research-project/FEATURES.md +147 -147
- package/get-shit-done/templates/research-project/PITFALLS.md +200 -200
- package/get-shit-done/templates/research-project/STACK.md +120 -120
- package/get-shit-done/templates/research-project/SUMMARY.md +170 -170
- package/get-shit-done/templates/retrospective.md +54 -54
- package/get-shit-done/templates/roadmap.md +202 -202
- package/get-shit-done/templates/summary-minimal.md +41 -41
- package/get-shit-done/templates/summary-standard.md +48 -48
- package/get-shit-done/templates/summary.md +248 -248
- package/get-shit-done/templates/user-setup.md +311 -311
- package/get-shit-done/templates/verification-report.md +322 -322
- package/get-shit-done/workflows/add-phase.md +112 -112
- package/get-shit-done/workflows/add-tests.md +351 -351
- package/get-shit-done/workflows/add-todo.md +158 -158
- package/get-shit-done/workflows/audit-milestone.md +332 -332
- package/get-shit-done/workflows/autonomous.md +743 -743
- package/get-shit-done/workflows/check-todos.md +177 -177
- package/get-shit-done/workflows/cleanup.md +152 -152
- package/get-shit-done/workflows/complete-milestone.md +766 -766
- package/get-shit-done/workflows/diagnose-issues.md +219 -219
- package/get-shit-done/workflows/discovery-phase.md +289 -289
- package/get-shit-done/workflows/discuss-phase.md +762 -762
- package/get-shit-done/workflows/execute-phase.md +468 -468
- package/get-shit-done/workflows/execute-plan.md +483 -483
- package/get-shit-done/workflows/health.md +159 -159
- package/get-shit-done/workflows/help.md +492 -492
- package/get-shit-done/workflows/insert-phase.md +130 -130
- package/get-shit-done/workflows/list-phase-assumptions.md +178 -178
- package/get-shit-done/workflows/map-codebase.md +316 -316
- package/get-shit-done/workflows/new-milestone.md +384 -384
- package/get-shit-done/workflows/new-project.md +1111 -1111
- package/get-shit-done/workflows/node-repair.md +92 -92
- package/get-shit-done/workflows/pause-work.md +122 -122
- package/get-shit-done/workflows/plan-milestone-gaps.md +274 -274
- package/get-shit-done/workflows/plan-phase.md +651 -651
- package/get-shit-done/workflows/progress.md +382 -382
- package/get-shit-done/workflows/quick.md +610 -610
- package/get-shit-done/workflows/remove-phase.md +155 -155
- package/get-shit-done/workflows/research-phase.md +74 -74
- package/get-shit-done/workflows/resume-project.md +307 -307
- package/get-shit-done/workflows/set-profile.md +81 -81
- package/get-shit-done/workflows/settings.md +242 -242
- package/get-shit-done/workflows/stats.md +57 -57
- package/get-shit-done/workflows/transition.md +544 -544
- package/get-shit-done/workflows/ui-phase.md +290 -290
- package/get-shit-done/workflows/ui-review.md +157 -157
- package/get-shit-done/workflows/update.md +320 -320
- package/get-shit-done/workflows/validate-phase.md +167 -167
- package/get-shit-done/workflows/verify-phase.md +243 -243
- package/package.json +1 -1
- package/scripts/build-hooks.js +43 -43
- package/scripts/run-tests.cjs +29 -29
|
@@ -1,280 +1,280 @@
|
|
|
1
|
-
# External Integrations Template
|
|
2
|
-
|
|
3
|
-
Template for `.planning/codebase/INTEGRATIONS.md` - captures external service dependencies.
|
|
4
|
-
|
|
5
|
-
**Purpose:** Document what external systems this codebase communicates with. Focused on "what lives outside our code that we depend on."
|
|
6
|
-
|
|
7
|
-
---
|
|
8
|
-
|
|
9
|
-
## File Template
|
|
10
|
-
|
|
11
|
-
```markdown
|
|
12
|
-
# External Integrations
|
|
13
|
-
|
|
14
|
-
**Analysis Date:** [YYYY-MM-DD]
|
|
15
|
-
|
|
16
|
-
## APIs & External Services
|
|
17
|
-
|
|
18
|
-
**Payment Processing:**
|
|
19
|
-
- [Service] - [What it's used for: e.g., "subscription billing, one-time payments"]
|
|
20
|
-
- SDK/Client: [e.g., "stripe npm package v14.x"]
|
|
21
|
-
- Auth: [e.g., "API key in STRIPE_SECRET_KEY env var"]
|
|
22
|
-
- Endpoints used: [e.g., "checkout sessions, webhooks"]
|
|
23
|
-
|
|
24
|
-
**Email/SMS:**
|
|
25
|
-
- [Service] - [What it's used for: e.g., "transactional emails"]
|
|
26
|
-
- SDK/Client: [e.g., "sendgrid/mail v8.x"]
|
|
27
|
-
- Auth: [e.g., "API key in SENDGRID_API_KEY env var"]
|
|
28
|
-
- Templates: [e.g., "managed in SendGrid dashboard"]
|
|
29
|
-
|
|
30
|
-
**External APIs:**
|
|
31
|
-
- [Service] - [What it's used for]
|
|
32
|
-
- Integration method: [e.g., "REST API via fetch", "GraphQL client"]
|
|
33
|
-
- Auth: [e.g., "OAuth2 token in AUTH_TOKEN env var"]
|
|
34
|
-
- Rate limits: [if applicable]
|
|
35
|
-
|
|
36
|
-
## Data Storage
|
|
37
|
-
|
|
38
|
-
**Databases:**
|
|
39
|
-
- [Type/Provider] - [e.g., "PostgreSQL on Supabase"]
|
|
40
|
-
- Connection: [e.g., "via DATABASE_URL env var"]
|
|
41
|
-
- Client: [e.g., "Prisma ORM v5.x"]
|
|
42
|
-
- Migrations: [e.g., "prisma migrate in migrations/"]
|
|
43
|
-
|
|
44
|
-
**File Storage:**
|
|
45
|
-
- [Service] - [e.g., "AWS S3 for user uploads"]
|
|
46
|
-
- SDK/Client: [e.g., "@aws-sdk/client-s3"]
|
|
47
|
-
- Auth: [e.g., "IAM credentials in AWS_* env vars"]
|
|
48
|
-
- Buckets: [e.g., "prod-uploads, dev-uploads"]
|
|
49
|
-
|
|
50
|
-
**Caching:**
|
|
51
|
-
- [Service] - [e.g., "Redis for session storage"]
|
|
52
|
-
- Connection: [e.g., "REDIS_URL env var"]
|
|
53
|
-
- Client: [e.g., "ioredis v5.x"]
|
|
54
|
-
|
|
55
|
-
## Authentication & Identity
|
|
56
|
-
|
|
57
|
-
**Auth Provider:**
|
|
58
|
-
- [Service] - [e.g., "Supabase Auth", "Auth0", "custom JWT"]
|
|
59
|
-
- Implementation: [e.g., "Supabase client SDK"]
|
|
60
|
-
- Token storage: [e.g., "httpOnly cookies", "localStorage"]
|
|
61
|
-
- Session management: [e.g., "JWT refresh tokens"]
|
|
62
|
-
|
|
63
|
-
**OAuth Integrations:**
|
|
64
|
-
- [Provider] - [e.g., "Google OAuth for sign-in"]
|
|
65
|
-
- Credentials: [e.g., "GOOGLE_CLIENT_ID, GOOGLE_CLIENT_SECRET"]
|
|
66
|
-
- Scopes: [e.g., "email, profile"]
|
|
67
|
-
|
|
68
|
-
## Monitoring & Observability
|
|
69
|
-
|
|
70
|
-
**Error Tracking:**
|
|
71
|
-
- [Service] - [e.g., "Sentry"]
|
|
72
|
-
- DSN: [e.g., "SENTRY_DSN env var"]
|
|
73
|
-
- Release tracking: [e.g., "via SENTRY_RELEASE"]
|
|
74
|
-
|
|
75
|
-
**Analytics:**
|
|
76
|
-
- [Service] - [e.g., "Mixpanel for product analytics"]
|
|
77
|
-
- Token: [e.g., "MIXPANEL_TOKEN env var"]
|
|
78
|
-
- Events tracked: [e.g., "user actions, page views"]
|
|
79
|
-
|
|
80
|
-
**Logs:**
|
|
81
|
-
- [Service] - [e.g., "CloudWatch", "Datadog", "none (stdout only)"]
|
|
82
|
-
- Integration: [e.g., "AWS Lambda built-in"]
|
|
83
|
-
|
|
84
|
-
## CI/CD & Deployment
|
|
85
|
-
|
|
86
|
-
**Hosting:**
|
|
87
|
-
- [Platform] - [e.g., "Vercel", "AWS Lambda", "Docker on ECS"]
|
|
88
|
-
- Deployment: [e.g., "automatic on main branch push"]
|
|
89
|
-
- Environment vars: [e.g., "configured in Vercel dashboard"]
|
|
90
|
-
|
|
91
|
-
**CI Pipeline:**
|
|
92
|
-
- [Service] - [e.g., "GitHub Actions"]
|
|
93
|
-
- Workflows: [e.g., "test.yml, deploy.yml"]
|
|
94
|
-
- Secrets: [e.g., "stored in GitHub repo secrets"]
|
|
95
|
-
|
|
96
|
-
## Environment Configuration
|
|
97
|
-
|
|
98
|
-
**Development:**
|
|
99
|
-
- Required env vars: [List critical vars]
|
|
100
|
-
- Secrets location: [e.g., ".env.local (gitignored)", "1Password vault"]
|
|
101
|
-
- Mock/stub services: [e.g., "Stripe test mode", "local PostgreSQL"]
|
|
102
|
-
|
|
103
|
-
**Staging:**
|
|
104
|
-
- Environment-specific differences: [e.g., "uses staging Stripe account"]
|
|
105
|
-
- Data: [e.g., "separate staging database"]
|
|
106
|
-
|
|
107
|
-
**Production:**
|
|
108
|
-
- Secrets management: [e.g., "Vercel environment variables"]
|
|
109
|
-
- Failover/redundancy: [e.g., "multi-region DB replication"]
|
|
110
|
-
|
|
111
|
-
## Webhooks & Callbacks
|
|
112
|
-
|
|
113
|
-
**Incoming:**
|
|
114
|
-
- [Service] - [Endpoint: e.g., "/api/webhooks/stripe"]
|
|
115
|
-
- Verification: [e.g., "signature validation via stripe.webhooks.constructEvent"]
|
|
116
|
-
- Events: [e.g., "payment_intent.succeeded, customer.subscription.updated"]
|
|
117
|
-
|
|
118
|
-
**Outgoing:**
|
|
119
|
-
- [Service] - [What triggers it]
|
|
120
|
-
- Endpoint: [e.g., "external CRM webhook on user signup"]
|
|
121
|
-
- Retry logic: [if applicable]
|
|
122
|
-
|
|
123
|
-
---
|
|
124
|
-
|
|
125
|
-
*Integration audit: [date]*
|
|
126
|
-
*Update when adding/removing external services*
|
|
127
|
-
```
|
|
128
|
-
|
|
129
|
-
<good_examples>
|
|
130
|
-
```markdown
|
|
131
|
-
# External Integrations
|
|
132
|
-
|
|
133
|
-
**Analysis Date:** 2025-01-20
|
|
134
|
-
|
|
135
|
-
## APIs & External Services
|
|
136
|
-
|
|
137
|
-
**Payment Processing:**
|
|
138
|
-
- Stripe - Subscription billing and one-time course payments
|
|
139
|
-
- SDK/Client: stripe npm package v14.8
|
|
140
|
-
- Auth: API key in STRIPE_SECRET_KEY env var
|
|
141
|
-
- Endpoints used: checkout sessions, customer portal, webhooks
|
|
142
|
-
|
|
143
|
-
**Email/SMS:**
|
|
144
|
-
- SendGrid - Transactional emails (receipts, password resets)
|
|
145
|
-
- SDK/Client: @sendgrid/mail v8.1
|
|
146
|
-
- Auth: API key in SENDGRID_API_KEY env var
|
|
147
|
-
- Templates: Managed in SendGrid dashboard (template IDs in code)
|
|
148
|
-
|
|
149
|
-
**External APIs:**
|
|
150
|
-
- OpenAI API - Course content generation
|
|
151
|
-
- Integration method: REST API via openai npm package v4.x
|
|
152
|
-
- Auth: Bearer token in OPENAI_API_KEY env var
|
|
153
|
-
- Rate limits: 3500 requests/min (tier 3)
|
|
154
|
-
|
|
155
|
-
## Data Storage
|
|
156
|
-
|
|
157
|
-
**Databases:**
|
|
158
|
-
- PostgreSQL on Supabase - Primary data store
|
|
159
|
-
- Connection: via DATABASE_URL env var
|
|
160
|
-
- Client: Prisma ORM v5.8
|
|
161
|
-
- Migrations: prisma migrate in prisma/migrations/
|
|
162
|
-
|
|
163
|
-
**File Storage:**
|
|
164
|
-
- Supabase Storage - User uploads (profile images, course materials)
|
|
165
|
-
- SDK/Client: @supabase/supabase-js v2.x
|
|
166
|
-
- Auth: Service role key in SUPABASE_SERVICE_ROLE_KEY
|
|
167
|
-
- Buckets: avatars (public), course-materials (private)
|
|
168
|
-
|
|
169
|
-
**Caching:**
|
|
170
|
-
- None currently (all database queries, no Redis)
|
|
171
|
-
|
|
172
|
-
## Authentication & Identity
|
|
173
|
-
|
|
174
|
-
**Auth Provider:**
|
|
175
|
-
- Supabase Auth - Email/password + OAuth
|
|
176
|
-
- Implementation: Supabase client SDK with server-side session management
|
|
177
|
-
- Token storage: httpOnly cookies via @supabase/ssr
|
|
178
|
-
- Session management: JWT refresh tokens handled by Supabase
|
|
179
|
-
|
|
180
|
-
**OAuth Integrations:**
|
|
181
|
-
- Google OAuth - Social sign-in
|
|
182
|
-
- Credentials: GOOGLE_CLIENT_ID, GOOGLE_CLIENT_SECRET (Supabase dashboard)
|
|
183
|
-
- Scopes: email, profile
|
|
184
|
-
|
|
185
|
-
## Monitoring & Observability
|
|
186
|
-
|
|
187
|
-
**Error Tracking:**
|
|
188
|
-
- Sentry - Server and client errors
|
|
189
|
-
- DSN: SENTRY_DSN env var
|
|
190
|
-
- Release tracking: Git commit SHA via SENTRY_RELEASE
|
|
191
|
-
|
|
192
|
-
**Analytics:**
|
|
193
|
-
- None (planned: Mixpanel)
|
|
194
|
-
|
|
195
|
-
**Logs:**
|
|
196
|
-
- Vercel logs - stdout/stderr only
|
|
197
|
-
- Retention: 7 days on Pro plan
|
|
198
|
-
|
|
199
|
-
## CI/CD & Deployment
|
|
200
|
-
|
|
201
|
-
**Hosting:**
|
|
202
|
-
- Vercel - Next.js app hosting
|
|
203
|
-
- Deployment: Automatic on main branch push
|
|
204
|
-
- Environment vars: Configured in Vercel dashboard (synced to .env.example)
|
|
205
|
-
|
|
206
|
-
**CI Pipeline:**
|
|
207
|
-
- GitHub Actions - Tests and type checking
|
|
208
|
-
- Workflows: .github/workflows/ci.yml
|
|
209
|
-
- Secrets: None needed (public repo tests only)
|
|
210
|
-
|
|
211
|
-
## Environment Configuration
|
|
212
|
-
|
|
213
|
-
**Development:**
|
|
214
|
-
- Required env vars: DATABASE_URL, NEXT_PUBLIC_SUPABASE_URL, NEXT_PUBLIC_SUPABASE_ANON_KEY
|
|
215
|
-
- Secrets location: .env.local (gitignored), team shared via 1Password vault
|
|
216
|
-
- Mock/stub services: Stripe test mode, Supabase local dev project
|
|
217
|
-
|
|
218
|
-
**Staging:**
|
|
219
|
-
- Uses separate Supabase staging project
|
|
220
|
-
- Stripe test mode
|
|
221
|
-
- Same Vercel account, different environment
|
|
222
|
-
|
|
223
|
-
**Production:**
|
|
224
|
-
- Secrets management: Vercel environment variables
|
|
225
|
-
- Database: Supabase production project with daily backups
|
|
226
|
-
|
|
227
|
-
## Webhooks & Callbacks
|
|
228
|
-
|
|
229
|
-
**Incoming:**
|
|
230
|
-
- Stripe - /api/webhooks/stripe
|
|
231
|
-
- Verification: Signature validation via stripe.webhooks.constructEvent
|
|
232
|
-
- Events: payment_intent.succeeded, customer.subscription.updated, customer.subscription.deleted
|
|
233
|
-
|
|
234
|
-
**Outgoing:**
|
|
235
|
-
- None
|
|
236
|
-
|
|
237
|
-
---
|
|
238
|
-
|
|
239
|
-
*Integration audit: 2025-01-20*
|
|
240
|
-
*Update when adding/removing external services*
|
|
241
|
-
```
|
|
242
|
-
</good_examples>
|
|
243
|
-
|
|
244
|
-
<guidelines>
|
|
245
|
-
**What belongs in INTEGRATIONS.md:**
|
|
246
|
-
- External services the code communicates with
|
|
247
|
-
- Authentication patterns (where secrets live, not the secrets themselves)
|
|
248
|
-
- SDKs and client libraries used
|
|
249
|
-
- Environment variable names (not values)
|
|
250
|
-
- Webhook endpoints and verification methods
|
|
251
|
-
- Database connection patterns
|
|
252
|
-
- File storage locations
|
|
253
|
-
- Monitoring and logging services
|
|
254
|
-
|
|
255
|
-
**What does NOT belong here:**
|
|
256
|
-
- Actual API keys or secrets (NEVER write these)
|
|
257
|
-
- Internal architecture (that's ARCHITECTURE.md)
|
|
258
|
-
- Code patterns (that's PATTERNS.md)
|
|
259
|
-
- Technology choices (that's STACK.md)
|
|
260
|
-
- Performance issues (that's CONCERNS.md)
|
|
261
|
-
|
|
262
|
-
**When filling this template:**
|
|
263
|
-
- Check .env.example or .env.template for required env vars
|
|
264
|
-
- Look for SDK imports (stripe, @sendgrid/mail, etc.)
|
|
265
|
-
- Check for webhook handlers in routes/endpoints
|
|
266
|
-
- Note where secrets are managed (not the secrets)
|
|
267
|
-
- Document environment-specific differences (dev/staging/prod)
|
|
268
|
-
- Include auth patterns for each service
|
|
269
|
-
|
|
270
|
-
**Useful for phase planning when:**
|
|
271
|
-
- Adding new external service integrations
|
|
272
|
-
- Debugging authentication issues
|
|
273
|
-
- Understanding data flow outside the application
|
|
274
|
-
- Setting up new environments
|
|
275
|
-
- Auditing third-party dependencies
|
|
276
|
-
- Planning for service outages or migrations
|
|
277
|
-
|
|
278
|
-
**Security note:**
|
|
279
|
-
Document WHERE secrets live (env vars, Vercel dashboard, 1Password), never WHAT the secrets are.
|
|
280
|
-
</guidelines>
|
|
1
|
+
# External Integrations Template
|
|
2
|
+
|
|
3
|
+
Template for `.planning/codebase/INTEGRATIONS.md` - captures external service dependencies.
|
|
4
|
+
|
|
5
|
+
**Purpose:** Document what external systems this codebase communicates with. Focused on "what lives outside our code that we depend on."
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## File Template
|
|
10
|
+
|
|
11
|
+
```markdown
|
|
12
|
+
# External Integrations
|
|
13
|
+
|
|
14
|
+
**Analysis Date:** [YYYY-MM-DD]
|
|
15
|
+
|
|
16
|
+
## APIs & External Services
|
|
17
|
+
|
|
18
|
+
**Payment Processing:**
|
|
19
|
+
- [Service] - [What it's used for: e.g., "subscription billing, one-time payments"]
|
|
20
|
+
- SDK/Client: [e.g., "stripe npm package v14.x"]
|
|
21
|
+
- Auth: [e.g., "API key in STRIPE_SECRET_KEY env var"]
|
|
22
|
+
- Endpoints used: [e.g., "checkout sessions, webhooks"]
|
|
23
|
+
|
|
24
|
+
**Email/SMS:**
|
|
25
|
+
- [Service] - [What it's used for: e.g., "transactional emails"]
|
|
26
|
+
- SDK/Client: [e.g., "sendgrid/mail v8.x"]
|
|
27
|
+
- Auth: [e.g., "API key in SENDGRID_API_KEY env var"]
|
|
28
|
+
- Templates: [e.g., "managed in SendGrid dashboard"]
|
|
29
|
+
|
|
30
|
+
**External APIs:**
|
|
31
|
+
- [Service] - [What it's used for]
|
|
32
|
+
- Integration method: [e.g., "REST API via fetch", "GraphQL client"]
|
|
33
|
+
- Auth: [e.g., "OAuth2 token in AUTH_TOKEN env var"]
|
|
34
|
+
- Rate limits: [if applicable]
|
|
35
|
+
|
|
36
|
+
## Data Storage
|
|
37
|
+
|
|
38
|
+
**Databases:**
|
|
39
|
+
- [Type/Provider] - [e.g., "PostgreSQL on Supabase"]
|
|
40
|
+
- Connection: [e.g., "via DATABASE_URL env var"]
|
|
41
|
+
- Client: [e.g., "Prisma ORM v5.x"]
|
|
42
|
+
- Migrations: [e.g., "prisma migrate in migrations/"]
|
|
43
|
+
|
|
44
|
+
**File Storage:**
|
|
45
|
+
- [Service] - [e.g., "AWS S3 for user uploads"]
|
|
46
|
+
- SDK/Client: [e.g., "@aws-sdk/client-s3"]
|
|
47
|
+
- Auth: [e.g., "IAM credentials in AWS_* env vars"]
|
|
48
|
+
- Buckets: [e.g., "prod-uploads, dev-uploads"]
|
|
49
|
+
|
|
50
|
+
**Caching:**
|
|
51
|
+
- [Service] - [e.g., "Redis for session storage"]
|
|
52
|
+
- Connection: [e.g., "REDIS_URL env var"]
|
|
53
|
+
- Client: [e.g., "ioredis v5.x"]
|
|
54
|
+
|
|
55
|
+
## Authentication & Identity
|
|
56
|
+
|
|
57
|
+
**Auth Provider:**
|
|
58
|
+
- [Service] - [e.g., "Supabase Auth", "Auth0", "custom JWT"]
|
|
59
|
+
- Implementation: [e.g., "Supabase client SDK"]
|
|
60
|
+
- Token storage: [e.g., "httpOnly cookies", "localStorage"]
|
|
61
|
+
- Session management: [e.g., "JWT refresh tokens"]
|
|
62
|
+
|
|
63
|
+
**OAuth Integrations:**
|
|
64
|
+
- [Provider] - [e.g., "Google OAuth for sign-in"]
|
|
65
|
+
- Credentials: [e.g., "GOOGLE_CLIENT_ID, GOOGLE_CLIENT_SECRET"]
|
|
66
|
+
- Scopes: [e.g., "email, profile"]
|
|
67
|
+
|
|
68
|
+
## Monitoring & Observability
|
|
69
|
+
|
|
70
|
+
**Error Tracking:**
|
|
71
|
+
- [Service] - [e.g., "Sentry"]
|
|
72
|
+
- DSN: [e.g., "SENTRY_DSN env var"]
|
|
73
|
+
- Release tracking: [e.g., "via SENTRY_RELEASE"]
|
|
74
|
+
|
|
75
|
+
**Analytics:**
|
|
76
|
+
- [Service] - [e.g., "Mixpanel for product analytics"]
|
|
77
|
+
- Token: [e.g., "MIXPANEL_TOKEN env var"]
|
|
78
|
+
- Events tracked: [e.g., "user actions, page views"]
|
|
79
|
+
|
|
80
|
+
**Logs:**
|
|
81
|
+
- [Service] - [e.g., "CloudWatch", "Datadog", "none (stdout only)"]
|
|
82
|
+
- Integration: [e.g., "AWS Lambda built-in"]
|
|
83
|
+
|
|
84
|
+
## CI/CD & Deployment
|
|
85
|
+
|
|
86
|
+
**Hosting:**
|
|
87
|
+
- [Platform] - [e.g., "Vercel", "AWS Lambda", "Docker on ECS"]
|
|
88
|
+
- Deployment: [e.g., "automatic on main branch push"]
|
|
89
|
+
- Environment vars: [e.g., "configured in Vercel dashboard"]
|
|
90
|
+
|
|
91
|
+
**CI Pipeline:**
|
|
92
|
+
- [Service] - [e.g., "GitHub Actions"]
|
|
93
|
+
- Workflows: [e.g., "test.yml, deploy.yml"]
|
|
94
|
+
- Secrets: [e.g., "stored in GitHub repo secrets"]
|
|
95
|
+
|
|
96
|
+
## Environment Configuration
|
|
97
|
+
|
|
98
|
+
**Development:**
|
|
99
|
+
- Required env vars: [List critical vars]
|
|
100
|
+
- Secrets location: [e.g., ".env.local (gitignored)", "1Password vault"]
|
|
101
|
+
- Mock/stub services: [e.g., "Stripe test mode", "local PostgreSQL"]
|
|
102
|
+
|
|
103
|
+
**Staging:**
|
|
104
|
+
- Environment-specific differences: [e.g., "uses staging Stripe account"]
|
|
105
|
+
- Data: [e.g., "separate staging database"]
|
|
106
|
+
|
|
107
|
+
**Production:**
|
|
108
|
+
- Secrets management: [e.g., "Vercel environment variables"]
|
|
109
|
+
- Failover/redundancy: [e.g., "multi-region DB replication"]
|
|
110
|
+
|
|
111
|
+
## Webhooks & Callbacks
|
|
112
|
+
|
|
113
|
+
**Incoming:**
|
|
114
|
+
- [Service] - [Endpoint: e.g., "/api/webhooks/stripe"]
|
|
115
|
+
- Verification: [e.g., "signature validation via stripe.webhooks.constructEvent"]
|
|
116
|
+
- Events: [e.g., "payment_intent.succeeded, customer.subscription.updated"]
|
|
117
|
+
|
|
118
|
+
**Outgoing:**
|
|
119
|
+
- [Service] - [What triggers it]
|
|
120
|
+
- Endpoint: [e.g., "external CRM webhook on user signup"]
|
|
121
|
+
- Retry logic: [if applicable]
|
|
122
|
+
|
|
123
|
+
---
|
|
124
|
+
|
|
125
|
+
*Integration audit: [date]*
|
|
126
|
+
*Update when adding/removing external services*
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
<good_examples>
|
|
130
|
+
```markdown
|
|
131
|
+
# External Integrations
|
|
132
|
+
|
|
133
|
+
**Analysis Date:** 2025-01-20
|
|
134
|
+
|
|
135
|
+
## APIs & External Services
|
|
136
|
+
|
|
137
|
+
**Payment Processing:**
|
|
138
|
+
- Stripe - Subscription billing and one-time course payments
|
|
139
|
+
- SDK/Client: stripe npm package v14.8
|
|
140
|
+
- Auth: API key in STRIPE_SECRET_KEY env var
|
|
141
|
+
- Endpoints used: checkout sessions, customer portal, webhooks
|
|
142
|
+
|
|
143
|
+
**Email/SMS:**
|
|
144
|
+
- SendGrid - Transactional emails (receipts, password resets)
|
|
145
|
+
- SDK/Client: @sendgrid/mail v8.1
|
|
146
|
+
- Auth: API key in SENDGRID_API_KEY env var
|
|
147
|
+
- Templates: Managed in SendGrid dashboard (template IDs in code)
|
|
148
|
+
|
|
149
|
+
**External APIs:**
|
|
150
|
+
- OpenAI API - Course content generation
|
|
151
|
+
- Integration method: REST API via openai npm package v4.x
|
|
152
|
+
- Auth: Bearer token in OPENAI_API_KEY env var
|
|
153
|
+
- Rate limits: 3500 requests/min (tier 3)
|
|
154
|
+
|
|
155
|
+
## Data Storage
|
|
156
|
+
|
|
157
|
+
**Databases:**
|
|
158
|
+
- PostgreSQL on Supabase - Primary data store
|
|
159
|
+
- Connection: via DATABASE_URL env var
|
|
160
|
+
- Client: Prisma ORM v5.8
|
|
161
|
+
- Migrations: prisma migrate in prisma/migrations/
|
|
162
|
+
|
|
163
|
+
**File Storage:**
|
|
164
|
+
- Supabase Storage - User uploads (profile images, course materials)
|
|
165
|
+
- SDK/Client: @supabase/supabase-js v2.x
|
|
166
|
+
- Auth: Service role key in SUPABASE_SERVICE_ROLE_KEY
|
|
167
|
+
- Buckets: avatars (public), course-materials (private)
|
|
168
|
+
|
|
169
|
+
**Caching:**
|
|
170
|
+
- None currently (all database queries, no Redis)
|
|
171
|
+
|
|
172
|
+
## Authentication & Identity
|
|
173
|
+
|
|
174
|
+
**Auth Provider:**
|
|
175
|
+
- Supabase Auth - Email/password + OAuth
|
|
176
|
+
- Implementation: Supabase client SDK with server-side session management
|
|
177
|
+
- Token storage: httpOnly cookies via @supabase/ssr
|
|
178
|
+
- Session management: JWT refresh tokens handled by Supabase
|
|
179
|
+
|
|
180
|
+
**OAuth Integrations:**
|
|
181
|
+
- Google OAuth - Social sign-in
|
|
182
|
+
- Credentials: GOOGLE_CLIENT_ID, GOOGLE_CLIENT_SECRET (Supabase dashboard)
|
|
183
|
+
- Scopes: email, profile
|
|
184
|
+
|
|
185
|
+
## Monitoring & Observability
|
|
186
|
+
|
|
187
|
+
**Error Tracking:**
|
|
188
|
+
- Sentry - Server and client errors
|
|
189
|
+
- DSN: SENTRY_DSN env var
|
|
190
|
+
- Release tracking: Git commit SHA via SENTRY_RELEASE
|
|
191
|
+
|
|
192
|
+
**Analytics:**
|
|
193
|
+
- None (planned: Mixpanel)
|
|
194
|
+
|
|
195
|
+
**Logs:**
|
|
196
|
+
- Vercel logs - stdout/stderr only
|
|
197
|
+
- Retention: 7 days on Pro plan
|
|
198
|
+
|
|
199
|
+
## CI/CD & Deployment
|
|
200
|
+
|
|
201
|
+
**Hosting:**
|
|
202
|
+
- Vercel - Next.js app hosting
|
|
203
|
+
- Deployment: Automatic on main branch push
|
|
204
|
+
- Environment vars: Configured in Vercel dashboard (synced to .env.example)
|
|
205
|
+
|
|
206
|
+
**CI Pipeline:**
|
|
207
|
+
- GitHub Actions - Tests and type checking
|
|
208
|
+
- Workflows: .github/workflows/ci.yml
|
|
209
|
+
- Secrets: None needed (public repo tests only)
|
|
210
|
+
|
|
211
|
+
## Environment Configuration
|
|
212
|
+
|
|
213
|
+
**Development:**
|
|
214
|
+
- Required env vars: DATABASE_URL, NEXT_PUBLIC_SUPABASE_URL, NEXT_PUBLIC_SUPABASE_ANON_KEY
|
|
215
|
+
- Secrets location: .env.local (gitignored), team shared via 1Password vault
|
|
216
|
+
- Mock/stub services: Stripe test mode, Supabase local dev project
|
|
217
|
+
|
|
218
|
+
**Staging:**
|
|
219
|
+
- Uses separate Supabase staging project
|
|
220
|
+
- Stripe test mode
|
|
221
|
+
- Same Vercel account, different environment
|
|
222
|
+
|
|
223
|
+
**Production:**
|
|
224
|
+
- Secrets management: Vercel environment variables
|
|
225
|
+
- Database: Supabase production project with daily backups
|
|
226
|
+
|
|
227
|
+
## Webhooks & Callbacks
|
|
228
|
+
|
|
229
|
+
**Incoming:**
|
|
230
|
+
- Stripe - /api/webhooks/stripe
|
|
231
|
+
- Verification: Signature validation via stripe.webhooks.constructEvent
|
|
232
|
+
- Events: payment_intent.succeeded, customer.subscription.updated, customer.subscription.deleted
|
|
233
|
+
|
|
234
|
+
**Outgoing:**
|
|
235
|
+
- None
|
|
236
|
+
|
|
237
|
+
---
|
|
238
|
+
|
|
239
|
+
*Integration audit: 2025-01-20*
|
|
240
|
+
*Update when adding/removing external services*
|
|
241
|
+
```
|
|
242
|
+
</good_examples>
|
|
243
|
+
|
|
244
|
+
<guidelines>
|
|
245
|
+
**What belongs in INTEGRATIONS.md:**
|
|
246
|
+
- External services the code communicates with
|
|
247
|
+
- Authentication patterns (where secrets live, not the secrets themselves)
|
|
248
|
+
- SDKs and client libraries used
|
|
249
|
+
- Environment variable names (not values)
|
|
250
|
+
- Webhook endpoints and verification methods
|
|
251
|
+
- Database connection patterns
|
|
252
|
+
- File storage locations
|
|
253
|
+
- Monitoring and logging services
|
|
254
|
+
|
|
255
|
+
**What does NOT belong here:**
|
|
256
|
+
- Actual API keys or secrets (NEVER write these)
|
|
257
|
+
- Internal architecture (that's ARCHITECTURE.md)
|
|
258
|
+
- Code patterns (that's PATTERNS.md)
|
|
259
|
+
- Technology choices (that's STACK.md)
|
|
260
|
+
- Performance issues (that's CONCERNS.md)
|
|
261
|
+
|
|
262
|
+
**When filling this template:**
|
|
263
|
+
- Check .env.example or .env.template for required env vars
|
|
264
|
+
- Look for SDK imports (stripe, @sendgrid/mail, etc.)
|
|
265
|
+
- Check for webhook handlers in routes/endpoints
|
|
266
|
+
- Note where secrets are managed (not the secrets)
|
|
267
|
+
- Document environment-specific differences (dev/staging/prod)
|
|
268
|
+
- Include auth patterns for each service
|
|
269
|
+
|
|
270
|
+
**Useful for phase planning when:**
|
|
271
|
+
- Adding new external service integrations
|
|
272
|
+
- Debugging authentication issues
|
|
273
|
+
- Understanding data flow outside the application
|
|
274
|
+
- Setting up new environments
|
|
275
|
+
- Auditing third-party dependencies
|
|
276
|
+
- Planning for service outages or migrations
|
|
277
|
+
|
|
278
|
+
**Security note:**
|
|
279
|
+
Document WHERE secrets live (env vars, Vercel dashboard, 1Password), never WHAT the secrets are.
|
|
280
|
+
</guidelines>
|