@intentsolutionsio/vercel-pack 1.0.0 → 1.0.3

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 (124) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +67 -44
  3. package/package.json +4 -4
  4. package/skills/vercel-advanced-troubleshooting/SKILL.md +185 -195
  5. package/skills/vercel-advanced-troubleshooting/references/errors.md +11 -0
  6. package/skills/vercel-advanced-troubleshooting/references/evidence-collection-framework.md +34 -0
  7. package/skills/vercel-advanced-troubleshooting/references/examples.md +11 -0
  8. package/skills/vercel-advanced-troubleshooting/references/systematic-isolation.md +56 -0
  9. package/skills/vercel-advanced-troubleshooting/references/timing-analysis.md +35 -0
  10. package/skills/vercel-architecture-variants/SKILL.md +227 -216
  11. package/skills/vercel-architecture-variants/references/errors.md +11 -0
  12. package/skills/vercel-architecture-variants/references/examples.md +12 -0
  13. package/skills/vercel-architecture-variants/references/variant-a-monolith-(simple).md +44 -0
  14. package/skills/vercel-architecture-variants/references/variant-b-service-layer-(moderate).md +72 -0
  15. package/skills/vercel-architecture-variants/references/variant-c-microservice-(complex).md +81 -0
  16. package/skills/vercel-ci-integration/SKILL.md +183 -73
  17. package/skills/vercel-ci-integration/references/errors.md +10 -0
  18. package/skills/vercel-ci-integration/references/examples.md +36 -0
  19. package/skills/vercel-ci-integration/references/implementation.md +54 -0
  20. package/skills/vercel-common-errors/SKILL.md +164 -60
  21. package/skills/vercel-common-errors/references/errors.md +53 -0
  22. package/skills/vercel-common-errors/references/examples.md +23 -0
  23. package/skills/vercel-cost-tuning/SKILL.md +158 -145
  24. package/skills/vercel-cost-tuning/references/cost-estimation.md +34 -0
  25. package/skills/vercel-cost-tuning/references/cost-reduction-strategies.md +40 -0
  26. package/skills/vercel-cost-tuning/references/errors.md +11 -0
  27. package/skills/vercel-cost-tuning/references/examples.md +15 -0
  28. package/skills/vercel-data-handling/SKILL.md +202 -155
  29. package/skills/vercel-data-handling/references/errors.md +11 -0
  30. package/skills/vercel-data-handling/references/examples.md +27 -0
  31. package/skills/vercel-data-handling/references/implementation.md +223 -0
  32. package/skills/vercel-debug-bundle/SKILL.md +163 -67
  33. package/skills/vercel-debug-bundle/references/errors.md +12 -0
  34. package/skills/vercel-debug-bundle/references/examples.md +24 -0
  35. package/skills/vercel-debug-bundle/references/implementation.md +54 -0
  36. package/skills/vercel-deploy-integration/SKILL.md +163 -156
  37. package/skills/vercel-deploy-integration/references/errors.md +11 -0
  38. package/skills/vercel-deploy-integration/references/examples.md +21 -0
  39. package/skills/vercel-deploy-integration/references/google-cloud-run.md +36 -0
  40. package/skills/vercel-deploy-integration/references/vercel-deployment.md +35 -0
  41. package/skills/vercel-deploy-preview/SKILL.md +164 -39
  42. package/skills/vercel-edge-functions/SKILL.md +185 -37
  43. package/skills/vercel-enterprise-rbac/SKILL.md +185 -170
  44. package/skills/vercel-enterprise-rbac/references/errors.md +11 -0
  45. package/skills/vercel-enterprise-rbac/references/examples.md +12 -0
  46. package/skills/vercel-enterprise-rbac/references/role-implementation.md +33 -0
  47. package/skills/vercel-enterprise-rbac/references/sso-integration.md +35 -0
  48. package/skills/vercel-hello-world/SKILL.md +141 -55
  49. package/skills/vercel-incident-runbook/SKILL.md +186 -138
  50. package/skills/vercel-incident-runbook/references/errors.md +11 -0
  51. package/skills/vercel-incident-runbook/references/examples.md +10 -0
  52. package/skills/vercel-incident-runbook/references/immediate-actions-by-error-type.md +41 -0
  53. package/skills/vercel-install-auth/SKILL.md +130 -53
  54. package/skills/vercel-known-pitfalls/SKILL.md +235 -233
  55. package/skills/vercel-known-pitfalls/references/errors.md +11 -0
  56. package/skills/vercel-known-pitfalls/references/examples.md +12 -0
  57. package/skills/vercel-load-scale/SKILL.md +197 -204
  58. package/skills/vercel-load-scale/references/capacity-planning.md +47 -0
  59. package/skills/vercel-load-scale/references/errors.md +11 -0
  60. package/skills/vercel-load-scale/references/examples.md +26 -0
  61. package/skills/vercel-load-scale/references/load-testing-with-k6.md +59 -0
  62. package/skills/vercel-load-scale/references/scaling-patterns.md +65 -0
  63. package/skills/vercel-local-dev-loop/SKILL.md +159 -71
  64. package/skills/vercel-local-dev-loop/references/errors.md +11 -0
  65. package/skills/vercel-local-dev-loop/references/examples.md +21 -0
  66. package/skills/vercel-local-dev-loop/references/implementation.md +60 -0
  67. package/skills/vercel-migration-deep-dive/SKILL.md +202 -187
  68. package/skills/vercel-migration-deep-dive/references/errors.md +11 -0
  69. package/skills/vercel-migration-deep-dive/references/examples.md +12 -0
  70. package/skills/vercel-migration-deep-dive/references/implementation-plan.md +80 -0
  71. package/skills/vercel-migration-deep-dive/references/pre-migration-assessment.md +39 -0
  72. package/skills/vercel-multi-env-setup/SKILL.md +167 -164
  73. package/skills/vercel-multi-env-setup/references/configuration-structure.md +59 -0
  74. package/skills/vercel-multi-env-setup/references/errors.md +11 -0
  75. package/skills/vercel-multi-env-setup/references/examples.md +11 -0
  76. package/skills/vercel-observability/SKILL.md +205 -195
  77. package/skills/vercel-observability/references/alert-configuration.md +40 -0
  78. package/skills/vercel-observability/references/errors.md +11 -0
  79. package/skills/vercel-observability/references/examples.md +13 -0
  80. package/skills/vercel-observability/references/metrics-collection.md +65 -0
  81. package/skills/vercel-performance-tuning/SKILL.md +212 -156
  82. package/skills/vercel-performance-tuning/references/caching-strategy.md +49 -0
  83. package/skills/vercel-performance-tuning/references/errors.md +11 -0
  84. package/skills/vercel-performance-tuning/references/examples.md +13 -0
  85. package/skills/vercel-policy-guardrails/SKILL.md +276 -193
  86. package/skills/vercel-policy-guardrails/references/errors.md +11 -0
  87. package/skills/vercel-policy-guardrails/references/eslint-rules.md +46 -0
  88. package/skills/vercel-policy-guardrails/references/examples.md +10 -0
  89. package/skills/vercel-prod-checklist/SKILL.md +219 -94
  90. package/skills/vercel-prod-checklist/references/errors.md +11 -0
  91. package/skills/vercel-prod-checklist/references/examples.md +25 -0
  92. package/skills/vercel-prod-checklist/references/implementation.md +60 -0
  93. package/skills/vercel-rate-limits/SKILL.md +187 -100
  94. package/skills/vercel-rate-limits/references/errors.md +11 -0
  95. package/skills/vercel-rate-limits/references/examples.md +46 -0
  96. package/skills/vercel-rate-limits/references/implementation.md +66 -0
  97. package/skills/vercel-reference-architecture/SKILL.md +226 -180
  98. package/skills/vercel-reference-architecture/references/errors.md +11 -0
  99. package/skills/vercel-reference-architecture/references/examples.md +13 -0
  100. package/skills/vercel-reference-architecture/references/key-components.md +65 -0
  101. package/skills/vercel-reference-architecture/references/project-structure.md +40 -0
  102. package/skills/vercel-reliability-patterns/SKILL.md +272 -211
  103. package/skills/vercel-reliability-patterns/references/circuit-breaker.md +36 -0
  104. package/skills/vercel-reliability-patterns/references/dead-letter-queue.md +48 -0
  105. package/skills/vercel-reliability-patterns/references/errors.md +11 -0
  106. package/skills/vercel-reliability-patterns/references/examples.md +11 -0
  107. package/skills/vercel-reliability-patterns/references/idempotency-keys.md +36 -0
  108. package/skills/vercel-sdk-patterns/SKILL.md +264 -92
  109. package/skills/vercel-sdk-patterns/references/errors.md +11 -0
  110. package/skills/vercel-sdk-patterns/references/examples.md +45 -0
  111. package/skills/vercel-sdk-patterns/references/implementation.md +67 -0
  112. package/skills/vercel-security-basics/SKILL.md +186 -96
  113. package/skills/vercel-security-basics/references/errors.md +10 -0
  114. package/skills/vercel-security-basics/references/examples.md +70 -0
  115. package/skills/vercel-security-basics/references/implementation.md +39 -0
  116. package/skills/vercel-upgrade-migration/SKILL.md +167 -67
  117. package/skills/vercel-upgrade-migration/references/errors.md +10 -0
  118. package/skills/vercel-upgrade-migration/references/examples.md +51 -0
  119. package/skills/vercel-upgrade-migration/references/implementation.md +29 -0
  120. package/skills/vercel-webhooks-events/SKILL.md +208 -132
  121. package/skills/vercel-webhooks-events/references/errors.md +11 -0
  122. package/skills/vercel-webhooks-events/references/event-handler-pattern.md +37 -0
  123. package/skills/vercel-webhooks-events/references/examples.md +16 -0
  124. package/skills/vercel-webhooks-events/references/signature-verification.md +33 -0
