Initial commit: existing turf_saas codebase

Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
ML Engineer
2026-04-25 17:18:43 +02:00
commit ed07c8a3d1
137 changed files with 36398 additions and 0 deletions

282
ARCHITECTURE_SERVICES.html Executable file
View File

@@ -0,0 +1,282 @@
<!DOCTYPE html>
<html lang="fr">
<head>
<meta charset="UTF-8">
<title>Architecture Services H3R7</title>
<style>
@media print {
body { font-size: 12pt; }
.page-break { page-break-before: always; }
}
body { font-family: Arial, sans-serif; margin: 40px; line-height: 1.6; }
h1 { color: #2c3e50; border-bottom: 3px solid #3498db; padding-bottom: 10px; }
h2 { color: #2980b9; margin-top: 30px; }
h3 { color: #16a085; }
table { width: 100%; border-collapse: collapse; margin: 20px 0; }
th, td { border: 1px solid #ddd; padding: 12px; text-align: left; }
th { background: #3498db; color: white; }
tr:nth-child(even) { background: #f9f9f9; }
.service-box { background: #ecf0f1; padding: 15px; margin: 10px 0; border-radius: 8px; border-left: 4px solid #3498db; }
.port { background: #e74c3c; color: white; padding: 2px 8px; border-radius: 4px; font-size: 11px; }
.url { background: #27ae60; color: white; padding: 2px 8px; border-radius: 4px; font-size: 11px; }
pre { background: #2c3e50; color: #ecf0f1; padding: 15px; border-radius: 8px; overflow-x: auto; }
.home-btn{position:fixed;top:10px;left:10px;z-index:9999;background:linear-gradient(135deg,#00d9ff,#7b2cbf);color:#fff;border:none;border-radius:8px;padding:10px 15px;font-size:14px;cursor:pointer;text-decoration:none;display:flex;align-items:center;gap:8px;box-shadow:0 2px 10px rgba(0,217,255,0.3);transition:all 0.3s;font-family:-apple-system,BlinkMacSystemFont,sans-serif}.home-btn:hover{transform:translateY(-2px);box-shadow:0 4px 15px rgba(0,217,255,0.5)}
</style>
</head>
<div style="text-align:center;padding:15px;background:#1a1a2e;">
<img src="H3R7Tech_logo.png" alt="H3R7Tech" style="width:120px;border-radius:10px;">
</div>
<body>
<a href="https://portal-kolifee.duckdns.org/" class="home-btn" title="Retour au portail"><span style="font-size:18px">🏠</span><span>Accueil</span></a>
<h1>🏗️ Architecture des Services H3R7</h1>
<h2>📋 Vue d'Ensemble des Services</h2>
<table>
<tr>
<th>Service</th>
<th>URL</th>
<th>Port</th>
<th>Description</th>
</tr>
<tr>
<td><strong>Portail Central</strong></td>
<td><span class="url">/</span></td>
<td><span class="port">8768</span></td>
<td>Point d'entrée unique</td>
</tr>
<tr>
<td>Turf Dashboard</td>
<td><span class="url">/turf/</span></td>
<td><span class="port">8765</span></td>
<td>Prédictions hippiques</td>
</tr>
<tr>
<td>Boîte à Idées</td>
<td><span class="url">/turf/idees/</span></td>
<td><span class="port">8765</span></td>
<td>Gestion idées business</td>
</tr>
<tr>
<td>Admin Menu</td>
<td><span class="url">http://178.18.250.53:8766/</span></td>
<td><span class="port">8766</span></td>
<td>Gestion menu restaurant</td>
</tr>
<tr>
<td>Réservation Client</td>
<td><span class="url">http://178.18.250.53:8767/</span></td>
<td><span class="port">8767</span></td>
<td>Réservation tables</td>
</tr>
<tr>
<td>Manager Tables</td>
<td><span class="url">http://178.18.250.53:9090/manager.html</span></td>
<td><span class="port">9090</span></td>
<td>Gestion tables (admin)</td>
</tr>
<tr>
<td>Templates Site</td>
<td><span class="url">http://178.18.250.53:9090/</span></td>
<td><span class="port">9090</span></td>
<td>Templates professionnels</td>
</tr>
</table>
<h2>🏇 TURF - Prédictions Hippiques</h2>
<div class="service-box">
<h3>Dashboard (Port 8765)</h3>
<p><strong>URL:</strong> /turf/</p>
<p><strong>Fonctionnalités:</strong></p>
<ul>
<li>📊 Vue d'ensemble des courses du jour</li>
<li>🏇 Liste des favoris par course</li>
<li>📈 Cotes en temps réel (PMU, ZEturf, Genybet)</li>
<li>🔄 Scraping automatique multi-sources</li>
<li>💾 Sauvegarde en base SQLite</li>
</ul>
</div>
<div class="service-box">
<h3>API Turf</h3>
<p><strong>Endpoints:</strong></p>
<ul>
<li><code>GET /api/today</code> → Courses du jour</li>
<li><code>GET /api</code> → Toutes les données</li>
</ul>
</div>
<h2>💡 BOÎTE À IDÉES</h2>
<div class="service-box">
<h3>Interface (Port 8765)</h3>
<p><strong>URL:</strong> /turf/idees/</p>
<p><strong>Fonctionnalités:</strong></p>
<ul>
<li> Ajouter une idée</li>
<li>✏️ Modifier une idée</li>
<li>🗑️ Supprimer une idée</li>
<li>🔍 Filtrer par catégorie</li>
<li>📊 Indicateur de potentiel</li>
</ul>
</div>
<div class="service-box">
<h3>API Ideas</h3>
<ul>
<li><code>GET /api/ideas</code> → Liste toutes les idées</li>
<li><code>GET /api/ideas/&lt;id&gt;</code> → Récupère une idée</li>
<li><code>POST /api/ideas</code> → Crée une idée</li>
<li><code>PUT /api/ideas/&lt;id&gt;</code> → Met à jour</li>
<li><code>DELETE /api/ideas/&lt;id&gt;</code> → Supprime</li>
</ul>
<p><strong>Auth:</strong> admin:turf2026</p>
</div>
<h2>🍽️ TEMPLATES RESTAURANT</h2>
<table>
<tr>
<th>Template</th>
<th>URL</th>
</tr>
<tr>
<td>Page d'accueil</td>
<td><span class="url">http://178.18.250.53:9090/</span></td>
</tr>
<tr>
<td>Restaurant JSON</td>
<td><span class="url">http://178.18.250.53:9090/template_restaurant_json.html</span></td>
</tr>
<tr>
<td>Boulangerie</td>
<td><span class="url">http://178.18.250.53:9090/template_boulangerie_final.html</span></td>
</tr>
<tr>
<td>Artisan</td>
<td><span class="url">http://178.18.250.53:9090/template_artisan_final.html</span></td>
</tr>
</table>
<h2>📅 SYSTÈME DE RÉSERVATIONS</h2>
<div class="service-box">
<h3>Interface Client (Port 8767)</h3>
<p><strong>URL:</strong> http://178.18.250.53:8767/</p>
<ul>
<li>📅 Sélection date</li>
<li>👥 Nombre de personnes</li>
<li>🕐 Choix du créneau</li>
<li>✅ Confirmation instantanée</li>
</ul>
</div>
<div class="service-box">
<h3>Interface Manager (Port 9090)</h3>
<p><strong>URL:</strong> http://178.18.250.53:9090/manager.html</p>
<ul>
<li>🖥️ Tableau de bord tables</li>
<li>🟢/🔴 Indicateurs Libre/Occupée</li>
<li>👤 Info client</li>
<li>/✅ Réserver/Libérer table</li>
</ul>
</div>
<div class="service-box">
<h3>API Réservations</h3>
<ul>
<li><code>GET /api/available?date=...&people=...</code></li>
<li><code>POST /api/reserve</code></li>
<li><code>GET /api/tables</code></li>
<li><code>POST /api/tables/&lt;id&gt;/occupy</code></li>
<li><code>POST /api/tables/&lt;id&gt;/free</code></li>
</ul>
</div>
<h2>🔧 Configuration Technique</h2>
<table>
<tr>
<th>Paramètre</th>
<th>Valeur</th>
</tr>
<tr>
<td>VPS IP</td>
<td>178.18.250.53</td>
</tr>
<tr>
<td>Authentification</td>
<td>admin:turf2026</td>
</tr>
<tr>
<td>Base de données</td>
<td>turf.db (SQLite)</td>
</tr>
<tr>
<td>Fichier idées</td>
<td>idees.json</td>
</tr>
<tr>
<td>Fichier réservations</td>
<td>reservations.json</td>
</tr>
</table>
<h2>📊 Matrice des Responsabilités</h2>
<table>
<tr>
<th>Service</th>
<th>Port</th>
<th>Type</th>
<th>Données</th>
</tr>
<tr>
<td>Portal</td>
<td><span class="port">8768</span></td>
<td>Web</td>
<td>-</td>
</tr>
<tr>
<td>Turf</td>
<td><span class="port">8765</span></td>
<td>Web/API</td>
<td>turf.db</td>
</tr>
<tr>
<td>Ideas</td>
<td><span class="port">8765</span></td>
<td>Web</td>
<td>idees.json</td>
</tr>
<tr>
<td>Admin Menu</td>
<td><span class="port">8766</span></td>
<td>Web</td>
<td>config_restaurant.json</td>
</tr>
<tr>
<td>Réservation</td>
<td><span class="port">8767</span></td>
<td>Web</td>
<td>reservations.json</td>
</tr>
<tr>
<td>Templates</td>
<td><span class="port">9090</span></td>
<td>Web</td>
<td>-</td>
</tr>
</table>
<hr>
<p style="text-align: center; color: #7f8c8d;">
<em>Document généré le 25/02/2026 - H3R7</em>
</p>
</body>
</html>