ai-flow-dev 2.1.2 โ 2.1.4
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/README.md +28 -40
- package/dist/cli.js +69 -47
- package/dist/cli.js.map +1 -1
- package/package.json +5 -5
- package/prompts/backend/flow-build-phase-0.md +96 -84
- package/prompts/backend/flow-build-phase-1.md +10 -18
- package/prompts/backend/flow-build-phase-10.md +199 -583
- package/prompts/backend/flow-build-phase-2.md +152 -86
- package/prompts/backend/flow-build-phase-3.md +108 -68
- package/prompts/backend/flow-build-phase-4.md +5 -8
- package/prompts/backend/flow-build-phase-5.md +39 -12
- package/prompts/backend/flow-build-phase-6.md +29 -8
- package/prompts/backend/flow-build-phase-7.md +121 -41
- package/prompts/backend/flow-build-phase-8.md +28 -65
- package/prompts/backend/flow-build-phase-9.md +267 -1298
- package/prompts/backend/flow-build.md +881 -957
- package/prompts/backend/flow-dev-commit.md +27 -50
- package/prompts/backend/flow-dev-feature.md +1929 -2017
- package/prompts/backend/flow-dev-fix.md +936 -964
- package/prompts/backend/flow-dev-refactor.md +672 -701
- package/prompts/backend/flow-dev-review.md +356 -389
- package/prompts/backend/flow-dev-work.md +1066 -1118
- package/prompts/backend/flow-docs-sync.md +31 -210
- package/prompts/frontend/flow-build-phase-0.md +503 -484
- package/prompts/frontend/flow-build-phase-1.md +445 -433
- package/prompts/frontend/flow-build-phase-2.md +910 -957
- package/prompts/frontend/flow-build-phase-3.md +692 -664
- package/prompts/frontend/flow-build-phase-4.md +478 -463
- package/prompts/frontend/flow-build-phase-5.md +488 -467
- package/prompts/frontend/flow-build-phase-6.md +571 -550
- package/prompts/frontend/flow-build-phase-7.md +560 -592
- package/prompts/frontend/flow-build-phase-8.md +17 -42
- package/prompts/frontend/flow-build.md +457 -503
- package/prompts/frontend/flow-docs-sync.md +24 -45
- package/prompts/mobile/flow-build-phase-0.md +104 -97
- package/prompts/mobile/flow-build-phase-1.md +137 -122
- package/prompts/mobile/flow-build-phase-2.md +123 -130
- package/prompts/mobile/flow-build-phase-3.md +144 -149
- package/prompts/mobile/flow-build-phase-4.md +140 -132
- package/prompts/mobile/flow-build-phase-5.md +70 -70
- package/prompts/mobile/flow-build-phase-6.md +136 -134
- package/prompts/mobile/flow-build-phase-7.md +24 -58
- package/prompts/mobile/flow-build-phase-8.md +17 -42
- package/prompts/mobile/flow-build.md +47 -97
- package/prompts/mobile/flow-docs-sync.md +23 -42
- package/prompts/shared/mermaid-guidelines.md +106 -0
- package/prompts/shared/scope-levels.md +126 -0
- package/prompts/shared/story-points.md +65 -0
- package/prompts/shared/task-format.md +86 -0
- package/templates/AGENT.template.md +194 -15
- package/templates/backend/README.template.md +2 -32
- package/templates/backend/ai-instructions.template.md +2 -32
- package/templates/backend/copilot-instructions.template.md +2 -22
- package/templates/backend/docs/api.template.md +89 -20
- package/templates/backend/docs/architecture.template.md +165 -53
- package/templates/backend/docs/business-flows.template.md +7 -14
- package/templates/backend/docs/code-standards.template.md +2 -38
- package/templates/backend/docs/contributing.template.md +2 -16
- package/templates/backend/docs/data-model.template.md +125 -21
- package/templates/backend/docs/operations.template.md +179 -50
- package/templates/backend/docs/testing.template.md +2 -42
- package/templates/backend/project-brief.template.md +2 -28
- package/templates/backend/specs/configuration.template.md +2 -14
- package/templates/backend/specs/security.template.md +2 -32
- package/templates/frontend/README.template.md +2 -18
- package/templates/frontend/ai-instructions.template.md +2 -20
- package/templates/frontend/docs/api-integration.template.md +12 -30
- package/templates/frontend/docs/components.template.md +2 -28
- package/templates/frontend/docs/error-handling.template.md +11 -27
- package/templates/frontend/docs/operations.template.md +8 -18
- package/templates/frontend/docs/performance.template.md +8 -18
- package/templates/frontend/docs/pwa.template.md +8 -18
- package/templates/frontend/docs/state-management.template.md +2 -28
- package/templates/frontend/docs/styling.template.md +2 -26
- package/templates/frontend/docs/testing.template.md +2 -28
- package/templates/frontend/project-brief.template.md +2 -16
- package/templates/frontend/specs/accessibility.template.md +8 -18
- package/templates/frontend/specs/configuration.template.md +2 -24
- package/templates/frontend/specs/security.template.md +10 -24
- package/templates/fullstack/README.template.md +17 -47
- package/templates/fullstack/ai-instructions.template.md +17 -45
- package/templates/fullstack/project-brief.template.md +16 -42
- package/templates/fullstack/specs/configuration.template.md +16 -42
- package/templates/mobile/README.template.md +11 -29
- package/templates/mobile/ai-instructions.template.md +11 -27
- package/templates/mobile/docs/app-store.template.md +11 -29
- package/templates/mobile/docs/architecture.template.md +14 -38
- package/templates/mobile/docs/native-features.template.md +16 -44
- package/templates/mobile/docs/navigation.template.md +9 -23
- package/templates/mobile/docs/offline-strategy.template.md +10 -26
- package/templates/mobile/docs/permissions.template.md +9 -23
- package/templates/mobile/docs/state-management.template.md +12 -32
- package/templates/mobile/docs/testing.template.md +14 -38
- package/templates/mobile/project-brief.template.md +12 -30
- package/templates/mobile/specs/build-configuration.template.md +10 -26
- package/templates/mobile/specs/deployment.template.md +9 -23
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
# Testing Strategy
|
|
2
2
|
|
|
3
3
|
> Testing approach and best practices for {{PROJECT_NAME}}
|
|
4
|
-
|
|
5
4
|
---
|
|
6
|
-
|
|
7
5
|
## ๐ฏ Testing Philosophy
|
|
8
6
|
|
|
9
7
|
**Goal:** Ship with confidence through comprehensive automated testing
|
|
@@ -13,9 +11,7 @@
|
|
|
13
11
|
2. **Write tests that give confidence** - Focus on tests that catch real bugs
|
|
14
12
|
3. **Avoid testing implementation details** - Refactors shouldn't break tests
|
|
15
13
|
4. **Fast feedback loops** - Unit tests run in milliseconds, E2E in seconds
|
|
16
|
-
|
|
17
14
|
---
|
|
18
|
-
|
|
19
15
|
## ๐๏ธ Testing Pyramid
|
|
20
16
|
|
|
21
17
|
```
|
|
@@ -32,9 +28,7 @@
|
|
|
32
28
|
- **70%** Unit Tests (fast, isolated)
|
|
33
29
|
- **20%** Integration Tests (component + hooks + API)
|
|
34
30
|
- **10%** E2E Tests (full user flows)
|
|
35
|
-
|
|
36
31
|
---
|
|
37
|
-
|
|
38
32
|
## ๐งช Testing Stack
|
|
39
33
|
|
|
40
34
|
### Test Frameworks
|
|
@@ -48,9 +42,7 @@
|
|
|
48
42
|
- **Mocking:** {{MOCKING_LIBRARY}}
|
|
49
43
|
- **Code Coverage:** {{COVERAGE_TOOL}}
|
|
50
44
|
- **Visual Regression:** {{VISUAL_REGRESSION_TOOL}}
|
|
51
|
-
|
|
52
45
|
---
|
|
53
|
-
|
|
54
46
|
## ๐ฆ Unit Testing
|
|
55
47
|
|
|
56
48
|
### What to Unit Test
|
|
@@ -146,9 +138,7 @@ describe('useCounter', () => {
|
|
|
146
138
|
});
|
|
147
139
|
});
|
|
148
140
|
```
|
|
149
|
-
|
|
150
141
|
---
|
|
151
|
-
|
|
152
142
|
## ๐ Integration Testing
|
|
153
143
|
|
|
154
144
|
### What to Integration Test
|
|
@@ -301,9 +291,7 @@ describe('LoginForm', () => {
|
|
|
301
291
|
});
|
|
302
292
|
});
|
|
303
293
|
```
|
|
304
|
-
|
|
305
294
|
---
|
|
306
|
-
|
|
307
295
|
## ๐ E2E Testing
|
|
308
296
|
|
|
309
297
|
### What to E2E Test
|
|
@@ -406,9 +394,7 @@ test('displays dashboard with mocked data', async ({ page }) => {
|
|
|
406
394
|
await expect(page.locator('[data-testid="total-orders"]')).toHaveText('234');
|
|
407
395
|
});
|
|
408
396
|
```
|
|
409
|
-
|
|
410
397
|
---
|
|
411
|
-
|
|
412
398
|
## ๐จ Visual Regression Testing
|
|
413
399
|
|
|
414
400
|
### Strategy: {{VISUAL_REGRESSION_TOOL}}
|
|
@@ -428,9 +414,7 @@ test('button variants', async ({ page }) => {
|
|
|
428
414
|
await expect(page.locator('.button-secondary')).toHaveScreenshot('button-secondary.png');
|
|
429
415
|
});
|
|
430
416
|
```
|
|
431
|
-
|
|
432
417
|
---
|
|
433
|
-
|
|
434
418
|
## ๐งฉ Testing Best Practices
|
|
435
419
|
|
|
436
420
|
### 1. Query Priorities (Testing Library)
|
|
@@ -509,9 +493,7 @@ describe('UserDashboard', () => {
|
|
|
509
493
|
});
|
|
510
494
|
});
|
|
511
495
|
```
|
|
512
|
-
|
|
513
496
|
---
|
|
514
|
-
|
|
515
497
|
## ๐ Code Coverage
|
|
516
498
|
|
|
517
499
|
### Coverage Targets
|
|
@@ -557,9 +539,7 @@ export default defineConfig({
|
|
|
557
539
|
}
|
|
558
540
|
});
|
|
559
541
|
```
|
|
560
|
-
|
|
561
542
|
---
|
|
562
|
-
|
|
563
543
|
## ๐ง Mocking Strategies
|
|
564
544
|
|
|
565
545
|
### 1. Mock Service Worker (API Mocking)
|
|
@@ -627,9 +607,7 @@ test('renders dashboard', () => {
|
|
|
627
607
|
expect(screen.getByText('Chart Mock')).toBeInTheDocument();
|
|
628
608
|
});
|
|
629
609
|
```
|
|
630
|
-
|
|
631
610
|
---
|
|
632
|
-
|
|
633
611
|
## โ ๏ธ Common Testing Pitfalls
|
|
634
612
|
|
|
635
613
|
### 1. Testing Implementation Details
|
|
@@ -677,9 +655,7 @@ vi.mock('./Form', () => ({ Form: () => <div>Form</div> }));
|
|
|
677
655
|
// โ
Good - Only mock external dependencies
|
|
678
656
|
vi.mock('./api', () => ({ fetchData: vi.fn() }));
|
|
679
657
|
```
|
|
680
|
-
|
|
681
658
|
---
|
|
682
|
-
|
|
683
659
|
## ๐ CI/CD Integration
|
|
684
660
|
|
|
685
661
|
### GitHub Actions Example
|
|
@@ -719,18 +695,16 @@ jobs:
|
|
|
719
695
|
name: playwright-screenshots
|
|
720
696
|
path: test-results/
|
|
721
697
|
```
|
|
722
|
-
|
|
723
698
|
---
|
|
724
|
-
|
|
725
699
|
## ๐ Related Documents
|
|
726
700
|
|
|
727
701
|
- [Component Architecture](components.md) - Component structure to test
|
|
728
702
|
- [State Management](state-management.md) - Testing stores and hooks
|
|
729
703
|
- [AI Instructions](../ai-instructions.md) - Testing requirements
|
|
730
704
|
- [Contributing](contributing.md) - How to write tests
|
|
731
|
-
|
|
732
705
|
---
|
|
733
|
-
|
|
734
706
|
**Last Updated:** {{GENERATION_DATE}}
|
|
735
707
|
|
|
736
708
|
**Testing Stack:** {{UNIT_TEST_FRAMEWORK}} + {{COMPONENT_TEST_LIBRARY}} + {{E2E_FRAMEWORK}}
|
|
709
|
+
|
|
710
|
+
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
# Project Brief
|
|
2
2
|
|
|
3
3
|
> Business context and objectives for {{PROJECT_NAME}}
|
|
4
|
-
|
|
5
4
|
---
|
|
6
|
-
|
|
7
5
|
## ๐ Project Overview
|
|
8
6
|
|
|
9
7
|
**Name:** {{PROJECT_NAME}}
|
|
@@ -13,43 +11,31 @@
|
|
|
13
11
|
**Problem Statement:** {{PROBLEM_STATEMENT}}
|
|
14
12
|
|
|
15
13
|
**Target Users:** {{TARGET_USERS}}
|
|
16
|
-
|
|
17
14
|
---
|
|
18
|
-
|
|
19
15
|
## ๐ฏ Objectives
|
|
20
16
|
|
|
21
17
|
{{PROJECT_OBJECTIVES}}
|
|
22
|
-
|
|
23
18
|
---
|
|
24
|
-
|
|
25
19
|
## ๐ Scope
|
|
26
20
|
|
|
27
21
|
{{PROJECT_SCOPE}}
|
|
28
|
-
|
|
29
22
|
---
|
|
30
|
-
|
|
31
23
|
## ๐ซ Out of Scope
|
|
32
24
|
|
|
33
25
|
{{OUT_OF_SCOPE}}
|
|
34
|
-
|
|
35
26
|
---
|
|
36
|
-
|
|
37
27
|
## ๐ Success Metrics
|
|
38
28
|
|
|
39
29
|
{{SUCCESS_METRICS}}
|
|
40
|
-
|
|
41
30
|
---
|
|
42
|
-
|
|
43
31
|
## โฑ๏ธ Timeline
|
|
44
32
|
|
|
45
33
|
{{PROJECT_TIMELINE}}
|
|
46
|
-
|
|
47
34
|
---
|
|
48
|
-
|
|
49
35
|
## ๐ฅ Stakeholders
|
|
50
36
|
|
|
51
37
|
{{STAKEHOLDERS}}
|
|
52
|
-
|
|
53
38
|
---
|
|
54
|
-
|
|
55
39
|
**Last Updated:** {{GENERATION_DATE}}
|
|
40
|
+
|
|
41
|
+
|
|
@@ -1,17 +1,13 @@
|
|
|
1
1
|
# Accessibility Specification
|
|
2
2
|
|
|
3
3
|
> Accessibility requirements and WCAG compliance for {{PROJECT_NAME}}
|
|
4
|
-
|
|
5
|
-
---
|
|
6
|
-
|
|
4
|
+
---
|
|
7
5
|
## ๐ฏ Accessibility Target
|
|
8
6
|
|
|
9
7
|
**WCAG Level:** {{A11Y_COMPLIANCE}}
|
|
10
8
|
**Screen Reader Testing:** {{SCREEN_READER_TESTING}}
|
|
11
9
|
**Keyboard Navigation:** {{KEYBOARD_NAVIGATION}}
|
|
12
|
-
|
|
13
|
-
---
|
|
14
|
-
|
|
10
|
+
---
|
|
15
11
|
## โฟ WCAG Compliance
|
|
16
12
|
|
|
17
13
|
### Level AA Requirements
|
|
@@ -27,9 +23,7 @@
|
|
|
27
23
|
- **Color Contrast:** 7:1 for normal text, 4.5:1 for large text
|
|
28
24
|
- **Sign Language:** Sign language interpretation for audio
|
|
29
25
|
- **Extended Audio Description:** Extended audio descriptions
|
|
30
|
-
|
|
31
|
-
---
|
|
32
|
-
|
|
26
|
+
---
|
|
33
27
|
## โจ๏ธ Keyboard Navigation
|
|
34
28
|
|
|
35
29
|
### Focus Management
|
|
@@ -63,9 +57,7 @@ function trapFocus(element: HTMLElement) {
|
|
|
63
57
|
```html
|
|
64
58
|
<a href="#main-content" class="skip-link">Skip to main content</a>
|
|
65
59
|
```
|
|
66
|
-
|
|
67
|
-
---
|
|
68
|
-
|
|
60
|
+
---
|
|
69
61
|
## ๐ฃ๏ธ Screen Reader Support
|
|
70
62
|
|
|
71
63
|
### ARIA Labels
|
|
@@ -95,17 +87,15 @@ function trapFocus(element: HTMLElement) {
|
|
|
95
87
|
<div><span>Home</span></div>
|
|
96
88
|
</div>
|
|
97
89
|
```
|
|
98
|
-
|
|
99
|
-
---
|
|
100
|
-
|
|
90
|
+
---
|
|
101
91
|
## ๐ Related Documents
|
|
102
92
|
|
|
103
93
|
- [Styling](../docs/styling.md) - Accessibility in styling
|
|
104
94
|
- [Components](../docs/components.md) - Accessible components
|
|
105
|
-
|
|
106
|
-
---
|
|
107
|
-
|
|
95
|
+
---
|
|
108
96
|
**Last Updated:** {{GENERATION_DATE}}
|
|
109
97
|
|
|
110
98
|
**WCAG Level:** {{A11Y_COMPLIANCE}}
|
|
111
99
|
|
|
100
|
+
|
|
101
|
+
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
# Configuration Specification
|
|
2
2
|
|
|
3
3
|
> Environment variables, feature flags, and configuration management for {{PROJECT_NAME}}
|
|
4
|
-
|
|
5
4
|
---
|
|
6
|
-
|
|
7
5
|
## ๐ฏ Configuration Strategy
|
|
8
6
|
|
|
9
7
|
**Approach:** {{CONFIGURATION_APPROACH}}
|
|
@@ -13,9 +11,7 @@
|
|
|
13
11
|
2. **Security First** - Never expose secrets to client
|
|
14
12
|
3. **Type Safety** - Validate and type all config
|
|
15
13
|
4. **Environment Parity** - Consistent config across environments
|
|
16
|
-
|
|
17
14
|
---
|
|
18
|
-
|
|
19
15
|
## ๐ Configuration Files
|
|
20
16
|
|
|
21
17
|
### File Structure
|
|
@@ -42,9 +38,7 @@
|
|
|
42
38
|
```
|
|
43
39
|
|
|
44
40
|
**Note:** {{BUILD_TOOL}} automatically loads these files in priority order.
|
|
45
|
-
|
|
46
41
|
---
|
|
47
|
-
|
|
48
42
|
## ๐ Environment Variables
|
|
49
43
|
|
|
50
44
|
### .env.example Template
|
|
@@ -120,9 +114,7 @@ VITE_SOURCE_MAPS=true
|
|
|
120
114
|
- `VITE_ANALYTICS_*` - Analytics services
|
|
121
115
|
|
|
122
116
|
**Important:** Only variables prefixed with `VITE_` (or your build tool's prefix) are exposed to the client.
|
|
123
|
-
|
|
124
117
|
---
|
|
125
|
-
|
|
126
118
|
## โ๏ธ Configuration Loader
|
|
127
119
|
|
|
128
120
|
### src/config/index.ts
|
|
@@ -232,9 +224,7 @@ export const configSchema = z.object({
|
|
|
232
224
|
|
|
233
225
|
export type Config = z.infer<typeof configSchema>;
|
|
234
226
|
```
|
|
235
|
-
|
|
236
227
|
---
|
|
237
|
-
|
|
238
228
|
## ๐๏ธ Build-Time vs Runtime Config
|
|
239
229
|
|
|
240
230
|
### Build-Time Configuration
|
|
@@ -284,9 +274,7 @@ export async function loadRuntimeConfig() {
|
|
|
284
274
|
- Dynamic feature flags
|
|
285
275
|
- A/B testing variants
|
|
286
276
|
- Per-customer configs
|
|
287
|
-
|
|
288
277
|
---
|
|
289
|
-
|
|
290
278
|
## ๐ฉ Feature Flags
|
|
291
279
|
|
|
292
280
|
### Implementation Strategies
|
|
@@ -357,9 +345,7 @@ export function isFeatureEnabled(
|
|
|
357
345
|
// Usage
|
|
358
346
|
const showNewFeature = isFeatureEnabled('new-dashboard', user.id, 25); // 25% rollout
|
|
359
347
|
```
|
|
360
|
-
|
|
361
348
|
---
|
|
362
|
-
|
|
363
349
|
## ๐ Security Best Practices
|
|
364
350
|
|
|
365
351
|
### 1. Never Expose Secrets
|
|
@@ -402,9 +388,7 @@ if (isNaN(port) || port < 1 || port > 65535) {
|
|
|
402
388
|
throw new Error('Invalid port number');
|
|
403
389
|
}
|
|
404
390
|
```
|
|
405
|
-
|
|
406
391
|
---
|
|
407
|
-
|
|
408
392
|
## ๐ Environment-Specific Config
|
|
409
393
|
|
|
410
394
|
### Development (.env.development)
|
|
@@ -435,9 +419,7 @@ VITE_SOURCE_MAPS=false
|
|
|
435
419
|
VITE_ENABLE_DEVTOOLS=false
|
|
436
420
|
VITE_SENTRY_ENVIRONMENT=production
|
|
437
421
|
```
|
|
438
|
-
|
|
439
422
|
---
|
|
440
|
-
|
|
441
423
|
## ๐งช Testing Configuration
|
|
442
424
|
|
|
443
425
|
### Mocking Config in Tests
|
|
@@ -462,9 +444,7 @@ test('feature flag enabled', () => {
|
|
|
462
444
|
|
|
463
445
|
vi.unstubAllEnvs();
|
|
464
446
|
```
|
|
465
|
-
|
|
466
447
|
---
|
|
467
|
-
|
|
468
448
|
## ๐ Configuration Monitoring
|
|
469
449
|
|
|
470
450
|
### Log Config on Startup (Development Only)
|
|
@@ -504,17 +484,15 @@ if (isProduction && config.analytics.sentryDsn) {
|
|
|
504
484
|
});
|
|
505
485
|
}
|
|
506
486
|
```
|
|
507
|
-
|
|
508
487
|
---
|
|
509
|
-
|
|
510
488
|
## ๐ Related Documents
|
|
511
489
|
|
|
512
490
|
- [AI Instructions](../ai-instructions.md) - Configuration rules
|
|
513
491
|
- [Security Specification](security.md) - Security requirements
|
|
514
492
|
- [Deployment Guide](../docs/operations.md) - Environment setup
|
|
515
|
-
|
|
516
493
|
---
|
|
517
|
-
|
|
518
494
|
**Last Updated:** {{GENERATION_DATE}}
|
|
519
495
|
|
|
520
496
|
**Configuration Approach:** {{CONFIGURATION_APPROACH}}
|
|
497
|
+
|
|
498
|
+
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
# Security Specification
|
|
2
2
|
|
|
3
3
|
> Frontend security requirements and best practices for {{PROJECT_NAME}}
|
|
4
|
-
|
|
5
|
-
---
|
|
6
|
-
|
|
4
|
+
---
|
|
7
5
|
## ๐ฏ Security Strategy
|
|
8
6
|
|
|
9
7
|
**CSP:** {{CSP_ENABLED}}
|
|
@@ -11,9 +9,7 @@
|
|
|
11
9
|
**Secure Storage:** {{SECURE_STORAGE}}
|
|
12
10
|
**HTTPS:** {{HTTPS_ENFORCEMENT}}
|
|
13
11
|
**Dependency Scanning:** {{DEPENDENCY_SCANNING}}
|
|
14
|
-
|
|
15
|
-
---
|
|
16
|
-
|
|
12
|
+
---
|
|
17
13
|
## ๐ก๏ธ Content Security Policy (CSP)
|
|
18
14
|
|
|
19
15
|
### CSP Configuration
|
|
@@ -47,9 +43,7 @@
|
|
|
47
43
|
upgrade-insecure-requests;
|
|
48
44
|
">
|
|
49
45
|
```
|
|
50
|
-
|
|
51
|
-
---
|
|
52
|
-
|
|
46
|
+
---
|
|
53
47
|
## ๐ XSS Prevention
|
|
54
48
|
|
|
55
49
|
### Input Sanitization
|
|
@@ -89,9 +83,7 @@ export function isValidUrl(url: string): boolean {
|
|
|
89
83
|
}
|
|
90
84
|
}
|
|
91
85
|
```
|
|
92
|
-
|
|
93
|
-
---
|
|
94
|
-
|
|
86
|
+
---
|
|
95
87
|
## ๐ Secure Storage
|
|
96
88
|
|
|
97
89
|
### Token Storage Strategy
|
|
@@ -134,9 +126,7 @@ export function savePreferences(prefs: UserPreferences): void {
|
|
|
134
126
|
localStorage.setItem(PREFERENCE_KEY, JSON.stringify(prefs));
|
|
135
127
|
}
|
|
136
128
|
```
|
|
137
|
-
|
|
138
|
-
---
|
|
139
|
-
|
|
129
|
+
---
|
|
140
130
|
## ๐ HTTPS Enforcement
|
|
141
131
|
|
|
142
132
|
### Redirect HTTP to HTTPS
|
|
@@ -153,9 +143,7 @@ if (location.protocol === 'http:' && location.hostname !== 'localhost') {
|
|
|
153
143
|
```
|
|
154
144
|
Strict-Transport-Security: max-age=31536000; includeSubDomains
|
|
155
145
|
```
|
|
156
|
-
|
|
157
|
-
---
|
|
158
|
-
|
|
146
|
+
---
|
|
159
147
|
## ๐ Dependency Security
|
|
160
148
|
|
|
161
149
|
### Automated Scanning
|
|
@@ -181,17 +169,15 @@ npx snyk test
|
|
|
181
169
|
- [ ] Review security advisories
|
|
182
170
|
- [ ] Use Dependabot or similar
|
|
183
171
|
- [ ] Remove unused dependencies
|
|
184
|
-
|
|
185
|
-
---
|
|
186
|
-
|
|
172
|
+
---
|
|
187
173
|
## ๐ Related Documents
|
|
188
174
|
|
|
189
175
|
- [Configuration](configuration.md) - Environment security
|
|
190
176
|
- [Error Handling](../docs/error-handling.md) - Security error handling
|
|
191
|
-
|
|
192
|
-
---
|
|
193
|
-
|
|
177
|
+
---
|
|
194
178
|
**Last Updated:** {{GENERATION_DATE}}
|
|
195
179
|
|
|
196
180
|
**Security Level:** {{SECURITY_LEVEL}}
|
|
197
181
|
|
|
182
|
+
|
|
183
|
+
|
|
@@ -1,26 +1,20 @@
|
|
|
1
1
|
# {{PROJECT_NAME}}
|
|
2
2
|
|
|
3
3
|
> {{PROJECT_DESCRIPTION}}
|
|
4
|
-
|
|
5
|
-
---
|
|
6
|
-
|
|
4
|
+
---
|
|
7
5
|
## ๐ Overview
|
|
8
6
|
|
|
9
7
|
{{PROBLEM_STATEMENT}}
|
|
10
8
|
|
|
11
9
|
**Target Users:** {{TARGET_USERS_SUMMARY}}
|
|
12
|
-
|
|
13
|
-
---
|
|
14
|
-
|
|
10
|
+
---
|
|
15
11
|
## โจ Features
|
|
16
12
|
|
|
17
13
|
{{#EACH FEATURE}}
|
|
18
14
|
|
|
19
15
|
- **{{FEATURE_NAME}}**: {{FEATURE_DESCRIPTION}}
|
|
20
16
|
{{/EACH}}
|
|
21
|
-
|
|
22
|
-
---
|
|
23
|
-
|
|
17
|
+
---
|
|
24
18
|
## ๐๏ธ Tech Stack
|
|
25
19
|
|
|
26
20
|
### Backend
|
|
@@ -37,9 +31,7 @@
|
|
|
37
31
|
- **Styling:** {{STYLING_APPROACH}}
|
|
38
32
|
- **State Management:** {{STATE_MANAGEMENT}}
|
|
39
33
|
- **Testing:** {{UNIT_TEST_FRAMEWORK}}, {{E2E_FRAMEWORK}}
|
|
40
|
-
|
|
41
|
-
---
|
|
42
|
-
|
|
34
|
+
---
|
|
43
35
|
## ๐ Getting Started
|
|
44
36
|
|
|
45
37
|
### Prerequisites
|
|
@@ -94,9 +86,7 @@ cd frontend
|
|
|
94
86
|
```
|
|
95
87
|
|
|
96
88
|
The frontend application will be available at `{{FRONTEND_DEV_URL}}`
|
|
97
|
-
|
|
98
|
-
---
|
|
99
|
-
|
|
89
|
+
---
|
|
100
90
|
## ๐งช Testing
|
|
101
91
|
|
|
102
92
|
**Backend:**
|
|
@@ -121,9 +111,7 @@ cd frontend
|
|
|
121
111
|
# Run E2E tests
|
|
122
112
|
{{PACKAGE_MANAGER}} run test:e2e
|
|
123
113
|
```
|
|
124
|
-
|
|
125
|
-
---
|
|
126
|
-
|
|
114
|
+
---
|
|
127
115
|
## ๐ฆ Building
|
|
128
116
|
|
|
129
117
|
**Backend:**
|
|
@@ -145,9 +133,7 @@ cd frontend
|
|
|
145
133
|
# Preview production build
|
|
146
134
|
{{PACKAGE_MANAGER}} run preview
|
|
147
135
|
```
|
|
148
|
-
|
|
149
|
-
---
|
|
150
|
-
|
|
136
|
+
---
|
|
151
137
|
## ๐ง Available Scripts
|
|
152
138
|
|
|
153
139
|
**Backend:**
|
|
@@ -168,17 +154,13 @@ cd frontend
|
|
|
168
154
|
- {{PACKAGE_MANAGER}} run lint - Run linter
|
|
169
155
|
- {{PACKAGE_MANAGER}} run format - Format code
|
|
170
156
|
```
|
|
171
|
-
|
|
172
|
-
---
|
|
173
|
-
|
|
157
|
+
---
|
|
174
158
|
## ๐ Project Structure
|
|
175
159
|
|
|
176
160
|
```
|
|
177
161
|
{{PROJECT_STRUCTURE}}
|
|
178
162
|
```
|
|
179
|
-
|
|
180
|
-
---
|
|
181
|
-
|
|
163
|
+
---
|
|
182
164
|
## ๐ Documentation
|
|
183
165
|
|
|
184
166
|
### Backend Documentation
|
|
@@ -206,9 +188,7 @@ cd frontend
|
|
|
206
188
|
|
|
207
189
|
- [AGENT.md](AGENT.md) - Universal AI configuration
|
|
208
190
|
- [AI Instructions](ai-instructions.md) - AI development rules and workflow
|
|
209
|
-
|
|
210
|
-
---
|
|
211
|
-
|
|
191
|
+
---
|
|
212
192
|
## ๐ Environment Variables
|
|
213
193
|
|
|
214
194
|
See `.env.example` files in both `backend/` and `frontend/` directories for all required environment variables.
|
|
@@ -224,9 +204,7 @@ See `.env.example` files in both `backend/` and `frontend/` directories for all
|
|
|
224
204
|
|
|
225
205
|
- `{{VAR_NAME}}` - {{VAR_DESCRIPTION}}
|
|
226
206
|
{{/EACH}}
|
|
227
|
-
|
|
228
|
-
---
|
|
229
|
-
|
|
207
|
+
---
|
|
230
208
|
## ๐ Deployment
|
|
231
209
|
|
|
232
210
|
See [docs/operations.md](docs/operations.md) for deployment procedures.
|
|
@@ -240,9 +218,7 @@ See [docs/operations.md](docs/operations.md) for deployment procedures.
|
|
|
240
218
|
- Development: Backend `{{DEV_URL}}` | Frontend `{{FRONTEND_DEV_URL}}`
|
|
241
219
|
- Staging: Backend `{{STAGING_URL}}` | Frontend `{{FRONTEND_STAGING_URL}}`
|
|
242
220
|
- Production: Backend `{{PRODUCTION_URL}}` | Frontend `{{FRONTEND_PRODUCTION_URL}}`
|
|
243
|
-
|
|
244
|
-
---
|
|
245
|
-
|
|
221
|
+
---
|
|
246
222
|
## ๐ค Contributing
|
|
247
223
|
|
|
248
224
|
See [docs/contributing.md](docs/contributing.md) for contribution guidelines.
|
|
@@ -252,31 +228,25 @@ See [docs/contributing.md](docs/contributing.md) for contribution guidelines.
|
|
|
252
228
|
3. Commit changes (`git commit -m 'feat: add amazing feature'`)
|
|
253
229
|
4. Push to branch (`git push origin feature/amazing-feature`)
|
|
254
230
|
5. Open Pull Request
|
|
255
|
-
|
|
256
|
-
---
|
|
257
|
-
|
|
231
|
+
---
|
|
258
232
|
## ๐ License
|
|
259
233
|
|
|
260
234
|
{{LICENSE}}
|
|
261
|
-
|
|
262
|
-
---
|
|
263
|
-
|
|
235
|
+
---
|
|
264
236
|
## ๐ฅ Team
|
|
265
237
|
|
|
266
238
|
{{#EACH TEAM_MEMBER}}
|
|
267
239
|
|
|
268
240
|
- **{{MEMBER_NAME}}** - {{MEMBER_ROLE}}
|
|
269
241
|
{{/EACH}}
|
|
270
|
-
|
|
271
|
-
---
|
|
272
|
-
|
|
242
|
+
---
|
|
273
243
|
## ๐ Support
|
|
274
244
|
|
|
275
245
|
{{#IF SUPPORT_EMAIL}}- Email: {{SUPPORT_EMAIL}}{{/IF}}
|
|
276
246
|
{{#IF SUPPORT_SLACK}}- Slack: {{SUPPORT_SLACK}}{{/IF}}
|
|
277
247
|
{{#IF ISSUE_TRACKER}}- Issues: {{ISSUE_TRACKER}}{{/IF}}
|
|
248
|
+
---
|
|
249
|
+
**Generated with** [AI Flow](https://github.com/victorvelazquez/ai-flow) | `npm i -g ai-flow-dev` ๐
|
|
278
250
|
|
|
279
|
-
---
|
|
280
251
|
|
|
281
|
-
**Generated with** [AI Flow](https://github.com/victorvelazquez/ai-flow) | `npm i -g ai-flow-dev` ๐
|
|
282
252
|
|