a89c7894cf
Backend: - FastAPI avec PostgreSQL et Redis - Authentification JWT complète - API REST pour musique, playlists, recherche - Streaming audio via yt-dlp - SQLAlchemy 2.0 async Frontend: - Flutter avec thème néon cyberpunk - State management Riverpod - Layout adaptatif desktop/mobile - Lecteur audio avec mini-player Infrastructure: - Docker Compose (PostgreSQL + Redis) - Scripts d'installation automatisés - Scripts de build pour exécutables Fichiers ajoutés: - BUILD_CLIENT_*.bat/sh: Scripts de compilation - BUILD_CLIENT_README.md: Documentation compilation - CHECK_FLUTTER.sh: Vérificateur d'environnement - requirements.txt mis à jour pour Python 3.13 - Modèles SQLAlchemy corrigés (metadata -> extra_metadata) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
206 lines
4.3 KiB
Markdown
206 lines
4.3 KiB
Markdown
# 🚀 INSTALLATION RAPIDE - SPOTIFY LE 2
|
|
|
|
> **Installation automatisée en 2 minutes !**
|
|
|
|
---
|
|
|
|
## ⚡ Installation Clé en Main
|
|
|
|
### 🪟 Windows
|
|
|
|
**Double-cliquez sur:** `INSTALL_WINDOWS.bat`
|
|
|
|
**Ou manuellement:**
|
|
```cmd
|
|
1. Télécharger Docker Desktop: https://www.docker.com/products/docker-desktop/
|
|
2. Lancer: INSTALL_WINDOWS.bat
|
|
3. Patienter...
|
|
4. Lancer: START_WINDOWS.bat
|
|
```
|
|
|
|
### 🐧 Linux / 🍎 macOS
|
|
|
|
```bash
|
|
# Lancer l'installateur
|
|
chmod +x INSTALL.sh START.sh
|
|
./INSTALL.sh
|
|
|
|
# Démarrer l'app
|
|
./START.sh
|
|
```
|
|
|
|
---
|
|
|
|
## ✅ Prérequis
|
|
|
|
### Obligatoires
|
|
- **Docker Desktop** - Pour PostgreSQL + Redis
|
|
- **Python 3.11+** - Pour le backend
|
|
- **Git** - Pour le versioning
|
|
- **Flutter 3.2+** - Pour le frontend
|
|
|
|
### Installation des prérequis
|
|
|
|
**Windows:**
|
|
1. Python: https://www.python.org/downloads/ (cocher "Add to PATH")
|
|
2. Git: https://git-scm.com/download/win
|
|
3. Docker: https://www.docker.com/products/docker-desktop/
|
|
4. Flutter: https://docs.flutter.dev/get-started/install/windows
|
|
|
|
**Linux:**
|
|
```bash
|
|
# Ubuntu/Debian
|
|
sudo apt update
|
|
sudo apt install -y python3 python3-pip python3-venv git docker.io docker-compose
|
|
# Flutter: voir https://docs.flutter.dev/get-started/install/linux
|
|
```
|
|
|
|
**macOS:**
|
|
```bash
|
|
# Avec Homebrew
|
|
brew install python3 git docker docker-compose
|
|
# Flutter: voir https://docs.flutter.dev/get-started/install/macos
|
|
```
|
|
|
|
---
|
|
|
|
## 🎯 Après Installation
|
|
|
|
### Lancement Automatique
|
|
|
|
**Windows:** `START_WINDOWS.bat`
|
|
**Linux/Mac:** `./START.sh`
|
|
|
|
### Lancement Manuel
|
|
|
|
**Terminal 1 - Backend:**
|
|
```bash
|
|
cd backend
|
|
venv\Scripts\activate # Windows
|
|
# source venv/bin/activate # Linux/Mac
|
|
uvicorn app.main:app --reload
|
|
```
|
|
|
|
**Terminal 2 - Frontend:**
|
|
```bash
|
|
cd frontend
|
|
flutter run -d windows # Windows Desktop
|
|
flutter run -d android # Android
|
|
```
|
|
|
|
---
|
|
|
|
## 🔧 Configuration
|
|
|
|
### Backend (`backend/.env`)
|
|
|
|
```env
|
|
# Application
|
|
DEBUG=true
|
|
SECRET_KEY=change-ce-dans-.env-!!!
|
|
|
|
# Database (géré par Docker)
|
|
POSTGRES_HOST=localhost
|
|
POSTGRES_PORT=5432
|
|
POSTGRES_USER=spotify
|
|
POSTGRES_PASSWORD=spotify_password
|
|
POSTGRES_DB=spotify_le_2
|
|
|
|
# Redis (géré par Docker)
|
|
REDIS_HOST=localhost
|
|
REDIS_PORT=6379
|
|
```
|
|
|
|
### Frontend
|
|
|
|
L'URL de l'API est déjà configurée dans `frontend/lib/core/constants/api_constants.dart`:
|
|
```dart
|
|
const String baseUrl = 'http://localhost:8000/api/v1';
|
|
```
|
|
|
|
---
|
|
|
|
## 🎮 Utilisation
|
|
|
|
### Première Utilisation
|
|
|
|
1. **Lancer l'application** → Page de connexion
|
|
2. **Créer un compte** → Email + Password
|
|
3. **Se connecter** → Page d'accueil
|
|
4. **Rechercher** → Tape "Daft Punk" ou autre
|
|
5. **Écouter** → Tape un track pour le jouer !
|
|
|
|
### Fonctionnalités
|
|
|
|
- ✅ **Recherche** multi-source (DB + YouTube)
|
|
- ✅ **Streaming** audio avec HTTP Range
|
|
- ✅ **Playlists** complètes (CRUD, drag & drop)
|
|
- ✅ **Queue** de lecture
|
|
- ✅ **Library** (Playlists, Albums, Artists)
|
|
- ✅ **Mini Player** avec contrôles
|
|
- ✅ **Settings** (Profile, Audio Quality)
|
|
|
|
---
|
|
|
|
## 🐛 Problèmes Courants
|
|
|
|
### "Python n'est pas installé"
|
|
→ Téléchargez Python 3.11+ sur python.org
|
|
|
|
### "Docker ne démarre pas"
|
|
→ Vérifiez que Docker Desktop est lancé
|
|
|
|
### "Flutter command not found"
|
|
→ Ajoutez Flutter au PATH:
|
|
- **Windows:** `%LOCALAPPDATA%\Flutter\bin`
|
|
- **Linux/Mac:** `export PATH="$PATH:`pwd`/flutter/bin"`
|
|
|
|
### "Le backend ne répond pas"
|
|
→ Vérifiez que `uvicorn app.main:app --reload` tourne dans le terminal backend
|
|
|
|
### "Port 8000 déjà utilisé"
|
|
→ Changez le port dans le backend: `uvicorn app.main:app --port 8001`
|
|
|
|
---
|
|
|
|
## 📱 Plateformes Supportées
|
|
|
|
- ✅ **Windows 10/11** - Desktop app
|
|
- ✅ **Linux** - Desktop app
|
|
- ✅ **macOS** - Desktop app
|
|
- ✅ **Android** - Mobile app (6.0+)
|
|
|
|
---
|
|
|
|
## 🔗 Liens Utiles
|
|
|
|
- **Backend API:** http://localhost:8000/docs (Swagger UI)
|
|
- **Frontend:** Lancé automatiquement par Flutter
|
|
- **Docker:** http://localhost:8000 (Backend API)
|
|
|
|
---
|
|
|
|
## 🎨 Thème Néon Cyberpunk
|
|
|
|
L'application utilise un thème unique avec:
|
|
- **Cyan** (#00F0FF) - Accents primaires
|
|
- **Violet** (#BF00FF) - Accents secondaires
|
|
- **Rose** (#FF006E) - Accents tertiaires
|
|
- **Glow effects** - Effets de lueur néon
|
|
|
|
---
|
|
|
|
## 📚 Documentation Complète
|
|
|
|
Voir `README.md` pour la documentation détaillée du projet.
|
|
|
|
---
|
|
|
|
**Questions? Problèmes?**
|
|
|
|
1. Vérifiez les logs dans les terminaux
|
|
2. Consultez `docs/` pour plus d'infos
|
|
3. Vérifiez que Docker Desktop tourne
|
|
|
|
**Bon usage ! 🎵**
|