mirror of
https://github.com/R0m1k3/xtremflow.git
synced 2026-10-11 17:30:00 +02:00
Builds reproductibles, CI durcie, docs remises à jour
Lockfiles : - pubspec.lock et bin/pubspec.lock versionnés (le .gitignore les excluait via *.lock ; le Dockerfile résolvait des versions fraîches à chaque build, comme son commentaire l'assumait) ; le Dockerfile les COPY désormais, .dockerignore ajusté CI (ci.yml) : - flutter-version 3.38.4 et Dart 3.13.2 épinglés (channel: stable seul fait dériver le SDK et peut casser la CI sans changement du dépôt) - cache pub activé, concurrency: cancel-in-progress Publication (docker-publish.yml) : - Chaîné sur la CI via workflow_run : l'image :latest n'est publiée qu'après analyze/test/build verts sur main (l'ancien push: [main] tournait en parallèle et pouvait publier une image cassée) ; build du head_sha validé par la CI docker-compose : - Défaut RECORDINGS_PATH: ./data/recordings au lieu du chemin unRAID spécifique à une machine (/mnt/user/Data/Sport) - Variable TZ (défaut Europe/Paris) Docs : - README réécrit : il décrivait une architecture disparue (Hive/ IndexedDB, hachage SHA-256, dhttpd port 8080, --web-renderer html) au lieu de l'état réel (SQLite serveur, bcrypt, binaire natif port 8089, enregistrements, transcodage, CI) - DEPLOYMENT_CHECKLIST.md archivé (6 fichiers cités inexistants, versions de dépendances fausses) - docs/archive/README.md : avertissement que ces documents sont historiques (plusieurs se déclarent « COMPLETE » à tort) Non traité ici : l'épinglage de la release FFmpeg du Dockerfile (l'accès aux releases BtbN est bloqué depuis cet environnement, impossible de vérifier un tag valide) et la suppression du code mort (reportée après le merge des PRs #7/#8/#9 pour éviter les conflits). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015oEu9QayWsw7hCKhenxgVa
This commit is contained in:
12 files changed
+1876
-263
No files matched your search
@@ -0,0 +1,361 @@
|
||||
# 🚀 XtremFlow Deployment Checklist
|
||||
|
||||
## Pre-Deployment Verification
|
||||
|
||||
### ✅ Step 1: Update Dependencies
|
||||
```bash
|
||||
cd /config/Desktop/Github/xtremflow
|
||||
flutter pub get
|
||||
```
|
||||
**Expected Output:** All 13 new packages downloaded and linked
|
||||
- lottie, animations, flutter_animate, percent_indicator, subtitle
|
||||
- dio_downloader, http_client_adapter, and others
|
||||
|
||||
### ✅ Step 2: Verify Compilation
|
||||
```bash
|
||||
flutter pub run build_runner build # if using codegen
|
||||
flutter test # Run existing tests
|
||||
```
|
||||
**Expected Result:** No errors, all tests pass
|
||||
|
||||
### ✅ Step 3: Review New Files
|
||||
Verify all 11 new files exist:
|
||||
|
||||
**Services:**
|
||||
- [ ] `lib/core/services/adaptive_bitrate_service.dart`
|
||||
- [ ] `lib/core/services/network_service.dart`
|
||||
- [ ] `lib/core/services/cache_service.dart`
|
||||
- [ ] `lib/core/services/streaming_optimizer.dart`
|
||||
- [ ] `lib/features/iptv/services/subtitle_service.dart`
|
||||
- [ ] `lib/features/iptv/services/download_service.dart`
|
||||
|
||||
**Providers & Widgets:**
|
||||
- [ ] `lib/features/iptv/providers/recommendations_provider.dart`
|
||||
- [ ] `lib/features/iptv/widgets/quality_selector_widget.dart`
|
||||
- [ ] `lib/features/iptv/widgets/continue_watching_widget.dart`
|
||||
- [ ] `lib/features/iptv/screens/epg_grid_screen.dart`
|
||||
|
||||
**Configuration:**
|
||||
- [ ] `lib/core/config/optimization_config.dart`
|
||||
|
||||
### ✅ Step 4: Update pubspec.yaml
|
||||
Verify these dependencies were added:
|
||||
```yaml
|
||||
dependencies:
|
||||
lottie: ^3.1.0
|
||||
animations: ^2.0.0
|
||||
flutter_animate: ^4.0.0
|
||||
percent_indicator: ^4.1.0
|
||||
subtitle: ^0.0.6
|
||||
dio_downloader: ^2.1.4
|
||||
http_client_adapter: ^1.0.0
|
||||
(and others for UI enhancement)
|
||||
```
|
||||
|
||||
**Status:** Should already be updated ✅
|
||||
|
||||
## Integration Steps
|
||||
|
||||
### Step 1: Initialize Services in Main App
|
||||
|
||||
Add to your `main.dart` or `main_widget.dart`:
|
||||
|
||||
```dart
|
||||
import 'package:xtremflow/core/services/network_service.dart';
|
||||
import 'package:xtremflow/core/services/cache_service.dart';
|
||||
import 'package:xtremflow/core/services/streaming_optimizer.dart';
|
||||
import 'package:xtremflow/core/config/optimization_config.dart';
|
||||
|
||||
void main() {
|
||||
// Calibrate optimization for this device
|
||||
RuntimeOptimizations.calibrateForDevice();
|
||||
|
||||
// Print config summary for debugging
|
||||
OptimizationConfig.printSummary();
|
||||
|
||||
runApp(const MyApp());
|
||||
}
|
||||
```
|
||||
|
||||
### Step 2: Use Adaptive Bitrate in Player
|
||||
|
||||
In your video player screen:
|
||||
|
||||
```dart
|
||||
final qualitySelector = ref.watch(qualitySelectorProvider);
|
||||
|
||||
// Manually change quality
|
||||
qualitySelector.setQuality(QualityLevel.hd720);
|
||||
|
||||
// Enable auto quality
|
||||
qualitySelector.autoQuality = true;
|
||||
```
|
||||
|
||||
### Step 3: Add Recommendation Widgets
|
||||
|
||||
In your home/dashboard screen:
|
||||
|
||||
```dart
|
||||
import 'package:xtremflow/features/iptv/widgets/continue_watching_widget.dart';
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Column(
|
||||
children: [
|
||||
ContinueWatchingWidget(), // Auto-loads from recommendations
|
||||
SizedBox(height: 20),
|
||||
TrendingWidget(),
|
||||
SizedBox(height: 20),
|
||||
RecentlyAddedWidget(),
|
||||
],
|
||||
);
|
||||
}
|
||||
```
|
||||
|
||||
### Step 4: Display EPG Grid
|
||||
|
||||
In a dedicated tab or screen:
|
||||
|
||||
```dart
|
||||
import 'package:xtremflow/features/iptv/screens/epg_grid_screen.dart';
|
||||
|
||||
// Use as full-screen widget
|
||||
EpgGridScreen()
|
||||
|
||||
// Or in a tab
|
||||
DefaultTabController(
|
||||
length: 3,
|
||||
child: Scaffold(
|
||||
body: TabBarView(
|
||||
children: [
|
||||
DashboardScreen(),
|
||||
EpgGridScreen(),
|
||||
PlaylistsScreen(),
|
||||
],
|
||||
),
|
||||
),
|
||||
)
|
||||
```
|
||||
|
||||
### Step 5: Add Quality Selector Widget
|
||||
|
||||
In your player overlay:
|
||||
|
||||
```dart
|
||||
import 'package:xtremflow/features/iptv/widgets/quality_selector_widget.dart';
|
||||
|
||||
// Show quality selector dialog
|
||||
QualitySelectorWidget.show(context);
|
||||
|
||||
// Or use as persistent indicator
|
||||
QualityIndicator() // Shows current quality badge
|
||||
```
|
||||
|
||||
## Testing & Validation
|
||||
|
||||
### Unit Tests to Run
|
||||
|
||||
```bash
|
||||
# Test cache service
|
||||
flutter test test/services/cache_service_test.dart
|
||||
|
||||
# Test network service
|
||||
flutter test test/services/network_service_test.dart
|
||||
|
||||
# Test recommendations
|
||||
flutter test test/providers/recommendations_provider_test.dart
|
||||
```
|
||||
|
||||
### Integration Tests
|
||||
|
||||
```bash
|
||||
# Test on web
|
||||
flutter run -d chrome
|
||||
|
||||
# Test on device
|
||||
flutter run
|
||||
|
||||
# Test build
|
||||
flutter build web --web-renderer canvaskit
|
||||
```
|
||||
|
||||
### Performance Verification
|
||||
|
||||
1. **Memory Usage:**
|
||||
- Check before: Use DevTools → Memory tab
|
||||
- Load 50+ items in recommendation widgets
|
||||
- Check after: Should remain under 100MB
|
||||
|
||||
2. **Network Efficiency:**
|
||||
- Monitor: DevTools → Network tab
|
||||
- Load streams multiple times
|
||||
- Verify: Cache hits increase (200% -> 400%)
|
||||
|
||||
3. **Quality Switching:**
|
||||
- Test on various networks (simulate with DevTools)
|
||||
- Quality should auto-adjust within 2-3 seconds
|
||||
- No stuttering during transition
|
||||
|
||||
4. **Download Manager:**
|
||||
- Try downloading 3+ files simultaneously
|
||||
- Pause/Resume operations
|
||||
- Verify: Max 3 concurrent, queue works
|
||||
|
||||
## Deployment to Production
|
||||
|
||||
### Pre-Production Checklist
|
||||
|
||||
- [ ] All new files exist and compile
|
||||
- [ ] Dependencies installed successfully
|
||||
- [ ] Code follows Flutter best practices
|
||||
- [ ] No console errors or warnings
|
||||
- [ ] Performance tests passed
|
||||
- [ ] Device calibration runs successfully
|
||||
- [ ] All widgets display correctly
|
||||
- [ ] Network operations use configured timeout
|
||||
|
||||
### Production Deployment Steps
|
||||
|
||||
1. **Version Bump:**
|
||||
```yaml
|
||||
# In pubspec.yaml
|
||||
version: 1.1.0+11 # was 1.0.0+10
|
||||
```
|
||||
|
||||
2. **Generate Build:**
|
||||
```bash
|
||||
# For web
|
||||
flutter build web --release
|
||||
|
||||
# For desktop
|
||||
flutter build windows --release
|
||||
```
|
||||
|
||||
3. **Deploy:**
|
||||
- Upload to server/CDN
|
||||
- Update index.html manifest if needed
|
||||
- Verify in production environment
|
||||
|
||||
4. **Monitor:**
|
||||
- Track streaming metrics
|
||||
- Monitor for network errors
|
||||
- Collect performance data
|
||||
|
||||
## Rollback Plan (If Needed)
|
||||
|
||||
If issues arise:
|
||||
|
||||
1. **Revert pubspec.yaml** to previous version
|
||||
2. **Remove new service files** (6 files)
|
||||
3. **Run:** `flutter pub get && flutter clean && flutter pub get`
|
||||
4. **Rebuild:** `flutter build web --release`
|
||||
|
||||
The app is designed to be modular, so removals don't break existing code.
|
||||
|
||||
## Configuration Tweaks
|
||||
|
||||
### For Low-End Devices
|
||||
|
||||
```dart
|
||||
RuntimeOptimizations.setDeviceProfile(DeviceProfile.lowMemory);
|
||||
OptimizationConfig.enableAdaptiveBitrate = false; // Use fixed quality instead
|
||||
OptimizationConfig.maxMemoryCacheMb = 50; // Reduce cache
|
||||
```
|
||||
|
||||
### For High-End Devices
|
||||
|
||||
```dart
|
||||
RuntimeOptimizations.setDeviceProfile(DeviceProfile.highPerformance);
|
||||
OptimizationConfig.maxMemoryCacheMb = 200;
|
||||
OptimizationConfig.maxImageCacheMb = 100;
|
||||
OptimizationConfig.defaultQuality = QualityLevel.hd1080;
|
||||
```
|
||||
|
||||
### For Streaming Servers
|
||||
|
||||
```dart
|
||||
OptimizationConfig.connectionTimeout = Duration(seconds: 15);
|
||||
OptimizationConfig.maxRetryAttempts = 5;
|
||||
OptimizationConfig.enableProxySupport = true;
|
||||
```
|
||||
|
||||
## Documentation References
|
||||
|
||||
| Document | Purpose |
|
||||
|----------|---------|
|
||||
| **COMPLETION_REPORT.md** | Full architecture & features |
|
||||
| **INTEGRATION_GUIDE.md** | Code examples & patterns |
|
||||
| **QUICK_REFERENCE.md** | One-page feature summary |
|
||||
| **OPTIMIZATIONS_COMPLETED.md** | Performance metrics |
|
||||
| **CHANGELOG.md** | What changed in v1.1 |
|
||||
|
||||
## Support & Troubleshooting
|
||||
|
||||
### Common Issues
|
||||
|
||||
**❌ Problem:** "Package not found" error
|
||||
```
|
||||
✅ Solution: flutter pub get
|
||||
```
|
||||
|
||||
**❌ Problem:** Quality selector doesn't show options
|
||||
```
|
||||
✅ Solution: Ensure QualitySelector is initialized in provider
|
||||
ref.watch(qualitySelectorProvider)
|
||||
```
|
||||
|
||||
**❌ Problem:** Recommendations show no items
|
||||
```
|
||||
✅ Solution: Verify watch history exists
|
||||
watchHistoryProvider must have data
|
||||
```
|
||||
|
||||
**❌ Problem:** EPG grid loads slow
|
||||
```
|
||||
✅ Solution: Implement lazy loading with PageView
|
||||
Load only visible days, not all 7 at once
|
||||
```
|
||||
|
||||
**❌ Problem:** Memory usage too high
|
||||
```
|
||||
✅ Solution: Call cacheServiceProvider.clearCache()
|
||||
Adjust OptimizationConfig.maxMemoryCacheMb
|
||||
```
|
||||
|
||||
## Go-Live Checklist
|
||||
|
||||
- [ ] All files compiled successfully
|
||||
- [ ] No console errors
|
||||
- [ ] Performance meets targets (4x improvement verified)
|
||||
- [ ] Network resilience tested (retry works)
|
||||
- [ ] All widgets integrated into UI
|
||||
- [ ] Configuration reviewed and approved
|
||||
- [ ] Rollback plan documented
|
||||
- [ ] Team trained on new features
|
||||
- [ ] Monitoring/logging configured
|
||||
- [ ] Version number bumped
|
||||
- [ ] CHANGELOG updated
|
||||
- [ ] Ready for release ✅
|
||||
|
||||
## Post-Deployment Monitoring
|
||||
|
||||
Monitor these metrics daily:
|
||||
|
||||
```
|
||||
1. Stream startup time (target: 1-2 seconds)
|
||||
2. Rebuffering frequency (target: <5% of sessions)
|
||||
3. App memory usage (target: <150MB)
|
||||
4. Network errors (target: <1%)
|
||||
5. Quality selection frequency (track auto vs manual)
|
||||
6. Download success rate (target: >99%)
|
||||
7. Cache hit rate (target: >70%)
|
||||
8. User engagement (continue watching click rate)
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
**Status:** ✅ Ready for Deployment
|
||||
**Version:** 1.1 Optimized
|
||||
**Date:** March 26, 2026
|
||||
|
||||
🎉 Your XtremFlow app is now at Tivimate-level quality! 🎉
|
||||
@@ -0,0 +1,12 @@
|
||||
# Archives — documents historiques
|
||||
|
||||
⚠️ **Les documents de ce dossier sont historiques et ne décrivent pas l'état actuel du code.**
|
||||
|
||||
Ils datent de phases de conception ou de refontes antérieures. Plusieurs se déclarent « COMPLETE » ou « production-ready » alors que le travail décrit n'a jamais été intégré (ou a été remplacé depuis) :
|
||||
|
||||
- `RECORDING_SYSTEM_UPGRADE.txt` — décrit un remplacement du scheduler par `SimpleRecorder` qui n'a jamais été branché ; le système réel est `bin/services/recording_scheduler.dart`.
|
||||
- `THEME_REDESIGN_SUMMARY.md` — la « Phase 4: Integration » n'a pas eu lieu ; les widgets qu'il liste n'existent plus.
|
||||
- `ANALYSIS_AND_IMPROVEMENTS.md` — plan d'améliorations dont une partie seulement a été réalisée.
|
||||
- `DEPLOYMENT_CHECKLIST.md` — référence des fichiers et versions de dépendances qui n'ont jamais existé dans le dépôt.
|
||||
|
||||
Pour l'état actuel du projet, se référer au `README.md` racine et au `CHANGELOG.md`.
|
||||
Reference in new issue
Block a user