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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# 🔗 Liens Importants - ENISE Appwrite Deployment
|
| 2 |
+
|
| 3 |
+
## 🌐 Accès Direct
|
| 4 |
+
|
| 5 |
+
### HF Spaces
|
| 6 |
+
- **Space URL:** https://huggingface.co/spaces/ktongue/ENISE
|
| 7 |
+
- **Application:** https://ktongue-enise.hf.space
|
| 8 |
+
|
| 9 |
+
### GitHub
|
| 10 |
+
- **Repository:** https://github.com/tiffank1802/enise-site-2
|
| 11 |
+
- **Derniers commits:** https://github.com/tiffank1802/enise-site-2/commits/main
|
| 12 |
+
|
| 13 |
+
### Appwrite
|
| 14 |
+
- **Console:** https://console.appwrite.io
|
| 15 |
+
- **Project ID:** 697abaca00272dab718b
|
| 16 |
+
- **Endpoint:** https://fra.cloud.appwrite.io/v1
|
| 17 |
+
|
| 18 |
+
---
|
| 19 |
+
|
| 20 |
+
## 📚 Documentation
|
| 21 |
+
|
| 22 |
+
### Pour Commencer
|
| 23 |
+
1. **LIRE EN PREMIER:** `HF_SPACES_DEPLOYMENT.md` - Guide de déploiement HF Spaces
|
| 24 |
+
2. **Documentation Technique:** `APPWRITE_INTEGRATION.md` - Architecture complète
|
| 25 |
+
3. **Référence Rapide:** `APPWRITE_QUICK_REFERENCE.md` - Patterns et schemas
|
| 26 |
+
|
| 27 |
+
### Vérification
|
| 28 |
+
- `DEPLOYMENT_CHECKLIST_APPWRITE.md` - Checklist pré-déploiement
|
| 29 |
+
- `test_appwrite_crud.py` - Tests unitaires
|
| 30 |
+
|
| 31 |
+
---
|
| 32 |
+
|
| 33 |
+
## 🚀 Étapes de Déploiement
|
| 34 |
+
|
| 35 |
+
### 1. Push Code (✅ DÉJÀ FAIT)
|
| 36 |
+
```bash
|
| 37 |
+
# 6 commits créés et poussés vers main
|
| 38 |
+
git log --oneline -6
|
| 39 |
+
```
|
| 40 |
+
|
| 41 |
+
### 2. Redémarrer HF Spaces (À FAIRE)
|
| 42 |
+
1. Aller à: https://huggingface.co/spaces/ktongue/ENISE
|
| 43 |
+
2. Settings → Restart
|
| 44 |
+
3. Attendre 3-5 minutes
|
| 45 |
+
|
| 46 |
+
### 3. Vérifier (À FAIRE)
|
| 47 |
+
- Visiter https://ktongue-enise.hf.space
|
| 48 |
+
- Vérifier les données s'affichent
|
| 49 |
+
- Consulter les logs HF Spaces
|
| 50 |
+
|
| 51 |
+
---
|
| 52 |
+
|
| 53 |
+
## 🔑 Variables d'Environnement
|
| 54 |
+
|
| 55 |
+
### À Vérifier dans HF Spaces Secrets
|
| 56 |
+
```
|
| 57 |
+
APPWRITE_ENDPOINT=https://fra.cloud.appwrite.io/v1
|
| 58 |
+
APPWRITE_PROJECT_ID=697abaca00272dab718b
|
| 59 |
+
APPWRITE_API_KEY=<DOIT ÊTRE DÉFINI>
|
| 60 |
+
APPWRITE_DATABASE_ID=697cd79900149b10540c
|
| 61 |
+
DEBUG=False
|
| 62 |
+
SECRET_KEY=<DOIT ÊTRE DÉFINI>
|
| 63 |
+
```
|
| 64 |
+
|
| 65 |
+
### Vérification Locale
|
| 66 |
+
```bash
|
| 67 |
+
python manage.py shell
|
| 68 |
+
from enise_site.appwrite_db import get_appwrite_db
|
| 69 |
+
db = get_appwrite_db()
|
| 70 |
+
db.test_connection() # Devrait retourner True
|
| 71 |
+
```
|
| 72 |
+
|
| 73 |
+
---
|
| 74 |
+
|
| 75 |
+
## 📊 Architecture
|
| 76 |
+
|
| 77 |
+
### Services Django
|
| 78 |
+
- `SpecialiteService` - Gestion des spécialités
|
| 79 |
+
- `ActualiteService` - Gestion des actualités
|
| 80 |
+
- `ContactService` - Gestion des contacts
|
| 81 |
+
- `PartenairesService` - Gestion des partenaires
|
| 82 |
+
- `StatistiqueService` - Gestion des statistiques
|
| 83 |
+
|
| 84 |
+
### Collections Appwrite
|
| 85 |
+
- `specialites` - 3 documents
|
| 86 |
+
- `actualites` - 3 documents
|
| 87 |
+
- `contact` - Documents dynamiques
|
| 88 |
+
- `partenaires` - 3 documents
|
| 89 |
+
- `statistiques` - 3 documents
|
| 90 |
+
|
| 91 |
+
---
|
| 92 |
+
|
| 93 |
+
## 🧪 Tester Localement
|
| 94 |
+
|
| 95 |
+
```bash
|
| 96 |
+
# Lancer les tests
|
| 97 |
+
python test_appwrite_crud.py
|
| 98 |
+
|
| 99 |
+
# Vérifier les services
|
| 100 |
+
python manage.py shell
|
| 101 |
+
from app_core.services import SpecialiteService
|
| 102 |
+
service = SpecialiteService()
|
| 103 |
+
specs = service.list_all()
|
| 104 |
+
print(len(specs)) # Devrait afficher 3
|
| 105 |
+
|
| 106 |
+
# Démarrer le serveur
|
| 107 |
+
python manage.py runserver 0.0.0.0:8000
|
| 108 |
+
# Visiter http://localhost:8000/
|
| 109 |
+
```
|
| 110 |
+
|
| 111 |
+
---
|
| 112 |
+
|
| 113 |
+
## 📝 Fichiers Créés/Modifiés
|
| 114 |
+
|
| 115 |
+
### Créés (7 fichiers)
|
| 116 |
+
- ✅ `enise_site/appwrite_db.py` - Wrapper Appwrite
|
| 117 |
+
- ✅ `app_core/services.py` - Services métier
|
| 118 |
+
- ✅ `app_core/management/commands/setup_appwrite_collections.py`
|
| 119 |
+
- ✅ `app_core/management/commands/seed_appwrite.py`
|
| 120 |
+
- ✅ `test_appwrite_crud.py` - Tests
|
| 121 |
+
- ✅ Documentation (4 fichiers)
|
| 122 |
+
|
| 123 |
+
### Modifiés (2 fichiers)
|
| 124 |
+
- ✅ `app_core/views.py` - Utilise services
|
| 125 |
+
- ✅ `run.sh` - 6 étapes
|
| 126 |
+
|
| 127 |
+
---
|
| 128 |
+
|
| 129 |
+
## 🚨 En Cas de Problème
|
| 130 |
+
|
| 131 |
+
### Les données ne s'affichent pas
|
| 132 |
+
1. Vérifier APPWRITE_API_KEY dans HF Secrets
|
| 133 |
+
2. Consulter la console Appwrite
|
| 134 |
+
3. Vérifier les logs HF Spaces
|
| 135 |
+
|
| 136 |
+
### Erreurs de déploiement
|
| 137 |
+
1. Lire les logs HF Spaces
|
| 138 |
+
2. Consulter `DEPLOYMENT_CHECKLIST_APPWRITE.md`
|
| 139 |
+
3. Rollback si nécessaire: `git revert HEAD~5`
|
| 140 |
+
|
| 141 |
+
### Tester la connexion Appwrite
|
| 142 |
+
```bash
|
| 143 |
+
python manage.py shell
|
| 144 |
+
from enise_site.appwrite_db import get_appwrite_db
|
| 145 |
+
db = get_appwrite_db()
|
| 146 |
+
print("Connection:", db.test_connection())
|
| 147 |
+
print("Collections:", db.databases.list_collections(database_id=db.database_id))
|
| 148 |
+
```
|
| 149 |
+
|
| 150 |
+
---
|
| 151 |
+
|
| 152 |
+
## ✅ Checklist Finale
|
| 153 |
+
|
| 154 |
+
- [x] Code poussé sur GitHub
|
| 155 |
+
- [x] Tests locaux 8/8 passants
|
| 156 |
+
- [x] Documentation complète
|
| 157 |
+
- [x] Variables d'environnement vérifiées
|
| 158 |
+
- [x] Données sémées dans Appwrite
|
| 159 |
+
- [ ] HF Spaces redémarré
|
| 160 |
+
- [ ] Application testée en production
|
| 161 |
+
- [ ] Logs vérifiés
|
| 162 |
+
|
| 163 |
+
---
|
| 164 |
+
|
| 165 |
+
## 📞 Contact & Support
|
| 166 |
+
|
| 167 |
+
- **GitHub:** https://github.com/tiffank1802/enise-site-2
|
| 168 |
+
- **Appwrite Docs:** https://appwrite.io/docs
|
| 169 |
+
- **Appwrite Console:** https://console.appwrite.io
|
| 170 |
+
|
| 171 |
+
---
|
| 172 |
+
|
| 173 |
+
**Status:** 🚀 Prêt pour HF Spaces
|
| 174 |
+
**Date:** 30 janvier 2026
|
| 175 |
+
**Version:** 1.0
|