diff --git a/README.md b/README.md index 45ebf82..8455676 100644 --- a/README.md +++ b/README.md @@ -1,248 +1,159 @@ -# 🤖 AiWorker - AI Agent Orchestration Platform +# 🤖 AiWorker -Sistema de orquestación de agentes IA (Claude Code) para automatización del ciclo completo de desarrollo de software. +AI Agent Orchestration Platform - Automatización del ciclo completo de desarrollo con agentes Claude Code. -**Estado**: 🚧 En desarrollo - Infraestructura completa ✅ +**Estado**: Infraestructura HA completa ✅ | Backend en desarrollo 🚧 --- -## 🎯 ¿Qué es AiWorker? +## 🚀 Quick Start -Plataforma que permite a agentes IA (Claude Code) trabajar autónomamente en tareas de desarrollo: - -1. **Dashboard Web** - Kanban board para gestionar tareas -2. **Agentes Autónomos** - Claude Code en pods de Kubernetes -3. **Comunicación MCP** - Agentes piden/dan información -4. **Deployments Automáticos** - Preview, staging, production -5. **GitOps** - Todo versionado en Git - -**Flujo completo**: -``` -Tarea → Agente → Código → PR → Preview Deploy → Aprobación → Staging → Production -``` - ---- - -## 📚 DOCUMENTACIÓN - -### 🚀 Start Here -- **[ROADMAP.md](ROADMAP.md)** - Plan general y progreso -- **[NEXT-SESSION.md](NEXT-SESSION.md)** - Próximos pasos detallados -- **[DEVELOPMENT-WORKFLOW.md](DEVELOPMENT-WORKFLOW.md)** - Cómo trabajamos (Git, CI/CD, Deploy) -- **[QUICK-REFERENCE.md](QUICK-REFERENCE.md)** - Comandos y URLs importantes -- **[GITEA-GUIDE.md](GITEA-GUIDE.md)** - Guía completa de Gitea (API, Registry, CI/CD) - -### 🏗️ Infraestructura -- **[K8S-CLUSTER.md](K8S-CLUSTER.md)** - Estado del cluster K8s -- **[CLUSTER-CREDENTIALS.md](CLUSTER-CREDENTIALS.md)** - Credenciales (⚠️ sensible) -- **[AGENT-GUIDE.md](AGENT-GUIDE.md)** - Guía para agentes IA -- **[TROUBLESHOOTING.md](TROUBLESHOOTING.md)** - Solución de problemas - -### 📜 Historial -- **[past-sessions/](past-sessions/)** - Documentación de cada sesión de desarrollo - -### 📖 Documentación Completa -- **[docs/](docs/)** - 40+ archivos de documentación detallada - - `01-arquitectura/` - Diseño del sistema - - `02-backend/` - Backend (Bun + Express + MCP) - - `03-frontend/` - Frontend (React 19.2 + TailwindCSS) - - `04-kubernetes/` - Kubernetes setup - - `05-agents/` - Claude Code agents - - `06-deployment/` - CI/CD y GitOps - - `CONTAINER-REGISTRY.md` - Uso del registry - ---- - -## ✅ COMPLETADO - -### Infraestructura Kubernetes HA -- ✅ Cluster K3s v1.35.0+k3s1 (Houston, Texas) -- ✅ 3 Control Planes + 3 Workers + 2 Load Balancers -- ✅ Longhorn Storage HA (3 réplicas) -- ✅ Nginx Ingress + Cert-Manager (TLS automático) -- ✅ Red privada con HAProxy -- ✅ DNS: *.fuq.tv (round-robin HA) - -### Servicios Base -- ✅ MariaDB 11.4 LTS -- ✅ Redis 7 -- ✅ Gitea 1.25.3 + Container Registry -- ✅ ArgoCD (instalado, pendiente configuración) -- ✅ Gitea Actions Runner (CI/CD activo) - -### Backend Inicial -- ✅ Estructura del proyecto -- ✅ Bun 1.3.6 con Bun.serve() -- ✅ Database schema (Drizzle ORM) -- ✅ Dockerfile -- ✅ Workflow CI/CD - -**Costo**: $148/mes | **Capacidad**: 48 vCPU, 104 GB RAM - ---- - -## 🚧 EN DESARROLLO - -- [ ] Backend API routes completas -- [ ] MCP Server para agentes -- [ ] Frontend React 19.2 -- [ ] Pods de agentes Claude Code -- [ ] Preview environments automáticos - ---- - -## ⚡ QUICK START - -### Acceder al Cluster ```bash +# Acceso al cluster export KUBECONFIG=~/.kube/aiworker-config kubectl get nodes -kubectl get pods -A -``` -### Desarrollo Local (Backend) -```bash -cd backend +# Desarrollo backend +cd backend && bun run dev -# Port-forward services -kubectl port-forward -n control-plane svc/mariadb 3306:3306 & -kubectl port-forward -n control-plane svc/redis 6379:6379 & +# Verificar servicios +kubectl get pods -n control-plane -# Run dev server -bun run dev - -# Test -curl http://localhost:3000/api/health -``` - -### Ver Actions CI/CD -```bash +# Ver CI/CD open https://git.fuq.tv/admin/aiworker-backend/actions ``` -### Deploy en K8s (cuando esté listo) -```bash -kubectl apply -f k8s/backend/ -kubectl get pods -n control-plane +--- + +## 📚 Documentación + +### Esenciales (Start Here) +| Documento | Descripción | +|-----------|-------------| +| **[DEVELOPMENT-WORKFLOW.md](DEVELOPMENT-WORKFLOW.md)** | Flujo completo: Git → Build → Deploy | +| **[GITEA-GUIDE.md](GITEA-GUIDE.md)** | API, Registry, Auth, CI/CD | +| **[K8S-CLUSTER.md](K8S-CLUSTER.md)** | Cluster info, IPs, componentes | +| **[NEXT-SESSION.md](NEXT-SESSION.md)** | Próximos pasos (actualizado cada sesión) | +| **[QUICK-REFERENCE.md](QUICK-REFERENCE.md)** | Comandos y URLs de 1 línea | + +### Operacional +| Documento | Descripción | +|-----------|-------------| +| **[ROADMAP.md](ROADMAP.md)** | Plan general y progreso (26%) | +| **[TROUBLESHOOTING.md](TROUBLESHOOTING.md)** | Solución de problemas | +| **[AGENT-GUIDE.md](AGENT-GUIDE.md)** | Para agentes IA operar el cluster | +| **[CLAUDE.md](CLAUDE.md)** | Para Claude Code entender el repo | + +### Detallada +- **[docs/](docs/)** - 40+ archivos técnicos organizados +- **[past-sessions/](past-sessions/)** - Historial de desarrollo por sesión + +--- + +## 🏗️ Arquitectura + +``` +Internet → DNS (*.fuq.tv) → Load Balancers → Nginx Ingress → Pods + ↓ + K8s Cluster (Houston) + 3 CP + 3 Workers + Storage HA + ↓ + MariaDB + Redis + Gitea +``` + +**Flujo de trabajo**: +``` +Tarea → Agente Claude → Código → PR → Preview → Aprobación → Staging → Production ``` --- -## 🏗️ ARQUITECTURA +## 💻 Stack -``` - Internet - ↓ - [DNS: *.fuq.tv] - ↓ - ┌────────────┴────────────┐ - ↓ ↓ - [LB-01] [LB-02] - HAProxy HAProxy - ↓ ↓ - └────────────┬────────────┘ - ↓ - [Private Network 10.100.0.0/24] - ↓ - ┌───────────────┼───────────────┐ - ↓ ↓ ↓ - [CP etcd] [CP etcd] [CP etcd] - 10.100.0.2 10.100.0.3 10.100.0.4 - ↓ ↓ ↓ - ─────┴───────────────┴───────────────┴───── - ↓ ↓ ↓ - [Worker+Storage] [Worker+Storage] [Worker+Storage] - 10.100.0.5 10.100.0.6 10.100.0.7 - ↓ ↓ ↓ - [Apps] [Apps] [Apps] - │ │ │ - [Longhorn 3x Replica Storage HA] -``` +| Layer | Tech | Versión | +|-------|------|---------| +| Runtime | Bun | 1.3.6 | +| Backend | Bun.serve() + Drizzle | - | +| Frontend | React + TailwindCSS | 19.2 + 4.x | +| Database | MariaDB | 11.4 LTS | +| Cache | Redis | 7 | +| Git/Registry | Gitea | 1.25.3 | +| K8s | K3s | v1.35.0+k3s1 | +| Storage | Longhorn | v1.8.0 (3 réplicas HA) | +| Ingress | Nginx + Cert-Manager | TLS automático | +| GitOps | ArgoCD | Instalado, no configurado | +| CI/CD | Gitea Actions | Activo | --- -## 📦 STACK TECNOLÓGICO +## ✅ Completado -| Layer | Tecnología | Versión | -|-------|-----------|---------| -| **Runtime** | Bun | 1.3.6 | -| **Backend** | Bun.serve() + Drizzle | - | -| **Frontend** | React + TailwindCSS | 19.2 + 4.x | -| **Database** | MariaDB | 11.4 LTS | -| **Cache** | Redis | 7 | -| **Git** | Gitea | 1.25.3 | -| **Registry** | Gitea Container Registry | - | -| **K8s** | K3s | v1.35.0+k3s1 | -| **Storage** | Longhorn | v1.8.0 | -| **Ingress** | Nginx | latest | -| **TLS** | Cert-Manager | v1.16.2 | -| **GitOps** | ArgoCD | stable | -| **CI/CD** | Gitea Actions | - | +**Infraestructura**: +- Cluster K8s HA (8 servidores, $148/mes) +- Storage distribuido Longhorn (3 réplicas) +- TLS automático (Let's Encrypt) +- DNS: *.fuq.tv con round-robin HA + +**Plataforma**: +- MariaDB 11.4 LTS + Redis 7 +- Gitea 1.25.3 + Container Registry +- Gitea Actions Runner (CI/CD) +- ArgoCD (pendiente config) + +**Backend** (20%): +- Estructura + Bun 1.3.6 +- Database schema (projects, agents, tasks) +- Auto-migrations +- Dockerfile + CI/CD workflow --- -## 🎓 LEARN BY DOING - Sesiones +## 🚧 En Desarrollo -### Sesión 1 (2026-01-19) - Infraestructura ✅ -- Desplegar cluster K3s HA en CubePath -- Configurar storage, networking, ingress -- Instalar Gitea, MariaDB, Redis -- Setup CI/CD con Gitea Actions -- Inicializar backend - -**Ver**: `K8S-CLUSTER.md` para detalles completos - -### Sesión 2 (Próxima) - Backend API -- Completar API routes -- Implementar MCP Server -- Integración con Gitea y K8s -- Deploy backend en cluster +- [ ] Backend API routes +- [ ] MCP Server +- [ ] Frontend React 19.2 +- [ ] Agentes Claude Code +- [ ] Preview environments **Ver**: `NEXT-SESSION.md` para pasos exactos --- -## 📞 SOPORTE +## 🌐 URLs -- **Issues**: Documentadas en `TROUBLESHOOTING.md` -- **CubePath**: https://cubepath.com/support -- **K3s Docs**: https://docs.k3s.io -- **Bun Docs**: https://bun.sh/docs +| Servicio | URL | Credenciales | +|----------|-----|--------------| +| Gitea | https://git.fuq.tv | admin/admin123 | +| ArgoCD | https://argocd.fuq.tv | admin/LyPF4Hy0wvp52IoU | +| Longhorn | https://longhorn.fuq.tv | admin/aiworker2026 | +| Docs Repo | https://git.fuq.tv/admin/aiworker | - | +| Backend Repo | https://git.fuq.tv/admin/aiworker-backend | - | + +**Más info**: `QUICK-REFERENCE.md` --- -## 🤝 CONTRIBUCIÓN +## 📖 Aprende Más -Este es un proyecto en desarrollo activo. La documentación se actualiza en cada sesión. +- **Workflow de desarrollo**: `DEVELOPMENT-WORKFLOW.md` +- **Uso de Gitea**: `GITEA-GUIDE.md` +- **Cluster K8s**: `K8S-CLUSTER.md` +- **Historial de sesiones**: `past-sessions/` +- **Docs técnicas**: `docs/` + +--- + +## 🎯 Progreso -**Estructura de commits**: ``` -Title line (imperativo) - -Detailed description - -Co-Authored-By: Claude Sonnet 4.5 (1M context) +Infraestructura: ████████████████████ 100% +Backend: ████░░░░░░░░░░░░░░░░ 20% +Frontend: ░░░░░░░░░░░░░░░░░░░░ 0% +Agentes: ░░░░░░░░░░░░░░░░░░░░ 0% +Total: ██████░░░░░░░░░░░░░░ 26% ``` --- -## 📜 LICENSE - -Proyecto privado - AiWorker Platform - ---- - -## 🎉 HIGHLIGHTS - -- **Alta Disponibilidad**: 3 réplicas de todo (storage, control planes) -- **TLS Automático**: Let's Encrypt con Cert-Manager -- **CI/CD Integrado**: Build automático en cada push -- **GitOps Ready**: ArgoCD configurado -- **Escalable**: 48 vCPU, 104 GB RAM disponibles -- **Moderno**: Últimas versiones de todo (K3s, Bun, React 19.2) - ---- - -**🚀 ¡Proyecto con bases sólidas! Listo para construir features increíbles!** - -**Siguiente paso**: Abre `NEXT-SESSION.md` y continúa donde lo dejaste. +**Siguiente paso**: Lee `NEXT-SESSION.md` y continúa donde lo dejaste.