appiq-solution 1.6.4 → 1.7.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.
- package/CHANGELOG.md +62 -0
- package/README.md +109 -63
- package/bmad-core/core-config-extended.yaml +39 -0
- package/bmad-core/core-config-smart.yaml +184 -0
- package/bmad-core/core-config.yaml +165 -1
- package/bmad-core/data/mandatory-development-rules.md +170 -0
- package/bmad-core/tasks/auto-detect-prds.md +162 -0
- package/bmad-core/tasks/smart-auto-detect-prds.md +299 -0
- package/bmad-core/tasks/validate-mandatory-rules.md +322 -0
- package/docs/enhanced_prd_template.md +202 -0
- package/docs/livestream_prd_example.md +93 -0
- package/docs/livestream_prd_smart.md +278 -0
- package/docs/onboarding_prd.md +93 -0
- package/expansion-packs/appiq-flutter-mobile-dev/agents/flutter-ui-agent.md +34 -8
- package/expansion-packs/appiq-flutter-mobile-dev/config.yaml +1 -1
- package/expansion-packs/appiq-flutter-mobile-dev/data/flutter-development-guidelines.md +66 -0
- package/package.json +1 -1
@@ -0,0 +1,322 @@
|
|
1
|
+
# Validate Mandatory Development Rules Task
|
2
|
+
|
3
|
+
## Purpose
|
4
|
+
Automatically validate that ALL mandatory development rules are being followed during development. This task MUST be run before any code is considered complete.
|
5
|
+
|
6
|
+
## Usage
|
7
|
+
```bash
|
8
|
+
@dev validate-mandatory-rules
|
9
|
+
@qa validate-mandatory-rules
|
10
|
+
```
|
11
|
+
|
12
|
+
## MANDATORY Validation Checklist
|
13
|
+
|
14
|
+
### 🚨 CRITICAL: Standard Workflow Validation
|
15
|
+
- [ ] **Plan Created**: `tasks/todo.md` exists with detailed, checkable items
|
16
|
+
- [ ] **Plan Verified**: User has approved the plan before coding started
|
17
|
+
- [ ] **Existing Code Checked**: Similar functionality was analyzed FIRST
|
18
|
+
- [ ] **Todo Items Tracked**: Items are being marked complete as work progresses
|
19
|
+
- [ ] **Explanations Provided**: High-level explanations given at each step
|
20
|
+
- [ ] **Simple Changes**: Minimal code impact - no massive refactors
|
21
|
+
- [ ] **Review Section Added**: Summary of changes in `todo.md`
|
22
|
+
- [ ] **Git Commits Made**: Proper commits after each completed task
|
23
|
+
|
24
|
+
### 🎯 MANDATORY: Quality Gates Validation (ALL 5 MUST PASS!)
|
25
|
+
|
26
|
+
#### 1. 🧹 DRY (Don't Repeat Yourself)
|
27
|
+
```bash
|
28
|
+
# Check for code duplication
|
29
|
+
find lib/ -name "*.dart" -exec grep -l "similar_pattern" {} \;
|
30
|
+
|
31
|
+
# Validate no duplicate widgets
|
32
|
+
find lib/shared/widgets/ -name "*.dart"
|
33
|
+
find lib/features/*/presentation/widgets/ -name "*similar*"
|
34
|
+
|
35
|
+
# Check for duplicate services
|
36
|
+
find lib/shared/services/ -name "*.dart"
|
37
|
+
find lib/features/*/data/datasources/ -name "*similar*"
|
38
|
+
```
|
39
|
+
|
40
|
+
**Validation Rules:**
|
41
|
+
- [ ] **No duplicate widgets** when shared widget exists
|
42
|
+
- [ ] **No duplicate services** when shared service exists
|
43
|
+
- [ ] **No duplicate utilities** when shared utility exists
|
44
|
+
- [ ] **No duplicate business logic** across features
|
45
|
+
- [ ] **Common functionality extracted** to shared components
|
46
|
+
|
47
|
+
#### 2. 📖 Readable
|
48
|
+
```bash
|
49
|
+
# Check for clear naming
|
50
|
+
grep -r "data\|info\|manager\|handler" lib/ --include="*.dart"
|
51
|
+
|
52
|
+
# Check method length (max 20 lines)
|
53
|
+
find lib/ -name "*.dart" -exec awk '/^[[:space:]]*[a-zA-Z].*{/{flag=1; count=0} flag{count++} /^[[:space:]]*}$/{if(flag && count>20) print FILENAME":"NR-count+1"-"NR; flag=0}' {} \;
|
54
|
+
|
55
|
+
# Check for comments explaining WHY
|
56
|
+
grep -r "// TODO\|// FIXME\|// HACK" lib/ --include="*.dart"
|
57
|
+
```
|
58
|
+
|
59
|
+
**Validation Rules:**
|
60
|
+
- [ ] **Method names** are descriptive and clear
|
61
|
+
- [ ] **Class names** follow single responsibility principle
|
62
|
+
- [ ] **Variable names** are self-documenting
|
63
|
+
- [ ] **Methods are small** (max 20 lines)
|
64
|
+
- [ ] **Comments explain WHY**, not WHAT
|
65
|
+
|
66
|
+
#### 3. 🔧 Maintainable
|
67
|
+
```bash
|
68
|
+
# Check Clean Architecture compliance
|
69
|
+
find lib/features/ -type d -name "data"
|
70
|
+
find lib/features/ -type d -name "domain"
|
71
|
+
find lib/features/ -type d -name "presentation"
|
72
|
+
|
73
|
+
# Check dependency injection usage
|
74
|
+
grep -r "@injectable\|GetIt" lib/ --include="*.dart"
|
75
|
+
|
76
|
+
# Check proper imports (no cross-layer dependencies)
|
77
|
+
grep -r "import.*data.*" lib/features/*/domain/ --include="*.dart"
|
78
|
+
grep -r "import.*presentation.*" lib/features/*/domain/ --include="*.dart"
|
79
|
+
```
|
80
|
+
|
81
|
+
**Validation Rules:**
|
82
|
+
- [ ] **Clean Architecture layers** properly separated
|
83
|
+
- [ ] **No cross-layer dependencies** (domain doesn't import data/presentation)
|
84
|
+
- [ ] **Dependency injection** used consistently
|
85
|
+
- [ ] **Modular design** with clear boundaries
|
86
|
+
- [ ] **Single responsibility** principle followed
|
87
|
+
|
88
|
+
#### 4. ⚡ Performant
|
89
|
+
```bash
|
90
|
+
# Check for redundant API calls
|
91
|
+
grep -r "http\|api" lib/ --include="*.dart" | grep -v "test"
|
92
|
+
|
93
|
+
# Check for proper const constructors
|
94
|
+
grep -r "const.*(" lib/features/*/presentation/widgets/ --include="*.dart"
|
95
|
+
|
96
|
+
# Check for efficient list operations
|
97
|
+
grep -r "\.map(\|\.where(\|\.forEach(" lib/ --include="*.dart"
|
98
|
+
```
|
99
|
+
|
100
|
+
**Validation Rules:**
|
101
|
+
- [ ] **No redundant API calls** in repositories
|
102
|
+
- [ ] **Const constructors** used in widgets
|
103
|
+
- [ ] **Efficient algorithms** implemented
|
104
|
+
- [ ] **Proper caching** strategies used
|
105
|
+
- [ ] **Resource optimization** applied
|
106
|
+
|
107
|
+
#### 5. 🧪 Testable
|
108
|
+
```bash
|
109
|
+
# Check for unit tests
|
110
|
+
find test/ -name "*_test.dart" | wc -l
|
111
|
+
find lib/features/*/domain/usecases/ -name "*.dart" | wc -l
|
112
|
+
|
113
|
+
# Check for widget tests
|
114
|
+
find test/ -name "*_widget_test.dart" | wc -l
|
115
|
+
find lib/features/*/presentation/widgets/ -name "*.dart" | wc -l
|
116
|
+
|
117
|
+
# Check test coverage
|
118
|
+
flutter test --coverage
|
119
|
+
```
|
120
|
+
|
121
|
+
**Validation Rules:**
|
122
|
+
- [ ] **Unit tests** exist for all use cases
|
123
|
+
- [ ] **Widget tests** exist for all custom widgets
|
124
|
+
- [ ] **Repository tests** with proper mocking
|
125
|
+
- [ ] **Cubit tests** for all state management
|
126
|
+
- [ ] **Test coverage** meets minimum requirements (80%+)
|
127
|
+
|
128
|
+
### 📱 MANDATORY: Flutter-Specific Validation
|
129
|
+
|
130
|
+
#### Clean Architecture Compliance
|
131
|
+
```bash
|
132
|
+
# Validate folder structure
|
133
|
+
ls -la lib/features/*/data/datasources/
|
134
|
+
ls -la lib/features/*/data/models/
|
135
|
+
ls -la lib/features/*/data/repositories/
|
136
|
+
ls -la lib/features/*/domain/entities/
|
137
|
+
ls -la lib/features/*/domain/repositories/
|
138
|
+
ls -la lib/features/*/domain/usecases/
|
139
|
+
ls -la lib/features/*/presentation/cubit/
|
140
|
+
ls -la lib/features/*/presentation/pages/
|
141
|
+
ls -la lib/features/*/presentation/widgets/
|
142
|
+
```
|
143
|
+
|
144
|
+
**Validation Rules:**
|
145
|
+
- [ ] **Proper folder structure** following Clean Architecture
|
146
|
+
- [ ] **Entity classes** in domain layer
|
147
|
+
- [ ] **Model classes** in data layer with JSON serialization
|
148
|
+
- [ ] **Repository interfaces** in domain, implementations in data
|
149
|
+
- [ ] **Use cases** contain business logic
|
150
|
+
- [ ] **Cubits** handle state management
|
151
|
+
- [ ] **Pages and widgets** in presentation layer
|
152
|
+
|
153
|
+
#### Localization Compliance
|
154
|
+
```bash
|
155
|
+
# Check for static text (INSTANT FAILURE!)
|
156
|
+
grep -r "Text(\|text:\|title:\|label:" lib/features/ --include="*.dart" | grep -v "AppLocalizations\|context.l10n\|S.of"
|
157
|
+
|
158
|
+
# Check for localization usage
|
159
|
+
grep -r "AppLocalizations.of\|context.l10n\|S.of" lib/ --include="*.dart"
|
160
|
+
|
161
|
+
# Validate ARB files
|
162
|
+
find lib/l10n/ -name "*.arb"
|
163
|
+
```
|
164
|
+
|
165
|
+
**Validation Rules:**
|
166
|
+
- [ ] **NO static text** in any widget (INSTANT FAILURE if found!)
|
167
|
+
- [ ] **All text uses AppLocalizations** or equivalent
|
168
|
+
- [ ] **ARB files** contain all required keys
|
169
|
+
- [ ] **Localization keys** are descriptive and hierarchical
|
170
|
+
- [ ] **Placeholders** used for dynamic content
|
171
|
+
|
172
|
+
#### State Management Compliance
|
173
|
+
```bash
|
174
|
+
# Check Cubit usage
|
175
|
+
find lib/features/*/presentation/cubit/ -name "*_cubit.dart"
|
176
|
+
find lib/features/*/presentation/cubit/ -name "*_state.dart"
|
177
|
+
|
178
|
+
# Check for proper state classes
|
179
|
+
grep -r "extends Equatable" lib/features/*/presentation/cubit/ --include="*.dart"
|
180
|
+
grep -r "copyWith" lib/features/*/presentation/cubit/ --include="*.dart"
|
181
|
+
```
|
182
|
+
|
183
|
+
**Validation Rules:**
|
184
|
+
- [ ] **Cubit pattern** used for state management
|
185
|
+
- [ ] **State classes** extend Equatable
|
186
|
+
- [ ] **CopyWith methods** implemented
|
187
|
+
- [ ] **Proper state transitions** defined
|
188
|
+
- [ ] **Error handling** in state management
|
189
|
+
|
190
|
+
### 🔍 MANDATORY: Code Integration Validation
|
191
|
+
|
192
|
+
#### Existing Component Check
|
193
|
+
```bash
|
194
|
+
# Before creating new widgets
|
195
|
+
echo "Checking existing widgets..."
|
196
|
+
find lib/shared/widgets/ -name "*.dart" | sort
|
197
|
+
|
198
|
+
# Before creating new services
|
199
|
+
echo "Checking existing services..."
|
200
|
+
find lib/shared/services/ -name "*.dart" | sort
|
201
|
+
|
202
|
+
# Before creating new utilities
|
203
|
+
echo "Checking existing utilities..."
|
204
|
+
find lib/shared/utils/ -name "*.dart" | sort
|
205
|
+
```
|
206
|
+
|
207
|
+
**Validation Rules:**
|
208
|
+
- [ ] **Existing widgets checked** before creating new ones
|
209
|
+
- [ ] **Existing services checked** before creating new ones
|
210
|
+
- [ ] **Existing utilities checked** before creating new ones
|
211
|
+
- [ ] **Similar features analyzed** for reusable patterns
|
212
|
+
- [ ] **Integration points identified** and utilized
|
213
|
+
|
214
|
+
#### Pattern Consistency Check
|
215
|
+
```bash
|
216
|
+
# Check naming conventions
|
217
|
+
find lib/ -name "*.dart" | grep -v "snake_case"
|
218
|
+
find lib/ -name "*.dart" -exec basename {} \; | grep -E "[A-Z]"
|
219
|
+
|
220
|
+
# Check class naming
|
221
|
+
grep -r "^class [a-z]" lib/ --include="*.dart"
|
222
|
+
grep -r "^class.*[_-]" lib/ --include="*.dart"
|
223
|
+
```
|
224
|
+
|
225
|
+
**Validation Rules:**
|
226
|
+
- [ ] **File names** use snake_case
|
227
|
+
- [ ] **Class names** use PascalCase
|
228
|
+
- [ ] **Method names** use camelCase
|
229
|
+
- [ ] **Variable names** use camelCase
|
230
|
+
- [ ] **Constants** use SCREAMING_SNAKE_CASE
|
231
|
+
|
232
|
+
### 🚨 FAILURE CONDITIONS (INSTANT FAILURE!)
|
233
|
+
|
234
|
+
#### Critical Failures (Development STOPS immediately!)
|
235
|
+
```bash
|
236
|
+
# Check for static text (INSTANT FAILURE!)
|
237
|
+
if grep -r "Text('\|Text(\"\|title: '\|title: \"" lib/features/ --include="*.dart" | grep -v "AppLocalizations\|context.l10n\|S.of"; then
|
238
|
+
echo "❌ INSTANT FAILURE: Static text found in UI!"
|
239
|
+
exit 1
|
240
|
+
fi
|
241
|
+
|
242
|
+
# Check for code duplication (INSTANT FAILURE!)
|
243
|
+
if find lib/features/ -name "*.dart" -exec grep -l "duplicate_pattern" {} \; 2>/dev/null; then
|
244
|
+
echo "❌ INSTANT FAILURE: Code duplication detected!"
|
245
|
+
exit 1
|
246
|
+
fi
|
247
|
+
|
248
|
+
# Check for architecture violations (INSTANT FAILURE!)
|
249
|
+
if grep -r "import.*data.*" lib/features/*/domain/ --include="*.dart" 2>/dev/null; then
|
250
|
+
echo "❌ INSTANT FAILURE: Domain layer importing data layer!"
|
251
|
+
exit 1
|
252
|
+
fi
|
253
|
+
|
254
|
+
# Check for missing tests (INSTANT FAILURE!)
|
255
|
+
if [ $(find test/ -name "*_test.dart" | wc -l) -eq 0 ]; then
|
256
|
+
echo "❌ INSTANT FAILURE: No tests found!"
|
257
|
+
exit 1
|
258
|
+
fi
|
259
|
+
```
|
260
|
+
|
261
|
+
## Validation Report Generation
|
262
|
+
|
263
|
+
### Success Report
|
264
|
+
```markdown
|
265
|
+
✅ MANDATORY RULES VALIDATION PASSED!
|
266
|
+
|
267
|
+
Standard Workflow: ✅ PASSED
|
268
|
+
- Plan created and verified
|
269
|
+
- Existing code checked first
|
270
|
+
- Simple changes implemented
|
271
|
+
- Review section completed
|
272
|
+
|
273
|
+
Quality Gates: ✅ ALL 5 PASSED
|
274
|
+
- 🧹 DRY: No code duplication
|
275
|
+
- 📖 Readable: Clear, self-documenting code
|
276
|
+
- 🔧 Maintainable: Clean Architecture followed
|
277
|
+
- ⚡ Performant: Optimized implementation
|
278
|
+
- 🧪 Testable: Comprehensive test coverage
|
279
|
+
|
280
|
+
Flutter Compliance: ✅ PASSED
|
281
|
+
- Clean Architecture structure
|
282
|
+
- No static text found
|
283
|
+
- Proper Cubit state management
|
284
|
+
- Localization fully implemented
|
285
|
+
|
286
|
+
Code Integration: ✅ PASSED
|
287
|
+
- Existing components reused
|
288
|
+
- Patterns followed consistently
|
289
|
+
- No unnecessary duplication
|
290
|
+
|
291
|
+
🎉 READY FOR PRODUCTION!
|
292
|
+
```
|
293
|
+
|
294
|
+
### Failure Report
|
295
|
+
```markdown
|
296
|
+
❌ MANDATORY RULES VALIDATION FAILED!
|
297
|
+
|
298
|
+
Critical Failures:
|
299
|
+
❌ Static text found in lib/features/livestream/presentation/pages/stream_page.dart:45
|
300
|
+
❌ Code duplication detected in lib/features/livestream/presentation/widgets/
|
301
|
+
❌ Missing tests for StreamUseCase
|
302
|
+
|
303
|
+
DEVELOPMENT MUST STOP UNTIL FIXED!
|
304
|
+
|
305
|
+
Required Actions:
|
306
|
+
1. Replace all static text with AppLocalizations
|
307
|
+
2. Remove duplicate code and reuse existing components
|
308
|
+
3. Add comprehensive unit tests
|
309
|
+
4. Re-run validation
|
310
|
+
|
311
|
+
DO NOT PROCEED UNTIL ALL FAILURES ARE RESOLVED!
|
312
|
+
```
|
313
|
+
|
314
|
+
## Integration with Development Workflow
|
315
|
+
|
316
|
+
This validation MUST be run:
|
317
|
+
- [ ] **Before any code review**
|
318
|
+
- [ ] **Before any git commit**
|
319
|
+
- [ ] **Before marking any story as complete**
|
320
|
+
- [ ] **Before any deployment**
|
321
|
+
|
322
|
+
**NO EXCEPTIONS! NO SHORTCUTS! NO COMPROMISES!**
|
@@ -0,0 +1,202 @@
|
|
1
|
+
# {Feature Name} PRD
|
2
|
+
|
3
|
+
## Overview
|
4
|
+
Brief description of the feature
|
5
|
+
|
6
|
+
## Implementation Paths
|
7
|
+
> Specify where this feature should be implemented. If not specified, Architect will determine optimal location.
|
8
|
+
|
9
|
+
### Suggested File Structure
|
10
|
+
```
|
11
|
+
lib/
|
12
|
+
├── features/
|
13
|
+
│ └── {feature_name}/ # ← Main feature folder
|
14
|
+
│ ├── data/
|
15
|
+
│ │ ├── datasources/
|
16
|
+
│ │ │ └── {feature}_remote_datasource.dart
|
17
|
+
│ │ ├── models/
|
18
|
+
│ │ │ └── {feature}_model.dart
|
19
|
+
│ │ └── repositories/
|
20
|
+
│ │ └── {feature}_repository_impl.dart
|
21
|
+
│ ├── domain/
|
22
|
+
│ │ ├── entities/
|
23
|
+
│ │ │ └── {feature}_entity.dart
|
24
|
+
│ │ ├── repositories/
|
25
|
+
│ │ │ └── {feature}_repository.dart
|
26
|
+
│ │ └── usecases/
|
27
|
+
│ │ ├── get_{feature}_usecase.dart
|
28
|
+
│ │ └── create_{feature}_usecase.dart
|
29
|
+
│ └── presentation/
|
30
|
+
│ ├── cubit/
|
31
|
+
│ │ ├── {feature}_cubit.dart
|
32
|
+
│ │ └── {feature}_state.dart
|
33
|
+
│ ├── pages/
|
34
|
+
│ │ └── {feature}_page.dart
|
35
|
+
│ └── widgets/
|
36
|
+
│ └── {feature}_widget.dart
|
37
|
+
```
|
38
|
+
|
39
|
+
### Integration Points
|
40
|
+
> Specify existing files/classes to integrate with:
|
41
|
+
|
42
|
+
- **Existing Pages**: `lib/features/home/presentation/pages/home_page.dart`
|
43
|
+
- **Shared Services**: `lib/shared/services/api_service.dart`
|
44
|
+
- **Common Widgets**: `lib/shared/widgets/custom_button.dart`
|
45
|
+
- **Routing**: `lib/core/routing/app_router.dart`
|
46
|
+
- **DI Container**: `lib/core/di/injection_container.dart`
|
47
|
+
|
48
|
+
### Code Reuse Analysis
|
49
|
+
> List existing components that should be checked/reused:
|
50
|
+
|
51
|
+
#### Existing Similar Features
|
52
|
+
- [ ] Check `lib/features/user_profile/` for similar patterns
|
53
|
+
- [ ] Review `lib/features/authentication/` for auth integration
|
54
|
+
- [ ] Analyze `lib/shared/widgets/` for reusable UI components
|
55
|
+
|
56
|
+
#### Shared Components to Reuse
|
57
|
+
- [ ] `lib/shared/widgets/loading_widget.dart` - For loading states
|
58
|
+
- [ ] `lib/shared/widgets/error_widget.dart` - For error handling
|
59
|
+
- [ ] `lib/shared/services/navigation_service.dart` - For navigation
|
60
|
+
- [ ] `lib/shared/utils/validators.dart` - For input validation
|
61
|
+
|
62
|
+
#### Common Patterns to Follow
|
63
|
+
- [ ] Follow existing Cubit naming: `{Feature}Cubit`, `{Feature}State`
|
64
|
+
- [ ] Use existing error handling: `Failure` classes in `lib/core/error/`
|
65
|
+
- [ ] Follow existing API patterns: `ApiResponse<T>` wrapper
|
66
|
+
- [ ] Use existing dependency injection patterns
|
67
|
+
|
68
|
+
## UI References
|
69
|
+
> Include mockups, wireframes, or reference images
|
70
|
+
|
71
|
+
### Design Assets Location
|
72
|
+
```
|
73
|
+
assets/
|
74
|
+
├── images/
|
75
|
+
│ └── {feature_name}/
|
76
|
+
│ ├── mockup_main_screen.png
|
77
|
+
│ ├── wireframe_flow.png
|
78
|
+
│ └── ui_components_reference.png
|
79
|
+
└── icons/
|
80
|
+
└── {feature_name}/
|
81
|
+
├── feature_icon.svg
|
82
|
+
└── action_icons/
|
83
|
+
```
|
84
|
+
|
85
|
+
### UI Reference Links
|
86
|
+
- **Figma Design**: [Link to Figma prototype]
|
87
|
+
- **Design System**: [Link to design system/style guide]
|
88
|
+
- **Similar UI Patterns**: `lib/features/existing_feature/presentation/pages/` for reference
|
89
|
+
|
90
|
+
### Visual Guidelines
|
91
|
+
- **Theme**: Follow existing `lib/shared/theme/app_theme.dart`
|
92
|
+
- **Colors**: Use existing color palette from `AppColors`
|
93
|
+
- **Typography**: Follow `AppTextStyles` definitions
|
94
|
+
- **Spacing**: Use `AppSpacing` constants
|
95
|
+
- **Components**: Extend existing `lib/shared/widgets/` where possible
|
96
|
+
|
97
|
+
## Features
|
98
|
+
- Feature 1: Description
|
99
|
+
- Feature 2: Description
|
100
|
+
- Feature 3: Description
|
101
|
+
|
102
|
+
## Acceptance Criteria
|
103
|
+
### Feature 1
|
104
|
+
- [ ] Criteria 1
|
105
|
+
- [ ] Criteria 2
|
106
|
+
|
107
|
+
## Technical Requirements
|
108
|
+
|
109
|
+
### Architecture Compliance
|
110
|
+
- [ ] Follow Clean Architecture pattern
|
111
|
+
- [ ] Use existing Cubit state management patterns
|
112
|
+
- [ ] Implement Repository pattern following existing conventions
|
113
|
+
- [ ] Use GetIt dependency injection like other features
|
114
|
+
|
115
|
+
### Code Integration Requirements
|
116
|
+
- [ ] **Before creating new files**: Check if similar functionality exists
|
117
|
+
- [ ] **Before new widgets**: Review `lib/shared/widgets/` for reusable components
|
118
|
+
- [ ] **Before new services**: Check `lib/shared/services/` for existing solutions
|
119
|
+
- [ ] **Before new utilities**: Review `lib/shared/utils/` for helper functions
|
120
|
+
|
121
|
+
### Performance Requirements
|
122
|
+
- [ ] Reuse existing cached data where applicable
|
123
|
+
- [ ] Follow existing image loading/caching patterns
|
124
|
+
- [ ] Use existing performance monitoring setup
|
125
|
+
|
126
|
+
## Auto-Analysis Instructions
|
127
|
+
> Instructions for the auto-detect system
|
128
|
+
|
129
|
+
### Code Analysis Tasks
|
130
|
+
1. **Scan Existing Codebase**:
|
131
|
+
```bash
|
132
|
+
# Analyze similar features
|
133
|
+
find lib/features/ -name "*{similar_keyword}*" -type f
|
134
|
+
|
135
|
+
# Check shared components
|
136
|
+
ls -la lib/shared/widgets/ | grep -i {relevant_widgets}
|
137
|
+
|
138
|
+
# Review existing services
|
139
|
+
find lib/shared/services/ -name "*{service_type}*"
|
140
|
+
```
|
141
|
+
|
142
|
+
2. **Dependency Analysis**:
|
143
|
+
- Check `pubspec.yaml` for existing packages that could be reused
|
144
|
+
- Review `lib/core/di/injection_container.dart` for existing service registrations
|
145
|
+
- Analyze existing API endpoints in data sources
|
146
|
+
|
147
|
+
3. **Pattern Analysis**:
|
148
|
+
- Review existing Cubit implementations for state management patterns
|
149
|
+
- Check existing repository implementations for data access patterns
|
150
|
+
- Analyze existing widget compositions for UI patterns
|
151
|
+
|
152
|
+
### Architect Fallback Rules
|
153
|
+
> If implementation paths are not specified:
|
154
|
+
|
155
|
+
1. **Analyze Feature Complexity**:
|
156
|
+
- Simple feature → Integrate into existing feature folder
|
157
|
+
- Complex feature → Create new feature folder
|
158
|
+
- Cross-cutting concern → Add to shared/
|
159
|
+
|
160
|
+
2. **Check Dependencies**:
|
161
|
+
- Heavy external dependencies → Separate feature
|
162
|
+
- Uses existing services → Integrate with existing structure
|
163
|
+
- New infrastructure needed → Consult with data layer architecture
|
164
|
+
|
165
|
+
3. **UI Complexity Assessment**:
|
166
|
+
- Single screen → Add to existing feature
|
167
|
+
- Multiple screens with navigation → New feature folder
|
168
|
+
- Shared UI components → Extract to shared/widgets/
|
169
|
+
|
170
|
+
## User Stories
|
171
|
+
### Epic: {Epic Name}
|
172
|
+
- As a user I want to... so that...
|
173
|
+
- As a user I want to... so that...
|
174
|
+
|
175
|
+
## Dependencies
|
176
|
+
- Backend API endpoints
|
177
|
+
- Third-party integrations
|
178
|
+
- Design assets
|
179
|
+
- Existing code dependencies
|
180
|
+
|
181
|
+
## Migration/Integration Notes
|
182
|
+
> Special considerations for integrating with existing codebase
|
183
|
+
|
184
|
+
### Database Changes
|
185
|
+
- [ ] Check if existing database schema can be extended
|
186
|
+
- [ ] Review existing migration patterns
|
187
|
+
- [ ] Consider data migration requirements
|
188
|
+
|
189
|
+
### API Changes
|
190
|
+
- [ ] Review existing API client setup
|
191
|
+
- [ ] Check if new endpoints fit existing patterns
|
192
|
+
- [ ] Consider backwards compatibility
|
193
|
+
|
194
|
+
### Navigation Changes
|
195
|
+
- [ ] Review existing routing structure
|
196
|
+
- [ ] Check if new routes fit existing patterns
|
197
|
+
- [ ] Consider deep linking requirements
|
198
|
+
|
199
|
+
### State Management Integration
|
200
|
+
- [ ] Review existing global state management
|
201
|
+
- [ ] Check if feature state needs to be shared
|
202
|
+
- [ ] Consider state persistence requirements
|
@@ -0,0 +1,93 @@
|
|
1
|
+
# Livestream Feature PRD
|
2
|
+
|
3
|
+
## Overview
|
4
|
+
Implementierung einer Live-Streaming-Funktionalität in die bestehende Flutter-App, die es Benutzern ermöglicht, Live-Videos zu streamen und zu konsumieren.
|
5
|
+
|
6
|
+
## Features
|
7
|
+
- **Live Stream Starten**: Benutzer können einen Live-Stream über die Kamera starten
|
8
|
+
- **Stream Viewer**: Andere Benutzer können Live-Streams ansehen
|
9
|
+
- **Chat Integration**: Real-time Chat während des Streams
|
10
|
+
- **Stream Controls**: Play/Pause, Qualitätseinstellungen, Vollbild
|
11
|
+
- **Stream Discovery**: Liste aktiver Streams
|
12
|
+
- **Stream Analytics**: Viewer-Zahlen, Stream-Dauer
|
13
|
+
|
14
|
+
## Acceptance Criteria
|
15
|
+
|
16
|
+
### Live Stream Starten
|
17
|
+
- [ ] Benutzer kann über einen "Go Live" Button einen Stream starten
|
18
|
+
- [ ] Kamera-Berechtigung wird angefordert und verwaltet
|
19
|
+
- [ ] Stream-Titel und Beschreibung können eingegeben werden
|
20
|
+
- [ ] Stream-Qualität kann ausgewählt werden (720p, 1080p)
|
21
|
+
- [ ] Stream kann jederzeit beendet werden
|
22
|
+
|
23
|
+
### Stream Viewer
|
24
|
+
- [ ] Liste aller aktiven Streams wird angezeigt
|
25
|
+
- [ ] Stream kann durch Tippen geöffnet werden
|
26
|
+
- [ ] Video-Player mit Standard-Controls (Play/Pause, Lautstärke)
|
27
|
+
- [ ] Fullscreen-Modus verfügbar
|
28
|
+
- [ ] Viewer-Anzahl wird angezeigt
|
29
|
+
|
30
|
+
### Chat Integration
|
31
|
+
- [ ] Chat-Interface neben/unter dem Video
|
32
|
+
- [ ] Nachrichten werden in Echtzeit angezeigt
|
33
|
+
- [ ] Benutzer können Nachrichten senden
|
34
|
+
- [ ] Chat-Moderation (Nachrichten löschen)
|
35
|
+
- [ ] Emoji-Support im Chat
|
36
|
+
|
37
|
+
## Technical Requirements
|
38
|
+
|
39
|
+
### Flutter Architecture
|
40
|
+
- Clean Architecture mit Domain/Data/Presentation Layers
|
41
|
+
- Cubit für State Management
|
42
|
+
- Repository Pattern für Data Access
|
43
|
+
- Dependency Injection mit GetIt
|
44
|
+
|
45
|
+
### Backend Integration
|
46
|
+
- WebRTC für Live-Streaming
|
47
|
+
- WebSocket für Real-time Chat
|
48
|
+
- REST API für Stream-Metadaten
|
49
|
+
- Firebase/Supabase für User Management
|
50
|
+
|
51
|
+
### Performance
|
52
|
+
- Adaptive Bitrate Streaming
|
53
|
+
- Efficient Memory Management
|
54
|
+
- Background Processing für Chat
|
55
|
+
- Caching für Stream-Thumbnails
|
56
|
+
|
57
|
+
## User Stories
|
58
|
+
|
59
|
+
### Epic: Live Streaming Core
|
60
|
+
- Als Content Creator möchte ich einen Live-Stream starten können, damit ich meine Inhalte in Echtzeit teilen kann
|
61
|
+
- Als Viewer möchte ich aktive Streams entdecken können, damit ich interessante Inhalte finden kann
|
62
|
+
- Als Viewer möchte ich Streams in hoher Qualität ansehen können, damit ich ein gutes Seherlebnis habe
|
63
|
+
|
64
|
+
### Epic: Chat & Interaction
|
65
|
+
- Als Viewer möchte ich während des Streams chatten können, damit ich mit dem Creator und anderen Viewern interagieren kann
|
66
|
+
- Als Content Creator möchte ich Chat-Nachrichten moderieren können, damit ich eine positive Community-Atmosphäre schaffe
|
67
|
+
- Als Benutzer möchte ich Emojis im Chat verwenden können, damit ich meine Reaktionen ausdrücken kann
|
68
|
+
|
69
|
+
### Epic: Stream Management
|
70
|
+
- Als Content Creator möchte ich meine Stream-Einstellungen anpassen können, damit ich die beste Qualität für meine Zielgruppe biete
|
71
|
+
- Als Content Creator möchte ich Stream-Analytics einsehen können, damit ich den Erfolg meiner Streams messen kann
|
72
|
+
- Als Benutzer möchte ich Streams als Favoriten markieren können, damit ich sie später leicht wiederfinden kann
|
73
|
+
|
74
|
+
## Dependencies
|
75
|
+
- **Backend API**: Stream-Management Endpoints
|
76
|
+
- **WebRTC Service**: Live-Streaming Infrastructure
|
77
|
+
- **Chat Service**: Real-time Messaging
|
78
|
+
- **CDN**: Video-Delivery Network
|
79
|
+
- **Push Notifications**: Stream-Start Benachrichtigungen
|
80
|
+
|
81
|
+
## Design Requirements
|
82
|
+
- Material Design 3 Guidelines
|
83
|
+
- Responsive Layout (Phone/Tablet)
|
84
|
+
- Dark/Light Theme Support
|
85
|
+
- Accessibility Compliance (WCAG 2.1)
|
86
|
+
- Lokalisierung (DE/EN)
|
87
|
+
|
88
|
+
## Testing Requirements
|
89
|
+
- Unit Tests für alle Business Logic
|
90
|
+
- Widget Tests für UI Components
|
91
|
+
- Integration Tests für Stream-Flows
|
92
|
+
- Performance Tests für Video-Streaming
|
93
|
+
- Security Tests für User Data
|