ai-flow-dev 2.7.0 โ†’ 2.8.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 (171) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +573 -570
  3. package/package.json +74 -74
  4. package/prompts/backend/flow-build-phase-0.md +535 -535
  5. package/prompts/backend/flow-build-phase-1.md +626 -626
  6. package/prompts/backend/flow-build-phase-10.md +340 -340
  7. package/prompts/backend/flow-build-phase-2.md +573 -573
  8. package/prompts/backend/flow-build-phase-3.md +834 -834
  9. package/prompts/backend/flow-build-phase-4.md +554 -554
  10. package/prompts/backend/flow-build-phase-5.md +703 -703
  11. package/prompts/backend/flow-build-phase-6.md +524 -524
  12. package/prompts/backend/flow-build-phase-7.md +1001 -1001
  13. package/prompts/backend/flow-build-phase-8.md +1407 -1407
  14. package/prompts/backend/flow-build-phase-9.md +477 -477
  15. package/prompts/backend/flow-build.md +137 -137
  16. package/prompts/backend/flow-check-review.md +656 -20
  17. package/prompts/backend/flow-check-test.md +526 -14
  18. package/prompts/backend/flow-check.md +725 -67
  19. package/prompts/backend/flow-commit.md +88 -119
  20. package/prompts/backend/flow-docs-sync.md +354 -354
  21. package/prompts/backend/flow-finish.md +919 -0
  22. package/prompts/backend/flow-release.md +949 -0
  23. package/prompts/backend/flow-work-feature.md +61 -61
  24. package/prompts/backend/flow-work-fix.md +46 -46
  25. package/prompts/backend/flow-work-refactor.md +48 -48
  26. package/prompts/backend/flow-work-resume.md +34 -34
  27. package/prompts/backend/flow-work.md +1098 -1286
  28. package/prompts/desktop/flow-build-phase-0.md +359 -359
  29. package/prompts/desktop/flow-build-phase-1.md +295 -295
  30. package/prompts/desktop/flow-build-phase-10.md +357 -357
  31. package/prompts/desktop/flow-build-phase-2.md +282 -282
  32. package/prompts/desktop/flow-build-phase-3.md +291 -291
  33. package/prompts/desktop/flow-build-phase-4.md +308 -308
  34. package/prompts/desktop/flow-build-phase-5.md +269 -269
  35. package/prompts/desktop/flow-build-phase-6.md +350 -350
  36. package/prompts/desktop/flow-build-phase-7.md +297 -297
  37. package/prompts/desktop/flow-build-phase-8.md +541 -541
  38. package/prompts/desktop/flow-build-phase-9.md +439 -439
  39. package/prompts/desktop/flow-build.md +156 -156
  40. package/prompts/desktop/flow-check-review.md +656 -20
  41. package/prompts/desktop/flow-check-test.md +526 -14
  42. package/prompts/desktop/flow-check.md +725 -67
  43. package/prompts/desktop/flow-commit.md +88 -119
  44. package/prompts/desktop/flow-docs-sync.md +354 -354
  45. package/prompts/desktop/flow-finish.md +910 -0
  46. package/prompts/desktop/flow-release.md +662 -0
  47. package/prompts/desktop/flow-work-feature.md +61 -61
  48. package/prompts/desktop/flow-work-fix.md +46 -46
  49. package/prompts/desktop/flow-work-refactor.md +48 -48
  50. package/prompts/desktop/flow-work-resume.md +34 -34
  51. package/prompts/desktop/flow-work.md +1202 -1390
  52. package/prompts/frontend/flow-build-phase-0.md +425 -425
  53. package/prompts/frontend/flow-build-phase-1.md +626 -626
  54. package/prompts/frontend/flow-build-phase-10.md +33 -33
  55. package/prompts/frontend/flow-build-phase-2.md +573 -573
  56. package/prompts/frontend/flow-build-phase-3.md +782 -782
  57. package/prompts/frontend/flow-build-phase-4.md +554 -554
  58. package/prompts/frontend/flow-build-phase-5.md +703 -703
  59. package/prompts/frontend/flow-build-phase-6.md +524 -524
  60. package/prompts/frontend/flow-build-phase-7.md +1001 -1001
  61. package/prompts/frontend/flow-build-phase-8.md +872 -872
  62. package/prompts/frontend/flow-build-phase-9.md +94 -94
  63. package/prompts/frontend/flow-build.md +137 -137
  64. package/prompts/frontend/flow-check-review.md +656 -20
  65. package/prompts/frontend/flow-check-test.md +526 -14
  66. package/prompts/frontend/flow-check.md +725 -67
  67. package/prompts/frontend/flow-commit.md +88 -119
  68. package/prompts/frontend/flow-docs-sync.md +550 -550
  69. package/prompts/frontend/flow-finish.md +910 -0
  70. package/prompts/frontend/flow-release.md +519 -0
  71. package/prompts/frontend/flow-work-api.md +1540 -0
  72. package/prompts/frontend/flow-work-feature.md +61 -61
  73. package/prompts/frontend/flow-work-fix.md +38 -38
  74. package/prompts/frontend/flow-work-refactor.md +48 -48
  75. package/prompts/frontend/flow-work-resume.md +34 -34
  76. package/prompts/frontend/flow-work.md +1583 -1320
  77. package/prompts/mobile/flow-build-phase-0.md +425 -425
  78. package/prompts/mobile/flow-build-phase-1.md +626 -626
  79. package/prompts/mobile/flow-build-phase-10.md +32 -32
  80. package/prompts/mobile/flow-build-phase-2.md +573 -573
  81. package/prompts/mobile/flow-build-phase-3.md +782 -782
  82. package/prompts/mobile/flow-build-phase-4.md +554 -554
  83. package/prompts/mobile/flow-build-phase-5.md +703 -703
  84. package/prompts/mobile/flow-build-phase-6.md +524 -524
  85. package/prompts/mobile/flow-build-phase-7.md +1001 -1001
  86. package/prompts/mobile/flow-build-phase-8.md +888 -888
  87. package/prompts/mobile/flow-build-phase-9.md +90 -90
  88. package/prompts/mobile/flow-build.md +135 -135
  89. package/prompts/mobile/flow-check-review.md +656 -20
  90. package/prompts/mobile/flow-check-test.md +526 -14
  91. package/prompts/mobile/flow-check.md +725 -67
  92. package/prompts/mobile/flow-commit.md +88 -119
  93. package/prompts/mobile/flow-docs-sync.md +620 -620
  94. package/prompts/mobile/flow-finish.md +910 -0
  95. package/prompts/mobile/flow-release.md +751 -0
  96. package/prompts/mobile/flow-work-api.md +1493 -0
  97. package/prompts/mobile/flow-work-feature.md +61 -61
  98. package/prompts/mobile/flow-work-fix.md +46 -46
  99. package/prompts/mobile/flow-work-refactor.md +48 -48
  100. package/prompts/mobile/flow-work-resume.md +34 -34
  101. package/prompts/mobile/flow-work.md +1593 -1329
  102. package/prompts/shared/mermaid-guidelines.md +102 -102
  103. package/prompts/shared/scope-levels.md +114 -114
  104. package/prompts/shared/smart-skip-preflight.md +214 -214
  105. package/prompts/shared/story-points.md +55 -55
  106. package/prompts/shared/task-format.md +74 -74
  107. package/prompts/shared/task-summary-template.md +277 -277
  108. package/templates/AGENT.template.md +443 -443
  109. package/templates/backend/.clauderules.template +112 -112
  110. package/templates/backend/.cursorrules.template +102 -102
  111. package/templates/backend/README.template.md +2 -2
  112. package/templates/backend/ai-instructions.template.md +2 -2
  113. package/templates/backend/copilot-instructions.template.md +2 -2
  114. package/templates/backend/docs/api.template.md +320 -320
  115. package/templates/backend/docs/business-flows.template.md +97 -97
  116. package/templates/backend/docs/code-standards.template.md +2 -2
  117. package/templates/backend/docs/contributing.template.md +3 -3
  118. package/templates/backend/docs/data-model.template.md +520 -520
  119. package/templates/backend/docs/testing.template.md +2 -2
  120. package/templates/backend/project-brief.template.md +2 -2
  121. package/templates/backend/specs/configuration.template.md +2 -2
  122. package/templates/backend/specs/security.template.md +2 -2
  123. package/templates/desktop/.clauderules.template +112 -112
  124. package/templates/desktop/.cursorrules.template +102 -102
  125. package/templates/desktop/README.template.md +170 -170
  126. package/templates/desktop/ai-instructions.template.md +366 -366
  127. package/templates/desktop/copilot-instructions.template.md +140 -140
  128. package/templates/desktop/docs/docs/api.template.md +320 -320
  129. package/templates/desktop/docs/docs/architecture.template.md +724 -724
  130. package/templates/desktop/docs/docs/business-flows.template.md +102 -102
  131. package/templates/desktop/docs/docs/code-standards.template.md +792 -792
  132. package/templates/desktop/docs/docs/contributing.template.md +149 -149
  133. package/templates/desktop/docs/docs/data-model.template.md +520 -520
  134. package/templates/desktop/docs/docs/operations.template.md +720 -720
  135. package/templates/desktop/docs/docs/testing.template.md +722 -722
  136. package/templates/desktop/project-brief.template.md +150 -150
  137. package/templates/desktop/specs/specs/configuration.template.md +121 -121
  138. package/templates/desktop/specs/specs/security.template.md +392 -392
  139. package/templates/frontend/README.template.md +2 -2
  140. package/templates/frontend/ai-instructions.template.md +2 -2
  141. package/templates/frontend/docs/api-integration.template.md +362 -362
  142. package/templates/frontend/docs/components.template.md +2 -2
  143. package/templates/frontend/docs/error-handling.template.md +360 -360
  144. package/templates/frontend/docs/operations.template.md +107 -107
  145. package/templates/frontend/docs/performance.template.md +124 -124
  146. package/templates/frontend/docs/pwa.template.md +119 -119
  147. package/templates/frontend/docs/state-management.template.md +2 -2
  148. package/templates/frontend/docs/styling.template.md +2 -2
  149. package/templates/frontend/docs/testing.template.md +2 -2
  150. package/templates/frontend/project-brief.template.md +2 -2
  151. package/templates/frontend/specs/accessibility.template.md +95 -95
  152. package/templates/frontend/specs/configuration.template.md +2 -2
  153. package/templates/frontend/specs/security.template.md +175 -175
  154. package/templates/fullstack/README.template.md +252 -252
  155. package/templates/fullstack/ai-instructions.template.md +444 -444
  156. package/templates/fullstack/project-brief.template.md +157 -157
  157. package/templates/fullstack/specs/configuration.template.md +340 -340
  158. package/templates/mobile/README.template.md +167 -167
  159. package/templates/mobile/ai-instructions.template.md +196 -196
  160. package/templates/mobile/docs/app-store.template.md +135 -135
  161. package/templates/mobile/docs/architecture.template.md +63 -63
  162. package/templates/mobile/docs/native-features.template.md +94 -94
  163. package/templates/mobile/docs/navigation.template.md +59 -59
  164. package/templates/mobile/docs/offline-strategy.template.md +65 -65
  165. package/templates/mobile/docs/permissions.template.md +56 -56
  166. package/templates/mobile/docs/state-management.template.md +85 -85
  167. package/templates/mobile/docs/testing.template.md +109 -109
  168. package/templates/mobile/project-brief.template.md +69 -69
  169. package/templates/mobile/specs/build-configuration.template.md +91 -91
  170. package/templates/mobile/specs/deployment.template.md +92 -92
  171. package/templates/work.template.md +47 -47
