chore: install frontend dependencies.
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
# Foxy Dev Team — Refonte Complète
|
||||
|
||||
## Phase 1: Planification
|
||||
- [x] Explorer la base de code existante (autopilot, telegram bot, agent specs, config)
|
||||
- [x] Rédiger le plan d'implémentation détaillé
|
||||
- [x] Obtenir l'approbation de l'utilisateur
|
||||
|
||||
## Phase 2: Backend (FastAPI + SQLite)
|
||||
- [x] Structure du projet et dépendances (`pyproject.toml` / [requirements.txt](file:///c:/dev/git/openclaw/FoxyDevTeam/foxy-dev-team/backend/requirements.txt))
|
||||
- [x] Modèles de données SQLAlchemy (Project, Task, Agent, AuditLog, Workflow)
|
||||
- [x] Moteur de Workflows dynamiques (4 workflows prédéfinis + routing)
|
||||
- [x] API REST (projets CRUD, contrôle de flux, configuration)
|
||||
- [x] WebSocket pour logs en temps réel et état des agents
|
||||
- [x] Intégration OpenClaw (spawn agents, session env)
|
||||
- [x] Service de notifications (Telegram unifié)
|
||||
|
||||
## Phase 3: Frontend (React + TypeScript + TailwindCSS via Vite)
|
||||
- [x] Scaffolding Vite + React + TypeScript + Tailwind
|
||||
- [x] Layout principal du Dashboard (sidebar, header, thème sombre)
|
||||
- [x] Page Projects (liste, création, contrôle de flux)
|
||||
- [x] Page Agent Status (état en temps réel via WebSocket)
|
||||
- [x] Page Logs (streaming logs en temps réel)
|
||||
- [x] Page Configuration (variables d'environnement, paramètres)
|
||||
- [x] Composants Kanban / Timeline d'audit
|
||||
|
||||
## Phase 4: Telegram Bot Adaptation
|
||||
- [x] Réécrire le bot pour consommer l'API centralisée
|
||||
- [x] Supprimer les accès directs au filesystem / subprocess
|
||||
|
||||
## Phase 5: Vérification
|
||||
- [x] Tests unitaires backend (pytest)
|
||||
- [x] Test d'intégration API
|
||||
- [x] Validation visuelle du Dashboard (navigateur)
|
||||
- [x] Rédiger le walkthrough
|
||||
@@ -0,0 +1,126 @@
|
||||
# 🦊 Foxy Dev Team v2.0 — Refonte complète
|
||||
|
||||
## Résumé
|
||||
|
||||
Refonte complète du système Foxy Dev Team : remplacement du daemon [foxy-autopilot.py](file:///c:/dev/git/openclaw/FoxyDevTeam/foxy-dev-team/scripts/foxy-autopilot.py) et de la gestion d'état fichier par une architecture moderne FastAPI + React + SQLite.
|
||||
|
||||
---
|
||||
|
||||
## Architecture livrée
|
||||
|
||||
```mermaid
|
||||
graph LR
|
||||
subgraph Frontend
|
||||
A[React + TypeScript + TailwindCSS]
|
||||
end
|
||||
subgraph Backend
|
||||
B[FastAPI + SQLAlchemy]
|
||||
C[(SQLite)]
|
||||
D[WebSocket Hub]
|
||||
end
|
||||
subgraph External
|
||||
E[Telegram Bot v3]
|
||||
F[OpenClaw CLI]
|
||||
end
|
||||
A -- REST API --> B
|
||||
A -- WebSocket --> D
|
||||
B --> C
|
||||
E -- REST API --> B
|
||||
B --> F
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Fichiers créés
|
||||
|
||||
### Backend (`backend/app/`)
|
||||
|
||||
| Fichier | Rôle |
|
||||
|---------|------|
|
||||
| [config.py](file:///c:/dev/git/openclaw/FoxyDevTeam/foxy-dev-team/backend/app/config.py) | Pydantic-settings, `.env` loader |
|
||||
| [database.py](file:///c:/dev/git/openclaw/FoxyDevTeam/foxy-dev-team/backend/app/database.py) | Async SQLAlchemy engine + session |
|
||||
| [models.py](file:///c:/dev/git/openclaw/FoxyDevTeam/foxy-dev-team/backend/app/models.py) | 4 tables ORM (Project, Task, AgentExecution, AuditLog) |
|
||||
| [schemas.py](file:///c:/dev/git/openclaw/FoxyDevTeam/foxy-dev-team/backend/app/schemas.py) | Pydantic request/response schemas |
|
||||
| [workflows.py](file:///c:/dev/git/openclaw/FoxyDevTeam/foxy-dev-team/backend/app/workflows.py) | Moteur de workflows dynamique (4 types) |
|
||||
| [notifications.py](file:///c:/dev/git/openclaw/FoxyDevTeam/foxy-dev-team/backend/app/notifications.py) | Service Telegram async (httpx) |
|
||||
| [openclaw.py](file:///c:/dev/git/openclaw/FoxyDevTeam/foxy-dev-team/backend/app/openclaw.py) | Intégration OpenClaw async |
|
||||
| [main.py](file:///c:/dev/git/openclaw/FoxyDevTeam/foxy-dev-team/backend/app/main.py) | Application FastAPI principale |
|
||||
|
||||
### API Routers (`backend/app/routers/`)
|
||||
|
||||
| Fichier | Endpoints |
|
||||
|---------|-----------|
|
||||
| [projects.py](file:///c:/dev/git/openclaw/FoxyDevTeam/foxy-dev-team/backend/app/routers/projects.py) | CRUD projets + `/start`, `/pause`, `/stop`, `/reset` |
|
||||
| [agents.py](file:///c:/dev/git/openclaw/FoxyDevTeam/foxy-dev-team/backend/app/routers/agents.py) | Status agents + historique |
|
||||
| [logs.py](file:///c:/dev/git/openclaw/FoxyDevTeam/foxy-dev-team/backend/app/routers/logs.py) | Audit logs avec filtres |
|
||||
| [workflows.py](file:///c:/dev/git/openclaw/FoxyDevTeam/foxy-dev-team/backend/app/routers/workflows.py) | Définitions des 4 workflows |
|
||||
| [config.py](file:///c:/dev/git/openclaw/FoxyDevTeam/foxy-dev-team/backend/app/routers/config.py) | Gestion config (secrets masqués) |
|
||||
| [ws.py](file:///c:/dev/git/openclaw/FoxyDevTeam/foxy-dev-team/backend/app/routers/ws.py) | WebSocket hub temps réel |
|
||||
|
||||
### Frontend (`frontend/src/`)
|
||||
|
||||
| Fichier | Page |
|
||||
|---------|------|
|
||||
| [App.tsx](file:///c:/dev/git/openclaw/FoxyDevTeam/foxy-dev-team/frontend/src/App.tsx) | Layout principal + sidebar + routing |
|
||||
| [Dashboard.tsx](file:///c:/dev/git/openclaw/FoxyDevTeam/foxy-dev-team/frontend/src/pages/Dashboard.tsx) | Vue d'ensemble (stats, agents, activité) |
|
||||
| [Projects.tsx](file:///c:/dev/git/openclaw/FoxyDevTeam/foxy-dev-team/frontend/src/pages/Projects.tsx) | Liste projets + création + contrôle |
|
||||
| [Agents.tsx](file:///c:/dev/git/openclaw/FoxyDevTeam/foxy-dev-team/frontend/src/pages/Agents.tsx) | Cartes agents avec stats |
|
||||
| [Logs.tsx](file:///c:/dev/git/openclaw/FoxyDevTeam/foxy-dev-team/frontend/src/pages/Logs.tsx) | Table audit en temps réel |
|
||||
| [Settings.tsx](file:///c:/dev/git/openclaw/FoxyDevTeam/foxy-dev-team/frontend/src/pages/Settings.tsx) | Configuration + workflows |
|
||||
|
||||
### Telegram Bot
|
||||
|
||||
| Fichier | Rôle |
|
||||
|---------|------|
|
||||
| [foxy-telegram-bot-v3.py](file:///c:/dev/git/openclaw/FoxyDevTeam/foxy-dev-team/scripts/foxy-telegram-bot-v3.py) | Bot async via API centralisée (remplace les subprocess) |
|
||||
|
||||
---
|
||||
|
||||
## Vérification
|
||||
|
||||
### API Endpoints testés ✅
|
||||
|
||||
```
|
||||
GET /api/health → {"status": "ok", "version": "2.0.0"}
|
||||
POST /api/projects → Création projet avec audit log
|
||||
GET /api/projects → Liste avec task_count/tasks_done
|
||||
GET /api/agents → 6 agents avec modèles et stats
|
||||
GET /api/workflows → 4 workflows (SOFTWARE_DESIGN, SYSADMIN_DEBUG, DEVOPS_SETUP, SYSADMIN_ADJUST)
|
||||
GET /api/logs → Audit logs filtrables
|
||||
```
|
||||
|
||||
### Dashboard vérifié visuellement ✅
|
||||
|
||||
````carousel
|
||||

|
||||
<!-- slide -->
|
||||

|
||||
<!-- slide -->
|
||||

|
||||
````
|
||||
|
||||
### Enregistrement du Dashboard
|
||||
|
||||

|
||||
|
||||
---
|
||||
|
||||
## Démarrage rapide
|
||||
|
||||
```bash
|
||||
# Backend
|
||||
cd backend
|
||||
cp .env.example .env # Configurer les variables
|
||||
pip install -r requirements.txt
|
||||
python -m uvicorn app.main:app --port 8000
|
||||
|
||||
# Frontend
|
||||
cd frontend
|
||||
npm install
|
||||
npm run dev
|
||||
|
||||
# Telegram Bot
|
||||
cd scripts
|
||||
export TELEGRAM_BOT_TOKEN="..." TELEGRAM_CHAT_ID="..." FOXY_API_URL="http://localhost:8000"
|
||||
python3 foxy-telegram-bot-v3.py
|
||||
```
|
||||
Reference in New Issue
Block a user