@@ -1,222 +1,225 @@
1
1
  ---
2
2
  name: vercel-multi-env-setup
3
- description: |
4
- Configure Vercel across development, staging, and production environments.
5
- Use when setting up multi-environment deployments, configuring per-environment secrets,
6
- or implementing environment-specific Vercel configurations.
3
+ description: 'Configure Vercel across development, preview, and production environments
4
+ with scoped secrets.
5
+
6
+ Use when setting up per-environment configuration, managing environment-specific
7
+ variables,
8
+
9
+ or implementing environment isolation on Vercel.
10
+
7
11
  Trigger with phrases like "vercel environments", "vercel staging",
8
- "vercel dev prod", "vercel environment setup", "vercel config by env".
9
- allowed-tools: Read, Write, Edit, Bash(aws:*), Bash(gcloud:*), Bash(vault:*)
12
+
13
+ "vercel dev prod", "vercel environment setup", "vercel env scoping".
14
+
15
+ '
16
+ allowed-tools: Read, Write, Edit, Bash(vercel:*)
10
17
  version: 1.0.0
11
18
  license: MIT
12
19
  author: Jeremy Longshore <jeremy@intentsolutions.io>
20
+ tags:
21
+ - saas
22
+ - vercel
23
+ - deployment
24
+ - environments
25
+ - configuration
26
+ compatibility: Designed for Claude Code, also compatible with Codex and OpenClaw
13
27
  ---