@@ -1,354 +1,354 @@
1
- # Configuration Specifications
2
-
3
- > Environment variables and configuration management for {{PROJECT_NAME}} (Full Stack)
1
+ # Configuration Specifications
2
+
3
+ > Environment variables and configuration management for {{PROJECT_NAME}} (Full Stack)
4
4
  ---
5
- ## ๐ŸŽฏ Configuration Strategy
6
-
7
- **Approach:** {{CONFIGURATION_APPROACH}}
8
-
9
- **Key Principles:**
10
- 1. **Separation of Concerns** - Backend vs Frontend config
11
- 2. **Security First** - Never expose secrets to client
12
- 3. **Type Safety** - Validate and type all config
13
- 4. **Environment Parity** - Consistent config across environments
5
+ ## ๐ŸŽฏ Configuration Strategy
6
+
7
+ **Approach:** {{CONFIGURATION_APPROACH}}
8
+
9
+ **Key Principles:**
10
+ 1. **Separation of Concerns** - Backend vs Frontend config
11
+ 2. **Security First** - Never expose secrets to client
12
+ 3. **Type Safety** - Validate and type all config
13
+ 4. **Environment Parity** - Consistent config across environments
14
14
  ---
15
- ## ๐Ÿ“ Configuration Files Structure
16
-
17
- ```
18
- {{PROJECT_NAME}}/
19
- โ”œโ”€โ”€ backend/
20
- โ”‚ โ”œโ”€โ”€ .env.local # Local overrides (gitignored)
21
- โ”‚ โ”œโ”€โ”€ .env.development # Development defaults
22
- โ”‚ โ”œโ”€โ”€ .env.production # Production defaults
23
- โ”‚ โ””โ”€โ”€ .env.example # Template for new developers
24
- โ”œโ”€โ”€ frontend/
25
- โ”‚ โ”œโ”€โ”€ .env.local # Local overrides (gitignored)
26
- โ”‚ โ”œโ”€โ”€ .env.development # Development defaults
27
- โ”‚ โ”œโ”€โ”€ .env.production # Production defaults
28
- โ”‚ โ”œโ”€โ”€ .env.example # Template for new developers
29
- โ”‚ โ””โ”€โ”€ src/
30
- โ”‚ โ””โ”€โ”€ config/
31
- โ”‚ โ”œโ”€โ”€ index.ts # Configuration loader
32
- โ”‚ โ”œโ”€โ”€ schema.ts # Validation schema
33
- โ”‚ โ””โ”€โ”€ constants.ts # Static constants
34
- ```
15
+ ## ๐Ÿ“ Configuration Files Structure
16
+
17
+ ```
18
+ {{PROJECT_NAME}}/
19
+ โ”œโ”€โ”€ backend/
20
+ โ”‚ โ”œโ”€โ”€ .env.local # Local overrides (gitignored)
21
+ โ”‚ โ”œโ”€โ”€ .env.development # Development defaults
22
+ โ”‚ โ”œโ”€โ”€ .env.production # Production defaults
23
+ โ”‚ โ””โ”€โ”€ .env.example # Template for new developers
24
+ โ”œโ”€โ”€ frontend/
25
+ โ”‚ โ”œโ”€โ”€ .env.local # Local overrides (gitignored)
26
+ โ”‚ โ”œโ”€โ”€ .env.development # Development defaults
27
+ โ”‚ โ”œโ”€โ”€ .env.production # Production defaults
28
+ โ”‚ โ”œโ”€โ”€ .env.example # Template for new developers
29
+ โ”‚ โ””โ”€โ”€ src/
30
+ โ”‚ โ””โ”€โ”€ config/
31
+ โ”‚ โ”œโ”€โ”€ index.ts # Configuration loader
32
+ โ”‚ โ”œโ”€โ”€ schema.ts # Validation schema
33
+ โ”‚ โ””โ”€โ”€ constants.ts # Static constants
34
+ ```
35
35
  ---
