ai-flow-dev 1.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 -0
- package/README.md +408 -0
- package/dist/cli.d.ts +3 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +791 -0
- package/dist/cli.js.map +1 -0
- package/dist/fs-utils.d.ts +2 -0
- package/dist/fs-utils.d.ts.map +1 -0
- package/dist/fs-utils.js +46 -0
- package/dist/fs-utils.js.map +1 -0
- package/package.json +71 -0
- package/prompts/backend/flow-dev-feature.md +1318 -0
- package/prompts/backend/flow-dev-fix.md +903 -0
- package/prompts/backend/flow-dev-refactor.md +715 -0
- package/prompts/backend/flow-dev-review.md +401 -0
- package/prompts/backend/flow-dev-work.md +1129 -0
- package/prompts/backend/flow-docs-gen-phase-0.md +1840 -0
- package/prompts/backend/flow-docs-gen-phase-1.md +435 -0
- package/prompts/backend/flow-docs-gen-phase-2.md +460 -0
- package/prompts/backend/flow-docs-gen-phase-3.md +684 -0
- package/prompts/backend/flow-docs-gen-phase-4.md +516 -0
- package/prompts/backend/flow-docs-gen-phase-5.md +637 -0
- package/prompts/backend/flow-docs-gen-phase-6.md +465 -0
- package/prompts/backend/flow-docs-gen-phase-7.md +1207 -0
- package/prompts/backend/flow-docs-gen.md +820 -0
- package/prompts/backend/flow-docs-sync.md +526 -0
- package/prompts/backend/flow-project-init.md +248 -0
- package/prompts/backend/flow-project-roadmap.md +1159 -0
- package/prompts/frontend/flow-docs-gen-phase-0.md +494 -0
- package/prompts/frontend/flow-docs-gen-phase-1.md +449 -0
- package/prompts/frontend/flow-docs-gen-phase-2.md +983 -0
- package/prompts/frontend/flow-docs-gen-phase-3.md +685 -0
- package/prompts/frontend/flow-docs-gen-phase-4.md +480 -0
- package/prompts/frontend/flow-docs-gen-phase-5.md +483 -0
- package/prompts/frontend/flow-docs-gen-phase-6.md +570 -0
- package/prompts/frontend/flow-docs-gen-phase-7.md +582 -0
- package/prompts/frontend/flow-docs-gen.md +413 -0
- package/prompts/frontend/flow-docs-sync.md +561 -0
- package/prompts/mobile/flow-docs-gen-phase-0.md +387 -0
- package/prompts/mobile/flow-docs-gen-phase-1.md +530 -0
- package/prompts/mobile/flow-docs-gen-phase-2.md +584 -0
- package/prompts/mobile/flow-docs-gen-phase-3.md +659 -0
- package/prompts/mobile/flow-docs-gen-phase-4.md +363 -0
- package/prompts/mobile/flow-docs-gen-phase-5.md +369 -0
- package/prompts/mobile/flow-docs-gen-phase-6.md +490 -0
- package/prompts/mobile/flow-docs-gen-phase-7.md +407 -0
- package/prompts/mobile/flow-docs-gen.md +430 -0
- package/prompts/mobile/flow-docs-sync.md +634 -0
- package/templates/backend/.clauderules.template +111 -0
- package/templates/backend/.cursorrules.template +102 -0
- package/templates/backend/.env.example.template +122 -0
- package/templates/backend/README.template.md +200 -0
- package/templates/backend/ai-instructions.template.md +354 -0
- package/templates/backend/copilot-instructions.template.md +160 -0
- package/templates/backend/docs/api.template.md +251 -0
- package/templates/backend/docs/architecture.template.md +612 -0
- package/templates/backend/docs/business-flows.template.md +109 -0
- package/templates/backend/docs/code-standards.template.md +828 -0
- package/templates/backend/docs/contributing.template.md +163 -0
- package/templates/backend/docs/data-model.template.md +416 -0
- package/templates/backend/docs/operations.template.md +591 -0
- package/templates/backend/docs/testing.template.md +762 -0
- package/templates/backend/project-brief.template.md +176 -0
- package/templates/backend/specs/configuration.template.md +133 -0
- package/templates/backend/specs/security.template.md +422 -0
- package/templates/frontend/README.template.md +121 -0
- package/templates/frontend/ai-instructions.template.md +368 -0
- package/templates/frontend/docs/api-integration.template.md +390 -0
- package/templates/frontend/docs/components.template.md +567 -0
- package/templates/frontend/docs/error-handling.template.md +385 -0
- package/templates/frontend/docs/operations.template.md +123 -0
- package/templates/frontend/docs/performance.template.md +140 -0
- package/templates/frontend/docs/pwa.template.md +135 -0
- package/templates/frontend/docs/state-management.template.md +394 -0
- package/templates/frontend/docs/styling.template.md +779 -0
- package/templates/frontend/docs/testing.template.md +736 -0
- package/templates/frontend/project-brief.template.md +55 -0
- package/templates/frontend/specs/accessibility.template.md +111 -0
- package/templates/frontend/specs/configuration.template.md +520 -0
- package/templates/frontend/specs/security.template.md +197 -0
- package/templates/fullstack/README.template.md +282 -0
- package/templates/fullstack/ai-instructions.template.md +487 -0
- package/templates/fullstack/project-brief.template.md +197 -0
- package/templates/fullstack/specs/configuration.template.md +380 -0
- package/templates/mobile/AGENT.template.md +251 -0
- package/templates/mobile/README.template.md +195 -0
- package/templates/mobile/ai-instructions.template.md +221 -0
- package/templates/mobile/docs/app-store.template.md +163 -0
- package/templates/mobile/docs/architecture.template.md +100 -0
- package/templates/mobile/docs/native-features.template.md +137 -0
- package/templates/mobile/docs/navigation.template.md +81 -0
- package/templates/mobile/docs/offline-strategy.template.md +90 -0
- package/templates/mobile/docs/permissions.template.md +70 -0
- package/templates/mobile/docs/state-management.template.md +116 -0
- package/templates/mobile/docs/testing.template.md +146 -0
- package/templates/mobile/project-brief.template.md +97 -0
- package/templates/mobile/specs/build-configuration.template.md +116 -0
- package/templates/mobile/specs/deployment.template.md +114 -0
- package/templates/shared/AGENT.template.md +252 -0
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
# Native Features Guide
|
|
2
|
+
|
|
3
|
+
> Native features integration for {{PROJECT_NAME}}
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## 📱 Native Features Overview
|
|
8
|
+
|
|
9
|
+
**Framework:** {{FRAMEWORK}}
|
|
10
|
+
|
|
11
|
+
**Native Modules:** {{NATIVE_MODULES_LIST}}
|
|
12
|
+
|
|
13
|
+
**Third-Party SDKs:** {{THIRD_PARTY_SDKS_LIST}}
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
## 🔐 Permissions
|
|
18
|
+
|
|
19
|
+
**Required Permissions:**
|
|
20
|
+
{{PERMISSIONS_LIST}}
|
|
21
|
+
|
|
22
|
+
**Permission Handling:**
|
|
23
|
+
{{PERMISSION_HANDLING_DESCRIPTION}}
|
|
24
|
+
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
## 📷 Camera
|
|
28
|
+
|
|
29
|
+
**Library:** {{CAMERA_LIBRARY}}
|
|
30
|
+
|
|
31
|
+
**Usage:**
|
|
32
|
+
{{CAMERA_USAGE_DESCRIPTION}}
|
|
33
|
+
|
|
34
|
+
---
|
|
35
|
+
|
|
36
|
+
## 📍 Location
|
|
37
|
+
|
|
38
|
+
**Library:** {{LOCATION_LIBRARY}}
|
|
39
|
+
|
|
40
|
+
**Usage:**
|
|
41
|
+
{{LOCATION_USAGE_DESCRIPTION}}
|
|
42
|
+
|
|
43
|
+
---
|
|
44
|
+
|
|
45
|
+
## 🔔 Push Notifications
|
|
46
|
+
|
|
47
|
+
**Service:** {{PUSH_NOTIFICATION_SERVICE}}
|
|
48
|
+
|
|
49
|
+
**Setup:**
|
|
50
|
+
{{PUSH_NOTIFICATION_SETUP}}
|
|
51
|
+
|
|
52
|
+
---
|
|
53
|
+
|
|
54
|
+
## 🔐 Biometric Authentication
|
|
55
|
+
|
|
56
|
+
**Library:** {{BIOMETRIC_LIBRARY}}
|
|
57
|
+
|
|
58
|
+
**Usage:**
|
|
59
|
+
{{BIOMETRIC_USAGE_DESCRIPTION}}
|
|
60
|
+
|
|
61
|
+
---
|
|
62
|
+
|
|
63
|
+
## 📁 File System
|
|
64
|
+
|
|
65
|
+
**Library:** {{FILE_SYSTEM_LIBRARY}}
|
|
66
|
+
|
|
67
|
+
**Usage:**
|
|
68
|
+
{{FILE_SYSTEM_USAGE_DESCRIPTION}}
|
|
69
|
+
|
|
70
|
+
---
|
|
71
|
+
|
|
72
|
+
## 📞 Contacts
|
|
73
|
+
|
|
74
|
+
**Library:** {{CONTACTS_LIBRARY}}
|
|
75
|
+
|
|
76
|
+
**Usage:**
|
|
77
|
+
{{CONTACTS_USAGE_DESCRIPTION}}
|
|
78
|
+
|
|
79
|
+
---
|
|
80
|
+
|
|
81
|
+
## 🗺️ Maps
|
|
82
|
+
|
|
83
|
+
**Library:** {{MAPS_LIBRARY}}
|
|
84
|
+
|
|
85
|
+
**Usage:**
|
|
86
|
+
{{MAPS_USAGE_DESCRIPTION}}
|
|
87
|
+
|
|
88
|
+
---
|
|
89
|
+
|
|
90
|
+
## 💳 Payments
|
|
91
|
+
|
|
92
|
+
**Library:** {{PAYMENTS_LIBRARY}}
|
|
93
|
+
|
|
94
|
+
**Usage:**
|
|
95
|
+
{{PAYMENTS_USAGE_DESCRIPTION}}
|
|
96
|
+
|
|
97
|
+
---
|
|
98
|
+
|
|
99
|
+
## 🔗 Deep Linking
|
|
100
|
+
|
|
101
|
+
**Strategy:** {{DEEP_LINKING_STRATEGY}}
|
|
102
|
+
|
|
103
|
+
**Implementation:**
|
|
104
|
+
{{DEEP_LINKING_IMPLEMENTATION}}
|
|
105
|
+
|
|
106
|
+
---
|
|
107
|
+
|
|
108
|
+
## 📊 Analytics
|
|
109
|
+
|
|
110
|
+
**Service:** {{ANALYTICS_SERVICE}}
|
|
111
|
+
|
|
112
|
+
**Setup:**
|
|
113
|
+
{{ANALYTICS_SETUP}}
|
|
114
|
+
|
|
115
|
+
---
|
|
116
|
+
|
|
117
|
+
## 🐛 Crash Reporting
|
|
118
|
+
|
|
119
|
+
**Service:** {{CRASH_REPORTING_SERVICE}}
|
|
120
|
+
|
|
121
|
+
**Setup:**
|
|
122
|
+
{{CRASH_REPORTING_SETUP}}
|
|
123
|
+
|
|
124
|
+
---
|
|
125
|
+
|
|
126
|
+
## ✅ Best Practices
|
|
127
|
+
|
|
128
|
+
1. **Request Permissions Just-In-Time** - Explain why needed
|
|
129
|
+
2. **Handle Permission Denial** - Gracefully handle denial
|
|
130
|
+
3. **Test Native Features** - Test on real devices
|
|
131
|
+
4. **Handle Platform Differences** - iOS vs Android
|
|
132
|
+
5. **Monitor Native Module Performance** - Watch for memory leaks
|
|
133
|
+
|
|
134
|
+
---
|
|
135
|
+
|
|
136
|
+
**Last Updated:** {{LAST_UPDATED}}
|
|
137
|
+
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
# Navigation Guide
|
|
2
|
+
|
|
3
|
+
> Navigation patterns and setup for {{PROJECT_NAME}}
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## 🧭 Navigation Overview
|
|
8
|
+
|
|
9
|
+
**Navigation Library:** {{NAVIGATION_LIBRARY}}
|
|
10
|
+
|
|
11
|
+
**Navigation Pattern:** {{NAVIGATION_PATTERN}}
|
|
12
|
+
|
|
13
|
+
**Deep Linking Strategy:** {{DEEP_LINKING_STRATEGY}}
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
## 📱 Navigation Structure
|
|
18
|
+
|
|
19
|
+
{{NAVIGATION_STRUCTURE_DESCRIPTION}}
|
|
20
|
+
|
|
21
|
+
### Navigation Hierarchy
|
|
22
|
+
|
|
23
|
+
```
|
|
24
|
+
{{NAVIGATION_HIERARCHY}}
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
---
|
|
28
|
+
|
|
29
|
+
## 🔗 Deep Linking
|
|
30
|
+
|
|
31
|
+
**URL Scheme:** {{URL_SCHEME}}
|
|
32
|
+
|
|
33
|
+
**Universal Links (iOS):** {{UNIVERSAL_LINKS_ENABLED}}
|
|
34
|
+
|
|
35
|
+
**App Links (Android):** {{APP_LINKS_ENABLED}}
|
|
36
|
+
|
|
37
|
+
### Supported Deep Links
|
|
38
|
+
|
|
39
|
+
{{DEEP_LINKS_LIST}}
|
|
40
|
+
|
|
41
|
+
### Implementation
|
|
42
|
+
|
|
43
|
+
{{DEEP_LINKING_IMPLEMENTATION}}
|
|
44
|
+
|
|
45
|
+
---
|
|
46
|
+
|
|
47
|
+
## 🎨 Screen Transitions
|
|
48
|
+
|
|
49
|
+
**Transition Style:** {{TRANSITION_STYLE}}
|
|
50
|
+
|
|
51
|
+
{{TRANSITION_DESCRIPTION}}
|
|
52
|
+
|
|
53
|
+
---
|
|
54
|
+
|
|
55
|
+
## 🔐 Protected Routes
|
|
56
|
+
|
|
57
|
+
**Authentication Flow:** {{AUTH_FLOW_DESCRIPTION}}
|
|
58
|
+
|
|
59
|
+
**Protected Screens:**
|
|
60
|
+
{{PROTECTED_SCREENS_LIST}}
|
|
61
|
+
|
|
62
|
+
---
|
|
63
|
+
|
|
64
|
+
## 📚 Navigation Best Practices
|
|
65
|
+
|
|
66
|
+
1. **Consistent Navigation** - Use consistent navigation patterns throughout the app
|
|
67
|
+
2. **Clear Hierarchy** - Maintain clear navigation hierarchy
|
|
68
|
+
3. **Back Button Handling** - Handle back button appropriately on Android
|
|
69
|
+
4. **Deep Links** - Support deep linking for key screens
|
|
70
|
+
5. **State Preservation** - Preserve navigation state when app backgrounds
|
|
71
|
+
|
|
72
|
+
---
|
|
73
|
+
|
|
74
|
+
## 🛠️ Implementation Examples
|
|
75
|
+
|
|
76
|
+
{{NAVIGATION_EXAMPLES}}
|
|
77
|
+
|
|
78
|
+
---
|
|
79
|
+
|
|
80
|
+
**Last Updated:** {{LAST_UPDATED}}
|
|
81
|
+
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
# Offline Strategy
|
|
2
|
+
|
|
3
|
+
> Offline and data synchronization strategy for {{PROJECT_NAME}}
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## 📡 Offline Overview
|
|
8
|
+
|
|
9
|
+
**Offline Strategy:** {{OFFLINE_STRATEGY}}
|
|
10
|
+
|
|
11
|
+
**Storage Solution:** {{STORAGE_SOLUTION}}
|
|
12
|
+
|
|
13
|
+
**Sync Strategy:** {{SYNC_STRATEGY}}
|
|
14
|
+
|
|
15
|
+
**Conflict Resolution:** {{CONFLICT_RESOLUTION}}
|
|
16
|
+
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
## 💾 Local Storage
|
|
20
|
+
|
|
21
|
+
**Storage Solution:** {{STORAGE_SOLUTION}}
|
|
22
|
+
|
|
23
|
+
**Storage Structure:**
|
|
24
|
+
{{STORAGE_STRUCTURE_DESCRIPTION}}
|
|
25
|
+
|
|
26
|
+
---
|
|
27
|
+
|
|
28
|
+
## 🔄 Data Synchronization
|
|
29
|
+
|
|
30
|
+
**Sync Strategy:** {{SYNC_STRATEGY}}
|
|
31
|
+
|
|
32
|
+
**Sync Flow:**
|
|
33
|
+
{{SYNC_FLOW_DESCRIPTION}}
|
|
34
|
+
|
|
35
|
+
### Optimistic Updates
|
|
36
|
+
|
|
37
|
+
{{OPTIMISTIC_UPDATES_DESCRIPTION}}
|
|
38
|
+
|
|
39
|
+
### Background Sync
|
|
40
|
+
|
|
41
|
+
{{BACKGROUND_SYNC_DESCRIPTION}}
|
|
42
|
+
|
|
43
|
+
---
|
|
44
|
+
|
|
45
|
+
## ⚔️ Conflict Resolution
|
|
46
|
+
|
|
47
|
+
**Strategy:** {{CONFLICT_RESOLUTION_STRATEGY}}
|
|
48
|
+
|
|
49
|
+
{{CONFLICT_RESOLUTION_DESCRIPTION}}
|
|
50
|
+
|
|
51
|
+
---
|
|
52
|
+
|
|
53
|
+
## 📊 Caching Strategy
|
|
54
|
+
|
|
55
|
+
**Cache Strategy:** {{CACHE_STRATEGY}}
|
|
56
|
+
|
|
57
|
+
**Cache Duration:** {{CACHE_DURATION}}
|
|
58
|
+
|
|
59
|
+
**Cache Invalidation:** {{CACHE_INVALIDATION}}
|
|
60
|
+
|
|
61
|
+
---
|
|
62
|
+
|
|
63
|
+
## 🔌 Network Handling
|
|
64
|
+
|
|
65
|
+
**Network Detection:** {{NETWORK_DETECTION}}
|
|
66
|
+
|
|
67
|
+
**Offline Indicators:** {{OFFLINE_INDICATORS}}
|
|
68
|
+
|
|
69
|
+
**Retry Strategy:** {{RETRY_STRATEGY}}
|
|
70
|
+
|
|
71
|
+
---
|
|
72
|
+
|
|
73
|
+
## 🛠️ Implementation
|
|
74
|
+
|
|
75
|
+
{{OFFLINE_IMPLEMENTATION}}
|
|
76
|
+
|
|
77
|
+
---
|
|
78
|
+
|
|
79
|
+
## ✅ Best Practices
|
|
80
|
+
|
|
81
|
+
1. **Cache Critical Data** - Cache data needed for offline functionality
|
|
82
|
+
2. **Show Offline State** - Clearly indicate when app is offline
|
|
83
|
+
3. **Queue Updates** - Queue writes for when connection is restored
|
|
84
|
+
4. **Handle Conflicts** - Implement conflict resolution strategy
|
|
85
|
+
5. **Test Offline Scenarios** - Test all offline flows
|
|
86
|
+
|
|
87
|
+
---
|
|
88
|
+
|
|
89
|
+
**Last Updated:** {{LAST_UPDATED}}
|
|
90
|
+
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
# Permissions Guide
|
|
2
|
+
|
|
3
|
+
> Permission handling for {{PROJECT_NAME}}
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## 🔐 Permissions Overview
|
|
8
|
+
|
|
9
|
+
**Permission Request Strategy:** {{PERMISSION_REQUEST_STRATEGY}}
|
|
10
|
+
|
|
11
|
+
**Permission Denial Handling:** {{PERMISSION_DENIAL_HANDLING}}
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## 📋 Required Permissions
|
|
16
|
+
|
|
17
|
+
{{PERMISSIONS_LIST_WITH_DESCRIPTIONS}}
|
|
18
|
+
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
## 🎯 Permission Request Flow
|
|
22
|
+
|
|
23
|
+
### Just-In-Time Requests
|
|
24
|
+
|
|
25
|
+
{{JUST_IN_TIME_REQUEST_FLOW}}
|
|
26
|
+
|
|
27
|
+
### Permission Request Examples
|
|
28
|
+
|
|
29
|
+
{{PERMISSION_REQUEST_EXAMPLES}}
|
|
30
|
+
|
|
31
|
+
---
|
|
32
|
+
|
|
33
|
+
## ❌ Handling Denied Permissions
|
|
34
|
+
|
|
35
|
+
**Strategy:** {{PERMISSION_DENIAL_STRATEGY}}
|
|
36
|
+
|
|
37
|
+
{{PERMISSION_DENIAL_HANDLING_DESCRIPTION}}
|
|
38
|
+
|
|
39
|
+
---
|
|
40
|
+
|
|
41
|
+
## 📱 Platform-Specific Considerations
|
|
42
|
+
|
|
43
|
+
### iOS
|
|
44
|
+
|
|
45
|
+
{{IOS_PERMISSIONS_DESCRIPTION}}
|
|
46
|
+
|
|
47
|
+
### Android
|
|
48
|
+
|
|
49
|
+
{{ANDROID_PERMISSIONS_DESCRIPTION}}
|
|
50
|
+
|
|
51
|
+
---
|
|
52
|
+
|
|
53
|
+
## 🛠️ Implementation
|
|
54
|
+
|
|
55
|
+
{{PERMISSIONS_IMPLEMENTATION}}
|
|
56
|
+
|
|
57
|
+
---
|
|
58
|
+
|
|
59
|
+
## ✅ Best Practices
|
|
60
|
+
|
|
61
|
+
1. **Request Just-In-Time** - Request permissions when feature is needed
|
|
62
|
+
2. **Explain Why** - Always explain why permission is needed
|
|
63
|
+
3. **Handle Denial** - Gracefully handle permission denial
|
|
64
|
+
4. **Provide Alternatives** - Offer alternatives when permission is denied
|
|
65
|
+
5. **Test Permission Flows** - Test all permission scenarios
|
|
66
|
+
|
|
67
|
+
---
|
|
68
|
+
|
|
69
|
+
**Last Updated:** {{LAST_UPDATED}}
|
|
70
|
+
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
# State Management Guide
|
|
2
|
+
|
|
3
|
+
> State management patterns for {{PROJECT_NAME}}
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## 🎯 State Management Solution
|
|
8
|
+
|
|
9
|
+
**Solution:** {{STATE_MANAGEMENT}}
|
|
10
|
+
|
|
11
|
+
**Storage:** {{STORAGE_SOLUTION}}
|
|
12
|
+
|
|
13
|
+
**Offline Strategy:** {{OFFLINE_STRATEGY}}
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
## 📊 State Categories
|
|
18
|
+
|
|
19
|
+
### 1. App State (Global)
|
|
20
|
+
|
|
21
|
+
**Managed by:** {{STATE_MANAGEMENT}}
|
|
22
|
+
|
|
23
|
+
**Examples:**
|
|
24
|
+
- User authentication state
|
|
25
|
+
- App theme
|
|
26
|
+
- Global settings
|
|
27
|
+
|
|
28
|
+
**Pattern:**
|
|
29
|
+
{{APP_STATE_EXAMPLE}}
|
|
30
|
+
|
|
31
|
+
---
|
|
32
|
+
|
|
33
|
+
### 2. Server State (Remote Data)
|
|
34
|
+
|
|
35
|
+
**Managed by:** {{DATA_FETCHING}}
|
|
36
|
+
|
|
37
|
+
**Examples:**
|
|
38
|
+
- User data from API
|
|
39
|
+
- Product listings
|
|
40
|
+
- Content from backend
|
|
41
|
+
|
|
42
|
+
**Pattern:**
|
|
43
|
+
{{SERVER_STATE_EXAMPLE}}
|
|
44
|
+
|
|
45
|
+
---
|
|
46
|
+
|
|
47
|
+
### 3. Local State (Component State)
|
|
48
|
+
|
|
49
|
+
**Managed by:** Component state / Hooks
|
|
50
|
+
|
|
51
|
+
**Examples:**
|
|
52
|
+
- Form inputs
|
|
53
|
+
- Modal open/closed
|
|
54
|
+
- UI flags
|
|
55
|
+
|
|
56
|
+
**Pattern:**
|
|
57
|
+
{{LOCAL_STATE_EXAMPLE}}
|
|
58
|
+
|
|
59
|
+
---
|
|
60
|
+
|
|
61
|
+
### 4. Persistent State (Local Storage)
|
|
62
|
+
|
|
63
|
+
**Managed by:** {{STORAGE_SOLUTION}}
|
|
64
|
+
|
|
65
|
+
**Examples:**
|
|
66
|
+
- User preferences
|
|
67
|
+
- Cached data
|
|
68
|
+
- Offline data
|
|
69
|
+
|
|
70
|
+
**Pattern:**
|
|
71
|
+
{{PERSISTENT_STATE_EXAMPLE}}
|
|
72
|
+
|
|
73
|
+
---
|
|
74
|
+
|
|
75
|
+
## 🔄 Data Synchronization
|
|
76
|
+
|
|
77
|
+
**Sync Strategy:** {{SYNC_STRATEGY}}
|
|
78
|
+
|
|
79
|
+
{{SYNC_DESCRIPTION}}
|
|
80
|
+
|
|
81
|
+
---
|
|
82
|
+
|
|
83
|
+
## 💾 Offline Handling
|
|
84
|
+
|
|
85
|
+
**Offline Strategy:** {{OFFLINE_STRATEGY}}
|
|
86
|
+
|
|
87
|
+
{{OFFLINE_HANDLING_DESCRIPTION}}
|
|
88
|
+
|
|
89
|
+
---
|
|
90
|
+
|
|
91
|
+
## ⚔️ Conflict Resolution
|
|
92
|
+
|
|
93
|
+
**Strategy:** {{CONFLICT_RESOLUTION}}
|
|
94
|
+
|
|
95
|
+
{{CONFLICT_RESOLUTION_DESCRIPTION}}
|
|
96
|
+
|
|
97
|
+
---
|
|
98
|
+
|
|
99
|
+
## 🛠️ Implementation Examples
|
|
100
|
+
|
|
101
|
+
{{STATE_MANAGEMENT_EXAMPLES}}
|
|
102
|
+
|
|
103
|
+
---
|
|
104
|
+
|
|
105
|
+
## ✅ Best Practices
|
|
106
|
+
|
|
107
|
+
1. **Separate Concerns** - Keep app state, server state, and local state separate
|
|
108
|
+
2. **Use Appropriate Tool** - Use right tool for right job
|
|
109
|
+
3. **Handle Offline** - Always handle offline scenarios
|
|
110
|
+
4. **Optimize Performance** - Use memoization and selectors
|
|
111
|
+
5. **Test State Logic** - Write tests for state management logic
|
|
112
|
+
|
|
113
|
+
---
|
|
114
|
+
|
|
115
|
+
**Last Updated:** {{LAST_UPDATED}}
|
|
116
|
+
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
# Testing Strategy
|
|
2
|
+
|
|
3
|
+
> Testing approach for {{PROJECT_NAME}}
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## 🎯 Testing Philosophy
|
|
8
|
+
|
|
9
|
+
**Goal:** Ship with confidence through comprehensive automated testing
|
|
10
|
+
|
|
11
|
+
**Principles:**
|
|
12
|
+
1. Test user behavior, not implementation
|
|
13
|
+
2. Write tests that give confidence
|
|
14
|
+
3. Fast feedback loops
|
|
15
|
+
4. Test on real devices
|
|
16
|
+
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
## 🏗️ Testing Pyramid
|
|
20
|
+
|
|
21
|
+
**Distribution:**
|
|
22
|
+
- **70%** Unit Tests
|
|
23
|
+
- **20%** Integration Tests
|
|
24
|
+
- **10%** E2E Tests
|
|
25
|
+
|
|
26
|
+
---
|
|
27
|
+
|
|
28
|
+
## 🧪 Testing Stack
|
|
29
|
+
|
|
30
|
+
**Unit Testing:** {{UNIT_TEST_FRAMEWORK}}
|
|
31
|
+
|
|
32
|
+
**Component Testing:** {{COMPONENT_TEST_LIBRARY}}
|
|
33
|
+
|
|
34
|
+
**E2E Testing:** {{E2E_FRAMEWORK}}
|
|
35
|
+
|
|
36
|
+
**Coverage Target:** {{TEST_COVERAGE_TARGET}}
|
|
37
|
+
|
|
38
|
+
---
|
|
39
|
+
|
|
40
|
+
## 📦 Unit Testing
|
|
41
|
+
|
|
42
|
+
### What to Test
|
|
43
|
+
|
|
44
|
+
✅ **DO test:**
|
|
45
|
+
- Business logic
|
|
46
|
+
- Utility functions
|
|
47
|
+
- State management logic
|
|
48
|
+
- Custom hooks
|
|
49
|
+
|
|
50
|
+
❌ **DON'T test:**
|
|
51
|
+
- Third-party libraries
|
|
52
|
+
- Framework internals
|
|
53
|
+
- Trivial code
|
|
54
|
+
|
|
55
|
+
### Examples
|
|
56
|
+
|
|
57
|
+
{{UNIT_TEST_EXAMPLES}}
|
|
58
|
+
|
|
59
|
+
---
|
|
60
|
+
|
|
61
|
+
## 🧩 Component/Screen Testing
|
|
62
|
+
|
|
63
|
+
### What to Test
|
|
64
|
+
|
|
65
|
+
✅ **DO test:**
|
|
66
|
+
- User interactions
|
|
67
|
+
- Component rendering
|
|
68
|
+
- Props handling
|
|
69
|
+
- Event handlers
|
|
70
|
+
|
|
71
|
+
### Examples
|
|
72
|
+
|
|
73
|
+
{{COMPONENT_TEST_EXAMPLES}}
|
|
74
|
+
|
|
75
|
+
---
|
|
76
|
+
|
|
77
|
+
## 🎭 E2E Testing
|
|
78
|
+
|
|
79
|
+
### What to Test
|
|
80
|
+
|
|
81
|
+
✅ **DO test:**
|
|
82
|
+
- Critical user flows
|
|
83
|
+
- Navigation flows
|
|
84
|
+
- Authentication flows
|
|
85
|
+
- Key features
|
|
86
|
+
|
|
87
|
+
### Examples
|
|
88
|
+
|
|
89
|
+
{{E2E_TEST_EXAMPLES}}
|
|
90
|
+
|
|
91
|
+
---
|
|
92
|
+
|
|
93
|
+
## 📱 Device Testing
|
|
94
|
+
|
|
95
|
+
**Strategy:** {{DEVICE_TESTING_STRATEGY}}
|
|
96
|
+
|
|
97
|
+
**Physical Devices:** {{PHYSICAL_DEVICES}}
|
|
98
|
+
|
|
99
|
+
**Emulators/Simulators:** {{EMULATORS_SIMULATORS}}
|
|
100
|
+
|
|
101
|
+
---
|
|
102
|
+
|
|
103
|
+
## 🎨 Snapshot Testing
|
|
104
|
+
|
|
105
|
+
**Strategy:** {{SNAPSHOT_TESTING_STRATEGY}}
|
|
106
|
+
|
|
107
|
+
{{SNAPSHOT_TESTING_DESCRIPTION}}
|
|
108
|
+
|
|
109
|
+
---
|
|
110
|
+
|
|
111
|
+
## ⚡ Performance Testing
|
|
112
|
+
|
|
113
|
+
**Strategy:** {{PERFORMANCE_TESTING_STRATEGY}}
|
|
114
|
+
|
|
115
|
+
{{PERFORMANCE_TESTING_DESCRIPTION}}
|
|
116
|
+
|
|
117
|
+
---
|
|
118
|
+
|
|
119
|
+
## ♿ Accessibility Testing
|
|
120
|
+
|
|
121
|
+
**Strategy:** {{ACCESSIBILITY_TESTING_STRATEGY}}
|
|
122
|
+
|
|
123
|
+
{{ACCESSIBILITY_TESTING_DESCRIPTION}}
|
|
124
|
+
|
|
125
|
+
---
|
|
126
|
+
|
|
127
|
+
## 🔄 CI/CD Integration
|
|
128
|
+
|
|
129
|
+
**CI/CD Strategy:** {{CICD_TESTING_STRATEGY}}
|
|
130
|
+
|
|
131
|
+
{{CICD_TESTING_DESCRIPTION}}
|
|
132
|
+
|
|
133
|
+
---
|
|
134
|
+
|
|
135
|
+
## ✅ Best Practices
|
|
136
|
+
|
|
137
|
+
1. **Test on Real Devices** - Not just simulators/emulators
|
|
138
|
+
2. **Test Offline Scenarios** - Handle offline gracefully
|
|
139
|
+
3. **Test Permission Flows** - Test all permission scenarios
|
|
140
|
+
4. **Test Platform Differences** - Test iOS and Android separately
|
|
141
|
+
5. **Maintain Test Coverage** - Keep coverage above target
|
|
142
|
+
|
|
143
|
+
---
|
|
144
|
+
|
|
145
|
+
**Last Updated:** {{LAST_UPDATED}}
|
|
146
|
+
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
# Project Brief: {{PROJECT_NAME}}
|
|
2
|
+
|
|
3
|
+
> {{PROJECT_DESCRIPTION}}
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## 📋 Overview
|
|
8
|
+
|
|
9
|
+
**Project Name:** {{PROJECT_NAME}}
|
|
10
|
+
|
|
11
|
+
**Description:** {{PROJECT_DESCRIPTION}}
|
|
12
|
+
|
|
13
|
+
**Problem Statement:** {{PROBLEM_STATEMENT}}
|
|
14
|
+
|
|
15
|
+
**Target Users:** {{TARGET_USERS}}
|
|
16
|
+
|
|
17
|
+
**Project Scope:** {{PROJECT_SCOPE}}
|
|
18
|
+
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
## 🎯 Objectives
|
|
22
|
+
|
|
23
|
+
{{OBJECTIVES_LIST}}
|
|
24
|
+
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
## 📱 Platform & Framework
|
|
28
|
+
|
|
29
|
+
**Platforms:** {{PLATFORMS}}
|
|
30
|
+
|
|
31
|
+
**Framework:** {{FRAMEWORK}} {{FRAMEWORK_VERSION}}
|
|
32
|
+
|
|
33
|
+
**Language:** {{LANGUAGE}} {{LANGUAGE_VERSION}}
|
|
34
|
+
|
|
35
|
+
**Minimum OS Versions:**
|
|
36
|
+
- iOS: {{MIN_IOS_VERSION}}
|
|
37
|
+
- Android: {{MIN_ANDROID_VERSION}} (API {{MIN_ANDROID_API}})
|
|
38
|
+
|
|
39
|
+
---
|
|
40
|
+
|
|
41
|
+
## 🏗️ Architecture
|
|
42
|
+
|
|
43
|
+
**Architecture Pattern:** {{ARCHITECTURE_PATTERN}}
|
|
44
|
+
|
|
45
|
+
**Navigation Pattern:** {{NAVIGATION_PATTERN}}
|
|
46
|
+
|
|
47
|
+
**Component Organization:** {{COMPONENT_ORGANIZATION}}
|
|
48
|
+
|
|
49
|
+
**UI Framework:** {{UI_FRAMEWORK}}
|
|
50
|
+
|
|
51
|
+
**Dark Mode:** {{DARK_MODE_STRATEGY}}
|
|
52
|
+
|
|
53
|
+
**Internationalization:** {{I18N_STRATEGY}}
|
|
54
|
+
|
|
55
|
+
---
|
|
56
|
+
|
|
57
|
+
## 🔑 Key Features
|
|
58
|
+
|
|
59
|
+
{{KEY_FEATURES_LIST}}
|
|
60
|
+
|
|
61
|
+
---
|
|
62
|
+
|
|
63
|
+
## 🔐 Permissions & Native Features
|
|
64
|
+
|
|
65
|
+
**Required Permissions:**
|
|
66
|
+
{{PERMISSIONS_LIST}}
|
|
67
|
+
|
|
68
|
+
**Native Features:**
|
|
69
|
+
{{NATIVE_FEATURES_LIST}}
|
|
70
|
+
|
|
71
|
+
**Third-Party SDKs:**
|
|
72
|
+
{{THIRD_PARTY_SDKS_LIST}}
|
|
73
|
+
|
|
74
|
+
---
|
|
75
|
+
|
|
76
|
+
## 📊 Success Metrics
|
|
77
|
+
|
|
78
|
+
{{SUCCESS_METRICS_LIST}}
|
|
79
|
+
|
|
80
|
+
---
|
|
81
|
+
|
|
82
|
+
## 🚀 Timeline
|
|
83
|
+
|
|
84
|
+
{{TIMELINE_DESCRIPTION}}
|
|
85
|
+
|
|
86
|
+
---
|
|
87
|
+
|
|
88
|
+
## 📝 Notes
|
|
89
|
+
|
|
90
|
+
{{ADDITIONAL_NOTES}}
|
|
91
|
+
|
|
92
|
+
---
|
|
93
|
+
|
|
94
|
+
**Created:** {{CREATED_DATE}}
|
|
95
|
+
|
|
96
|
+
**Last Updated:** {{LAST_UPDATED}}
|
|
97
|
+
|