14
-
15
- # Vercel Multi-Environment Setup
28
+ # Vercel Multi-Env Setup
16
29
 
17
30
  ## Overview
18
- Configure Vercel across development, staging, and production environments.
19
31
 
20
- ## Prerequisites
21
- - Separate Vercel accounts or API keys per environment
22
- - Secret management solution (Vault, AWS Secrets Manager, etc.)
23
- - CI/CD pipeline with environment variables
24
- - Environment detection in application
32
+ Configure Vercel's three built-in environments (Development, Preview, Production) with scoped environment variables, branch-specific preview URLs, and custom environments for staging. Uses Vercel's native environment system and the REST API for automation.
25
33
 
26
- ## Environment Strategy
34
+ ## Prerequisites
27
35
 
28
- | Environment | Purpose | API Keys | Data |
29
- |-------------|---------|----------|------|
30
- | Development | Local dev | Test keys | Sandbox |
31
- | Staging | Pre-prod validation | Staging keys | Test data |
32
- | Production | Live traffic | Production keys | Real data |
36
+ - Vercel project linked and deployed
37
+ - Separate database instances per environment (recommended)
38
+ - Access to Vercel dashboard or VERCEL_TOKEN for API
33
39
 
34
- ## Configuration Structure
40
+ ## Instructions
35
41
 