36
- ## ๐Ÿ” Backend Environment Variables
37
-
38
- ### Required Variables
39
-
40
- {{#EACH BACKEND_REQUIRED_VAR}}
41
- #### `{{VAR_NAME}}`
42
-
43
- **Description:** {{VAR_DESCRIPTION}}
44
-
45
- **Type:** {{VAR_TYPE}}
46
-
47
- **Example:** `{{VAR_EXAMPLE}}`
48
-
49
- {{#IF VAR_VALIDATION}}**Validation:** {{VAR_VALIDATION}}{{/IF}}
50
-
51
- {{/EACH}}
52
-
53
- ### Optional Variables
54
-
55
- {{#EACH BACKEND_OPTIONAL_VAR}}
56
- #### `{{VAR_NAME}}`
57
-
58
- **Description:** {{VAR_DESCRIPTION}}
59
-
60
- **Type:** {{VAR_TYPE}}
61
-
62
- **Default:** `{{VAR_DEFAULT}}`
63
-
64
- **Example:** `{{VAR_EXAMPLE}}`
65
-
66
- {{/EACH}}
36
+ ## ๐Ÿ” Backend Environment Variables
37
+
38
+ ### Required Variables
39
+
40
+ {{#EACH BACKEND_REQUIRED_VAR}}
41
+ #### `{{VAR_NAME}}`
42
+
43
+ **Description:** {{VAR_DESCRIPTION}}
44
+
45
+ **Type:** {{VAR_TYPE}}
46
+
47
+ **Example:** `{{VAR_EXAMPLE}}`
48
+
49
+ {{#IF VAR_VALIDATION}}**Validation:** {{VAR_VALIDATION}}{{/IF}}
50
+
51
+ {{/EACH}}
52
+
53
+ ### Optional Variables
54
+
55
+ {{#EACH BACKEND_OPTIONAL_VAR}}
56
+ #### `{{VAR_NAME}}`
57
+
58
+ **Description:** {{VAR_DESCRIPTION}}
59
+
60
+ **Type:** {{VAR_TYPE}}
61
+
62
+ **Default:** `{{VAR_DEFAULT}}`
63
+
64
+ **Example:** `{{VAR_EXAMPLE}}`
65
+
66
+ {{/EACH}}
67
67
  ---
68
- ## ๐ŸŽจ Frontend Environment Variables
69
-
70
- ### Required Variables
71
-
72
- **Format:** `VITE_[CATEGORY]_[NAME]` (or your build tool's prefix)
73
-
74
- {{#EACH FRONTEND_REQUIRED_VAR}}
75
- #### `{{VAR_NAME}}`
76
-
77
- **Description:** {{VAR_DESCRIPTION}}
78
-
79
- **Type:** {{VAR_TYPE}}
80
-
81
- **Example:** `{{VAR_EXAMPLE}}`
82
-
83
- {{#IF VAR_VALIDATION}}**Validation:** {{VAR_VALIDATION}}{{/IF}}
84
-
85
- {{/EACH}}
86
-
87
- ### Optional Variables
88
-
89
- {{#EACH FRONTEND_OPTIONAL_VAR}}
90
- #### `{{VAR_NAME}}`
91
-
92
- **Description:** {{VAR_DESCRIPTION}}
93
-
94
- **Type:** {{VAR_TYPE}}
95
-
96
- **Default:** `{{VAR_DEFAULT}}`
97
-
98
- **Example:** `{{VAR_EXAMPLE}}`
99
-
100
- {{/EACH}}
101
-
102
- ### Variable Naming Convention (Frontend)
103
-
104
- **Format:** `VITE_[CATEGORY]_[NAME]`
105
-
106
- **Categories:**
107
- - `VITE_APP_*` - Application metadata
108
- - `VITE_API_*` - API endpoints (points to backend)
109
- - `VITE_AUTH_*` - Authentication config
110
- - `VITE_FEATURE_*` - Feature flags
111
- - `VITE_ANALYTICS_*` - Analytics services
112
-
113
- **Important:** Only variables prefixed with `VITE_` (or your build tool's prefix) are exposed to the client.
68
+ ## ๐ŸŽจ Frontend Environment Variables
69
+
70
+ ### Required Variables
71
+
72
+ **Format:** `VITE_[CATEGORY]_[NAME]` (or your build tool's prefix)
73
+
74
+ {{#EACH FRONTEND_REQUIRED_VAR}}
75
+ #### `{{VAR_NAME}}`
76
+
77
+ **Description:** {{VAR_DESCRIPTION}}
78
+
79
+ **Type:** {{VAR_TYPE}}
80
+
81
+ **Example:** `{{VAR_EXAMPLE}}`
82
+
83
+ {{#IF VAR_VALIDATION}}**Validation:** {{VAR_VALIDATION}}{{/IF}}
84
+
85
+ {{/EACH}}
86
+
87
+ ### Optional Variables
88
+
89
+ {{#EACH FRONTEND_OPTIONAL_VAR}}
90
+ #### `{{VAR_NAME}}`
91
+
92
+ **Description:** {{VAR_DESCRIPTION}}
93
+
94
+ **Type:** {{VAR_TYPE}}
95
+
96
+ **Default:** `{{VAR_DEFAULT}}`
97
+
98
+ **Example:** `{{VAR_EXAMPLE}}`
99
+
100
+ {{/EACH}}
101
+
102
+ ### Variable Naming Convention (Frontend)
103
+
104
+ **Format:** `VITE_[CATEGORY]_[NAME]`
105
+
106
+ **Categories:**
107
+ - `VITE_APP_*` - Application metadata
108
+ - `VITE_API_*` - API endpoints (points to backend)
109
+ - `VITE_AUTH_*` - Authentication config
110
+ - `VITE_FEATURE_*` - Feature flags
111
+ - `VITE_ANALYTICS_*` - Analytics services
112
+
113
+ **Important:** Only variables prefixed with `VITE_` (or your build tool's prefix) are exposed to the client.
114
114
  ---
115
- ## ๐ŸŒ Configuration by Environment
116
-
117
- ### Development
118
-
119
- **Backend (.env.development):**
120
- ```bash
121
- {{BACKEND_DEV_ENV_CONFIG}}
122
- ```
123
-
124
- **Frontend (.env.development):**
125
- ```bash
126
- {{FRONTEND_DEV_ENV_CONFIG}}
127
- ```
128
-
129
- ### Staging
130
-
131
- **Backend (.env.staging):**
132
- ```bash
133
- {{BACKEND_STAGING_ENV_CONFIG}}
134
- ```
135
-
136
- **Frontend (.env.staging):**
137
- ```bash
138
- {{FRONTEND_STAGING_ENV_CONFIG}}
139
- ```
140
-
141
- ### Production
142
-
143
- **Backend (.env.production):**
144
- ```bash
145
- {{BACKEND_PRODUCTION_ENV_CONFIG}}
146
- ```
147
-
148
- **Frontend (.env.production):**
149
- ```bash
150
- {{FRONTEND_PRODUCTION_ENV_CONFIG}}
151
- ```
115
+ ## ๐ŸŒ Configuration by Environment
116
+
117
+ ### Development
118
+
119
+ **Backend (.env.development):**
120
+ ```bash
121
+ {{BACKEND_DEV_ENV_CONFIG}}
122
+ ```
123
+
124
+ **Frontend (.env.development):**
125
+ ```bash
126
+ {{FRONTEND_DEV_ENV_CONFIG}}
127
+ ```
128
+
129
+ ### Staging
130
+
131
+ **Backend (.env.staging):**
132
+ ```bash
133
+ {{BACKEND_STAGING_ENV_CONFIG}}
134
+ ```
135
+
136
+ **Frontend (.env.staging):**
137
+ ```bash
138
+ {{FRONTEND_STAGING_ENV_CONFIG}}
139
+ ```
140
+
141
+ ### Production
142
+
143
+ **Backend (.env.production):**
144
+ ```bash
145
+ {{BACKEND_PRODUCTION_ENV_CONFIG}}
146
+ ```
147
+
148
+ **Frontend (.env.production):**
149
+ ```bash
150
+ {{FRONTEND_PRODUCTION_ENV_CONFIG}}
151
+ ```
152
152
  ---
153
- ## ๐Ÿ”Œ External Services
154
-
155
- ### Backend Services
156
-
157
- {{#EACH BACKEND_EXTERNAL_SERVICE}}
158
- ### {{SERVICE_NAME}}
159
-
160
- **Purpose:** {{SERVICE_PURPOSE}}
161
-
162
- **Configuration:**
163
- ```bash
164
- {{SERVICE_ENV_VARS}}
165
- ```
166
-
167
- **Documentation:** {{SERVICE_DOCS_URL}}
168
-
169
- {{#IF SERVICE_FALLBACK}}**Fallback:** {{SERVICE_FALLBACK}}{{/IF}}
170
-
171
- {{/EACH}}
172
-
173
- ### Frontend Services
174
-
175
- {{#EACH FRONTEND_EXTERNAL_SERVICE}}
176
- ### {{SERVICE_NAME}}
177
-
178
- **Purpose:** {{SERVICE_PURPOSE}}
179
-
180
- **Configuration:**
181
- ```bash
182
- {{SERVICE_ENV_VARS}}
183
- ```
184
-
185
- **Documentation:** {{SERVICE_DOCS_URL}}
186
-
187
- {{#IF SERVICE_FALLBACK}}**Fallback:** {{SERVICE_FALLBACK}}{{/IF}}
188
-
189
- {{/EACH}}
153
+ ## ๐Ÿ”Œ External Services
154
+
155
+ ### Backend Services
156
+
157
+ {{#EACH BACKEND_EXTERNAL_SERVICE}}
158
+ ### {{SERVICE_NAME}}
159
+
160
+ **Purpose:** {{SERVICE_PURPOSE}}
161
+
162
+ **Configuration:**
163
+ ```bash
164
+ {{SERVICE_ENV_VARS}}
165
+ ```
166
+
167
+ **Documentation:** {{SERVICE_DOCS_URL}}
168
+
169
+ {{#IF SERVICE_FALLBACK}}**Fallback:** {{SERVICE_FALLBACK}}{{/IF}}
170
+
171
+ {{/EACH}}
172
+
173
+ ### Frontend Services
174
+
175
+ {{#EACH FRONTEND_EXTERNAL_SERVICE}}
176
+ ### {{SERVICE_NAME}}
177
+
178
+ **Purpose:** {{SERVICE_PURPOSE}}
179
+
180
+ **Configuration:**
181
+ ```bash
182
+ {{SERVICE_ENV_VARS}}
183
+ ```
184
+
185
+ **Documentation:** {{SERVICE_DOCS_URL}}
186
+
187
+ {{#IF SERVICE_FALLBACK}}**Fallback:** {{SERVICE_FALLBACK}}{{/IF}}
188
+
189
+ {{/EACH}}
190
190
  ---
191
- ## ๐Ÿ’พ Database Configuration (Backend)
192
-
193
- ```bash
194
- {{DATABASE_CONFIG}}
195
- ```
196
-
197
- **Connection Pool:**
198
- - Min: {{DB_POOL_MIN}}
199
- - Max: {{DB_POOL_MAX}}
200
- - Idle Timeout: {{DB_IDLE_TIMEOUT}}ms
191
+ ## ๐Ÿ’พ Database Configuration (Backend)
192
+
193
+ ```bash
194
+ {{DATABASE_CONFIG}}
195
+ ```
196
+
197
+ **Connection Pool:**
198
+ - Min: {{DB_POOL_MIN}}
199
+ - Max: {{DB_POOL_MAX}}
200
+ - Idle Timeout: {{DB_IDLE_TIMEOUT}}ms
201
201
  ---
202
- ## ๐Ÿ” Secrets Management
203
-
204
- ### Backend Secrets
205
-
206
- **Never commit these variables:**
207
-
208
- {{#EACH BACKEND_SECRET_VAR}}
209
- - `{{VAR_NAME}}` - {{VAR_PURPOSE}}
210
- {{/EACH}}
211
-
212
- **Storage:** {{BACKEND_SECRETS_STORAGE}}
213
-
214
- ### Frontend Secrets
215
-
216
- **Important:** Frontend should NEVER contain secrets. Only public keys and non-sensitive configuration.
217
-
218
- **Allowed:**
219
- - Public API keys (e.g., Google Maps API key)
220
- - Public service IDs
221
- - Feature flags
222
- - Analytics IDs
223
-
224
- **Never:**
225
- - Database credentials
226
- - API secret keys
227
- - Authentication secrets
228
- - Private keys
202
+ ## ๐Ÿ” Secrets Management
203
+
204
+ ### Backend Secrets
205
+
206
+ **Never commit these variables:**
207
+
208
+ {{#EACH BACKEND_SECRET_VAR}}
209
+ - `{{VAR_NAME}}` - {{VAR_PURPOSE}}
210
+ {{/EACH}}
211
+
212
+ **Storage:** {{BACKEND_SECRETS_STORAGE}}
213
+
214
+ ### Frontend Secrets
215
+
216
+ **Important:** Frontend should NEVER contain secrets. Only public keys and non-sensitive configuration.
217
+
218
+ **Allowed:**
219
+ - Public API keys (e.g., Google Maps API key)
220
+ - Public service IDs
221
+ - Feature flags
222
+ - Analytics IDs
223
+
224
+ **Never:**
225
+ - Database credentials
226
+ - API secret keys
227
+ - Authentication secrets
228
+ - Private keys
229
229
  ---
230
- ## ๐Ÿšฉ Feature Flags
231
-
232
- ### Backend Feature Flags
233
-
234
- {{#IF BACKEND_FEATURE_FLAGS}}
235
- {{#EACH BACKEND_FEATURE_FLAG}}
236
- ### `{{FLAG_NAME}}`
237
-
238
- **Description:** {{FLAG_DESCRIPTION}}
239
-
240
- **Default:** {{FLAG_DEFAULT}}
241
-
242
- **Environments:** {{FLAG_ENVIRONMENTS}}
243
-
244
- {{/EACH}}
245
-
246
- {{ELSE}}
247
- Backend feature flags not implemented yet.
248
-
249
- {{/IF}}
250
-
251
- ### Frontend Feature Flags
252
-
253
- {{#IF FRONTEND_FEATURE_FLAGS}}
254
- {{#EACH FRONTEND_FEATURE_FLAG}}
255
- ### `{{FLAG_NAME}}`
256
-
257
- **Description:** {{FLAG_DESCRIPTION}}
258
-
259
- **Default:** {{FLAG_DEFAULT}}
260
-
261
- **Environments:** {{FLAG_ENVIRONMENTS}}
262
-
263
- {{/EACH}}
264
-
265
- {{ELSE}}
266
- Frontend feature flags not implemented yet.
267
-
268
- {{/IF}}
230
+ ## ๐Ÿšฉ Feature Flags
231
+
232
+ ### Backend Feature Flags
233
+
234
+ {{#IF BACKEND_FEATURE_FLAGS}}
235
+ {{#EACH BACKEND_FEATURE_FLAG}}
236
+ ### `{{FLAG_NAME}}`
237
+
238
+ **Description:** {{FLAG_DESCRIPTION}}
239
+
240
+ **Default:** {{FLAG_DEFAULT}}
241
+
242
+ **Environments:** {{FLAG_ENVIRONMENTS}}
243
+
244
+ {{/EACH}}
245
+
246
+ {{ELSE}}
247
+ Backend feature flags not implemented yet.
248
+
249
+ {{/IF}}
250
+
251
+ ### Frontend Feature Flags
252
+
253
+ {{#IF FRONTEND_FEATURE_FLAGS}}
254
+ {{#EACH FRONTEND_FEATURE_FLAG}}
255
+ ### `{{FLAG_NAME}}`
256
+
257
+ **Description:** {{FLAG_DESCRIPTION}}
258
+
259
+ **Default:** {{FLAG_DEFAULT}}
260
+
261
+ **Environments:** {{FLAG_ENVIRONMENTS}}
262
+
263
+ {{/EACH}}
264
+
265
+ {{ELSE}}
266
+ Frontend feature flags not implemented yet.
267
+
268
+ {{/IF}}
269
269
  ---
270
- ## ๐Ÿ”’ Security Best Practices
271
-
272
- ### Backend
273
-
274
- - โœ… Store all secrets in environment variables
275
- - โœ… Use secrets manager for production (AWS Secrets Manager, Azure Key Vault, etc.)
276
- - โœ… Never log secrets or sensitive data
277
- - โœ… Rotate secrets regularly
278
- - โœ… Use different secrets per environment
279
-
280
- ### Frontend
281
-
282
- - โœ… Never expose secrets to client code
283
- - โœ… Only use public keys and non-sensitive config
284
- - โœ… Sanitize error messages (don't expose config in production)
285
- - โœ… Validate all environment variables
286
- - โœ… Use Content Security Policy headers
287
-
288
- ### Example: API Key Management
289
-
290
- ```bash
291
- # โŒ WRONG - Secret key in frontend
292
- VITE_STRIPE_SECRET_KEY=sk_live_...
293
-
294
- # โœ… CORRECT - Public key in frontend, secret in backend
295
- # Frontend
296
- VITE_STRIPE_PUBLISHABLE_KEY=pk_live_...
297
-
298
- # Backend
299
- STRIPE_SECRET_KEY=sk_live_...
300
- ```
270
+ ## ๐Ÿ”’ Security Best Practices
271
+
272
+ ### Backend
273
+
274
+ - โœ… Store all secrets in environment variables
275
+ - โœ… Use secrets manager for production (AWS Secrets Manager, Azure Key Vault, etc.)
276
+ - โœ… Never log secrets or sensitive data
277
+ - โœ… Rotate secrets regularly
278
+ - โœ… Use different secrets per environment
279
+
280
+ ### Frontend
281
+
282
+ - โœ… Never expose secrets to client code
283
+ - โœ… Only use public keys and non-sensitive config
284
+ - โœ… Sanitize error messages (don't expose config in production)
285
+ - โœ… Validate all environment variables
286
+ - โœ… Use Content Security Policy headers
287
+
288
+ ### Example: API Key Management
289
+
290
+ ```bash
291
+ # โŒ WRONG - Secret key in frontend
292
+ VITE_STRIPE_SECRET_KEY=sk_live_...
293
+
294
+ # โœ… CORRECT - Public key in frontend, secret in backend
295
+ # Frontend
296
+ VITE_STRIPE_PUBLISHABLE_KEY=pk_live_...
297
+
298
+ # Backend
299
+ STRIPE_SECRET_KEY=sk_live_...
300
+ ```
301
301
  ---
302
- ## ๐Ÿงช Testing Configuration
303
-
304
- ### Backend Test Environment
305
-
306
- ```bash
307
- # .env.test
308
- NODE_ENV=test
309
- DATABASE_URL=postgresql://test:test@localhost:5432/test_db
310
- LOG_LEVEL=silent
311
- ```
312
-
313
- ### Frontend Test Environment
314
-
315
- ```typescript
316
- // vitest.config.ts
317
- export default defineConfig({
318
- test: {
319
- env: {
320
- VITE_API_BASE_URL: 'http://localhost:3001/api',
321
- VITE_APP_ENV: 'test',
322
- },
323
- },
324
- });
325
- ```
302
+ ## ๐Ÿงช Testing Configuration
303
+
304
+ ### Backend Test Environment
305
+
306
+ ```bash
307
+ # .env.test
308
+ NODE_ENV=test
309
+ DATABASE_URL=postgresql://test:test@localhost:5432/test_db
310
+ LOG_LEVEL=silent
311
+ ```
312
+
313
+ ### Frontend Test Environment
314
+
315
+ ```typescript
316
+ // vitest.config.ts
317
+ export default defineConfig({
318
+ test: {
319
+ env: {
320
+ VITE_API_BASE_URL: 'http://localhost:3001/api',
321
+ VITE_APP_ENV: 'test',
322
+ },
323
+ },
324
+ });
325
+ ```
326
326
  ---
327
- ## ๐Ÿ“Š Configuration Monitoring
328
-
329
- ### Backend
330
-
331
- - Log configuration on startup (development only)
332
- - Monitor secret rotation
333
- - Track configuration changes
334
-
335
- ### Frontend
336
-
337
- - Log config on startup (development only)
338
- - Monitor API endpoint availability
339
- - Track feature flag usage
327
+ ## ๐Ÿ“Š Configuration Monitoring
328
+
329
+ ### Backend
330
+
331
+ - Log configuration on startup (development only)
332
+ - Monitor secret rotation
333
+ - Track configuration changes
334
+
335
+ ### Frontend
336
+
337
+ - Log config on startup (development only)
338
+ - Monitor API endpoint availability
339
+ - Track feature flag usage
340
340
  ---
341
- ## ๐Ÿ”— Related Documents
342
-
343
- - [AI Instructions](../ai-instructions.md) - Configuration rules
344
- - [Security Specification](security.md) - Security requirements
345
- - [Deployment Guide](../docs/operations.md) - Environment setup
341
+ ## ๐Ÿ”— Related Documents
342
+
343
+ - [AI Instructions](../ai-instructions.md) - Configuration rules
344
+ - [Security Specification](security.md) - Security requirements
345
+ - [Deployment Guide](../docs/operations.md) - Environment setup
346
346
  ---
347
- **Document Version:** 1.0
348
-
349
- **Last Updated:** {{GENERATION_DATE}}
350
-
351
- **Generated by:** AI Flow v1.3.0
352
-
353
-
354
-
347
+ **Document Version:** 1.0
348
+
349
+ **Last Updated:** {{GENERATION_DATE}}
350
+
351
+ **Generated by:** AI Flow v1.3.0
352
+
353
+
354
+