Files
AudiOhm/INSTALL.sh
T
root a89c7894cf Initial commit: AudiOhm - Alternative Spotify avec streaming YouTube
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>
2026-01-18 20:08:36 +00:00

91 lines
2.4 KiB
Bash

#!/bin/bash
echo "========================================"
echo " SPOTIFY LE 2 - INSTALLATION AUTO"
echo "========================================"
echo ""
# Fonction pour vérifier les commandes
check_command() {
if ! command -v $1 &> /dev/null; then
echo "[ERREUR] $1 n'est pas installé!"
return 1
fi
return 0
}
# Vérifications
echo "[1/6] Vérification des prérequis..."
check_command python3 || exit 1
check_command git || exit 1
check_command docker || exit 1
check_command docker-compose || exit 1
echo "[OK] Tous les prérequis sont installés!"
echo ""
echo "[2/6] Démarrage de l'infrastructure (PostgreSQL + Redis)..."
cd docker
docker-compose up -d
if [ $? -ne 0 ]; then
echo "[ERREUR] Erreur lors du démarrage de Docker."
exit 1
fi
echo "[OK] Infrastructure démarrée!"
echo ""
echo "[3/6] Installation des dépendances Backend..."
cd ../backend
# Créer venv si n'existe pas
if [ ! -d "venv" ]; then
echo "Création de l'environnement virtuel Python..."
python3 -m venv venv
fi
# Activer venv et installer
source venv/bin/activate
echo "Installation des packages Python..."
pip install --upgrade pip -q
pip install -r requirements.txt -q
echo "[OK] Backend prêt!"
echo ""
echo "[4/6] Configuration du Backend..."
if [ ! -f ".env" ]; then
echo "Création du fichier .env..."
cp .env.example .env
echo "[ATTENTION] Éditez backend/.env et changez SECRET_KEY!"
fi
echo "[OK] Backend configuré!"
echo ""
echo "[5/6] Initialisation de la base de données..."
echo "Création des tables..."
python -c "from app.core.database import init_db; import asyncio; asyncio.run(init_db())"
echo "[OK] Base de données prête!"
echo ""
echo "[6/6] Installation des dépendances Frontend..."
cd ../frontend
echo "Installation des packages Flutter..."
flutter pub get -q
if [ $? -ne 0 ]; then
echo "[ERREUR] Erreur lors de flutter pub get."
echo "Vérifiez que Flutter est bien installé: https://docs.flutter.dev/get-started/install"
exit 1
fi
echo "[OK] Frontend prêt!"
echo ""
echo "========================================"
echo " INSTALLATION TERMINÉE !"
echo "========================================"
echo ""
echo "Pour démarrer l'application:"
echo " ./START.sh"
echo ""
echo "Ou manuellement:"
echo " Terminal 1 (Backend): cd backend && source venv/bin/activate && uvicorn app.main:app --reload"
echo " Terminal 2 (Frontend): cd frontend && flutter run"
echo ""