36
- ```
37
- config/
38
- ├── vercel/
39
- │ ├── base.json # Shared config
40
- │ ├── development.json # Dev overrides
41
- │ ├── staging.json # Staging overrides
42
- │ └── production.json # Prod overrides
43
- ```
42
+ ### Step 1: Understand Vercel's Environment Model
44
43
 
45
- ### base.json
46
- ```json
47
- {
48
- "timeout": 30000,
49
- "retries": 3,
50
- "cache": {
51
- "enabled": true,
52
- "ttlSeconds": 60
53
- }
54
- }
55
- ```
44
+ Vercel provides three built-in environments:
56
45
 
57
- ### development.json
58
- ```json
59
- {
60
- "apiKey": "${VERCEL_API_KEY}",
61
- "baseUrl": "https://api-sandbox.vercel.com",
62
- "debug": true,
63
- "cache": {
64
- "enabled": false
65
- }
66
- }
67
- ```
46
+ | Environment | Trigger | URL Pattern | Use Case |
47
+ |-------------|---------|-------------|----------|
48
+ | Production | Push to production branch | `yourdomain.com` | Live traffic |
49
+ | Preview | Push to any other branch | `project-git-branch-team.vercel.app` | PR review |
50
+ | Development | `vercel dev` locally | `localhost:3000` | Local dev |
68
51
 
69
- ### staging.json
70
- ```json
71
- {
72
- "apiKey": "${VERCEL_API_KEY_STAGING}",
73
- "baseUrl": "https://api-staging.vercel.com",
74
- "debug": false
75
- }
76
- ```
52
+ ### Step 2: Scope Environment Variables
77
53
 
78
- ### production.json
79
- ```json
80
- {
81
- "apiKey": "${VERCEL_API_KEY_PROD}",
82
- "baseUrl": "https://api.vercel.com",
83
- "debug": false,
84
- "retries": 5
85
- }
86
- ```
54
+ ```bash
55
+ # Add a variable scoped to Production only
56
+ vercel env add DATABASE_URL production
57
+ # Enter: postgres://prod-host:5432/myapp
87
58
 
88
- ## Environment Detection
59
+ # Add a variable scoped to Preview only
60
+ vercel env add DATABASE_URL preview
61
+ # Enter: postgres://staging-host:5432/myapp_staging
89
62
 
90
- ```typescript
91
- // src/vercel/config.ts
92
- import baseConfig from '../../config/vercel/base.json';
63
+ # Add a variable scoped to Development only
64
+ vercel env add DATABASE_URL development
65
+ # Enter: postgres://localhost:5432/myapp_dev
93
66
 
94
- type Environment = 'development' | 'staging' | 'production';
67
+ # Add a variable available in ALL environments
68
+ vercel env add NEXT_PUBLIC_APP_NAME production preview development
69
+ # Enter: My App
95
70
 
96
- function detectEnvironment(): Environment {
97
- const env = process.env.NODE_ENV || 'development';
98
- const validEnvs: Environment[] = ['development', 'staging', 'production'];
99
- return validEnvs.includes(env as Environment)
100
- ? (env as Environment)
101
- : 'development';
102
- }
71
+ # List all env vars with their scopes
72
+ vercel env ls
73
+ ```
103
74
 
104
- export function getVercelConfig() {
105
- const env = detectEnvironment();
106
- const envConfig = require(`../../config/vercel/${env}.json`);
75
+ ### Step 3: Via REST API (Automation)
107
76
 
108
- return {
109
- ...baseConfig,
110
- ...envConfig,
111
- environment: env,
112
- };
113
- }
77
+ ```bash
78
+ # Create env vars with specific scoping
79
+ curl -X POST "https://api.vercel.com/v9/projects/my-app/env" \
80
+ -H "Authorization: Bearer $VERCEL_TOKEN" \
81
+ -H "Content-Type: application/json" \
82
+ -d '{
83
+ "key": "DATABASE_URL",
84
+ "value": "postgres://prod-host:5432/myapp",
85
+ "type": "encrypted",
86
+ "target": ["production"]
87
+ }'
88
+
89
+ # Upsert — update if exists, create if not
90
+ curl -X POST "https://api.vercel.com/v9/projects/my-app/env?upsert=true" \
91
+ -H "Authorization: Bearer $VERCEL_TOKEN" \
92
+ -H "Content-Type: application/json" \
93
+ -d '{
94
+ "key": "DATABASE_URL",
95
+ "value": "postgres://staging-host:5432/myapp_staging",
96
+ "type": "encrypted",
97
+ "target": ["preview"]
98
+ }'
99
+
100
+ # List all env vars for a project
101
+ curl -s -H "Authorization: Bearer $VERCEL_TOKEN" \
102
+ "https://api.vercel.com/v9/projects/my-app/env" \
103
+ | jq '.envs[] | {key, target, type}'
114
104
  ```
115
105
 
116
- ## Secret Management by Environment
106
+ ### Step 4: Custom Environments (Beyond Dev/Preview/Prod)
107
+
108
+ Vercel supports custom environments for staging, QA, etc.:
117
109
 
118
- ### Local Development
119
110
  ```bash
120
- # .env.local (git-ignored)
121
- VERCEL_API_KEY=sk_test_dev_***
111
+ # Create a custom environment via API
112
+ curl -X POST "https://api.vercel.com/v1/projects/my-app/custom-environments" \
113
+ -H "Authorization: Bearer $VERCEL_TOKEN" \
114
+ -H "Content-Type: application/json" \
115
+ -d '{
116
+ "name": "Staging",
117
+ "slug": "staging",
118
+ "branchPattern": "staging"
119
+ }'
122
120
  ```
123
121
 
124
- ### CI/CD (GitHub Actions)
125
- ```yaml
126
- env:
127
- VERCEL_API_KEY: ${{ secrets.VERCEL_API_KEY_${{ matrix.environment }} }}
128
- ```
122
+ Or in the dashboard: **Settings > Environments > Create Environment**
129
123
 
130
- ### Production (Vault/Secrets Manager)
131
- ```bash
132
- # AWS Secrets Manager
133
- aws secretsmanager get-secret-value --secret-id vercel/production/api-key
124
+ Custom environments let you:
134
125
 
135
- # GCP Secret Manager
136
- gcloud secrets versions access latest --secret=vercel-api-key
126
+ - Link a specific Git branch to the environment
127
+ - Scope environment variables to it
128
+ - Assign a custom domain (e.g., `staging.yourdomain.com`)
137
129
 
138
- # HashiCorp Vault
139
- vault kv get -field=api_key secret/vercel/production
130
+ ### Step 5: Branch-Specific Preview Domains
131
+
132
+ ```bash
133
+ # Assign a custom domain to a specific branch
134
+ # In dashboard: Settings > Domains > Add
135
+ # Set Git Branch: "staging"
136
+ # Domain: staging.yourdomain.com
137
+
138
+ # Via API — add domain to project with branch targeting
139
+ curl -X POST "https://api.vercel.com/v9/projects/my-app/domains" \
140
+ -H "Authorization: Bearer $VERCEL_TOKEN" \
141
+ -H "Content-Type: application/json" \
142
+ -d '{
143
+ "name": "staging.yourdomain.com",
144
+ "gitBranch": "staging"
145
+ }'
140
146
  ```
141
147
 
142
- ## Environment Isolation
148
+ ### Step 6: Environment Detection in Code
143
149
 
144
150
  ```typescript
145
- // Prevent production operations in non-prod
146
- function guardProductionOperation(operation: string): void {
147
- const config = getVercelConfig();
151
+ // src/lib/env.ts detect environment at runtime
152
+ export function getEnvironment(): 'production' | 'preview' | 'development' {
153
+ return (process.env.VERCEL_ENV as any) ?? 'development';
154
+ }
148
155
 
149
- if (config.environment !== 'production') {
150
- console.warn(`[vercel] ${operation} blocked in ${config.environment}`);
151
- throw new Error(`${operation} only allowed in production`);
156
+ // Environment-specific behavior
157
+ export function getApiBaseUrl(): string {
158
+ switch (getEnvironment()) {
159
+ case 'production':
160
+ return 'https://api.yourdomain.com';
161
+ case 'preview':
162
+ return `https://${process.env.VERCEL_URL}`;
163
+ case 'development':
164
+ return 'http://localhost:3000';
152
165
  }
153
166
  }
154
167
 
155
- // Usage
156
- async function deleteAllData() {
157
- guardProductionOperation('deleteAllData');
158
- // Dangerous operation here
168
+ // Production safeguards
169
+ export function assertNotProduction(operation: string): void {
170
+ if (getEnvironment() === 'production') {
171
+ throw new Error(`Dangerous operation "${operation}" blocked in production`);
172
+ }
159
173
  }
160
174
  ```
161
175
 
162
- ## Feature Flags by Environment
163
-
164
- ```typescript
165
- const featureFlags: Record<Environment, Record<string, boolean>> = {
166
- development: {
167
- newFeature: true,
168
- betaApi: true,
169
- },
170
- staging: {
171
- newFeature: true,
172
- betaApi: false,
173
- },
174
- production: {
175
- newFeature: false,
176
- betaApi: false,
177
- },
178
- };
179
- ```
176
+ ### Step 7: Pull Env Vars for Local Development
180
177
 
181
- ## Instructions
178
+ ```bash
179
+ # Pull Development-scoped vars to local file
180
+ vercel env pull .env.development.local
182
181
 
183
- ### Step 1: Create Config Structure
184
- Set up the base and per-environment configuration files.
182
+ # Pull Preview-scoped vars (for testing preview behavior locally)
183
+ vercel env pull --environment=preview .env.preview.local
185
184
 
186
- ### Step 2: Implement Environment Detection
187
- Add logic to detect and load environment-specific config.
185
+ # .gitignore these files
186
+ echo '.env*.local' >> .gitignore
187
+ ```
188
188
 
189
- ### Step 3: Configure Secrets
190
- Store API keys securely using your secret management solution.
189
+ ## Environment Variable Types
191
190
 
192
- ### Step 4: Add Environment Guards
193
- Implement safeguards for production-only operations.
191
+ | Type | Dashboard Visibility | Log Visibility | Use Case |
192
+ |------|---------------------|---------------|----------|
193
+ | `plain` | Visible | Visible | Non-sensitive config |
194
+ | `encrypted` | Hidden after save | Hidden | API keys, secrets |
195
+ | `sensitive` | Always hidden | Hidden | High-security secrets |
196
+ | `system` | Auto-set by Vercel | Visible | `VERCEL_ENV`, `VERCEL_URL` |
194
197
 
195
198
  ## Output
196
- - Multi-environment config structure
197
- - Environment detection logic
198
- - Secure secret management
199
- - Production safeguards enabled
200
199
 
201
- ## Error Handling
202
- | Issue | Cause | Solution |
203
- |-------|-------|----------|
204
- | Wrong environment | Missing NODE_ENV | Set environment variable |
205
- | Secret not found | Wrong secret path | Verify secret manager config |
206
- | Config merge fails | Invalid JSON | Validate config files |
207
- | Production guard triggered | Wrong environment | Check NODE_ENV value |
200
+ - Environment variables scoped per environment (dev/preview/prod)
201
+ - Custom staging environment with dedicated branch and domain
202
+ - Environment detection logic for runtime behavior switching
203
+ - Local development env vars pulled from Vercel
208
204
 
209
- ## Examples
205
+ ## Error Handling
210
206
 
211
- ### Quick Environment Check
212
- ```typescript
213
- const env = getVercelConfig();
214
- console.log(`Running in ${env.environment} with ${env.baseUrl}`);
215
- ```
207
+ | Error | Cause | Solution |
208
+ |-------|-------|----------|
209
+ | Env var undefined in preview | Not scoped to Preview target | Re-add with Preview in target array |
210
+ | Wrong database in production | Preview DB URL used in prod | Check env var scoping per environment |
211
+ | `vercel env pull` empty | No Development-scoped vars | Add vars with Development target |
212
+ | Custom env not triggering | Branch pattern doesn't match | Check branch name matches environment slug |
213
+ | Sensitive var can't be read | type=sensitive hides value | Re-add the var if value is lost |
216
214
 
217
215
  ## Resources
218
- - [Vercel Environments Guide](https://vercel.com/docs/environments)
219
- - [12-Factor App Config](https://12factor.net/config)
216
+
217
+ - [Environment Variables](https://vercel.com/docs/environment-variables)
218
+ - [Environments](https://vercel.com/docs/deployments/environments)
219
+ - [System Environment Variables](https://vercel.com/docs/environment-variables/system-environment-variables)
220
+ - [Managing Environment Variables](https://vercel.com/docs/environment-variables/managing-environment-variables)
221
+ - [REST API: Environment Variables](https://vercel.com/docs/rest-api/sdk/examples/environment-variables)
220
222
 
221
223
  ## Next Steps
222
- For observability setup, see `vercel-observability`.
224
+
225
+ For observability and monitoring, see `vercel-observability`.
@@ -0,0 +1,59 @@
1
+ # Configuration Structure
2
+
3
+ ## Configuration Structure
4
+
5
+ ```
6
+ config/
7
+ ├── vercel/
8
+ │ ├── base.json # Shared config
9
+ │ ├── development.json # Dev overrides
10
+ │ ├── staging.json # Staging overrides
11
+ │ └── production.json # Prod overrides
12
+ ```
13
+
14
+ ### base.json
15
+
16
+ ```json
17
+ {
18
+ "timeout": 30000,
19
+ "retries": 3,
20
+ "cache": {
21
+ "enabled": true,
22
+ "ttlSeconds": 60
23
+ }
24
+ }
25
+ ```
26
+
27
+ ### development.json
28
+
29
+ ```json
30
+ {
31
+ "apiKey": "${VERCEL_API_KEY}",
32
+ "baseUrl": "https://api-sandbox.vercel.com",
33
+ "debug": true,
34
+ "cache": {
35
+ "enabled": false
36
+ }
37
+ }
38
+ ```
39
+
40
+ ### staging.json
41
+
42
+ ```json
43
+ {
44
+ "apiKey": "${VERCEL_API_KEY_STAGING}",
45
+ "baseUrl": "https://api-staging.vercel.com",
46
+ "debug": false
47
+ }
48
+ ```
49
+
50
+ ### production.json
51
+
52
+ ```json
53
+ {
54
+ "apiKey": "${VERCEL_API_KEY_PROD}",
55
+ "baseUrl": "https://api.vercel.com",
56
+ "debug": false,
57
+ "retries": 5
58
+ }
59
+ ```
@@ -0,0 +1,11 @@
1
+ # Error Handling Reference
2
+
3
+ | Issue | Cause | Solution |
4
+ |-------|-------|----------|
5
+ | Wrong environment | Missing NODE_ENV | Set environment variable |
6
+ | Secret not found | Wrong secret path | Verify secret manager config |
7
+ | Config merge fails | Invalid JSON | Validate config files |
8
+ | Production guard triggered | Wrong environment | Check NODE_ENV value |
9
+
10
+ ---
11
+ *[Tons of Skills](https://tonsofskills.com) by [Intent Solutions](https://intentsolutions.io) | [jeremylongshore.com](https://jeremylongshore.com)*
@@ -0,0 +1,11 @@
1
+ ## Examples
2
+
3
+ ### Quick Environment Check
4
+
5
+ ```typescript
6
+ const env = getVercelConfig();
7
+ console.log(`Running in ${env.environment} with ${env.baseUrl}`);
8
+ ```
9
+
10
+ ---
11
+ *[Tons of Skills](https://tonsofskills.com) by [Intent Solutions](https://intentsolutions.io) | [jeremylongshore.com](https://jeremylongshore.com)*