Structure: - control-plane/: Registries, SIMCO directives, CI/CD templates - projects/: Gamilit, ERP-Suite, Trading-Platform, Betting-Analytics - shared/: Libs catalog, knowledge-base Key features: - Centralized port, domain, database, and service registries - 23 SIMCO directives + 6 fundamental principles - NEXUS agent profiles with delegation rules - Validation scripts for workspace integrity - Dockerfiles for all services - Path aliases for quick reference 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
324 lines
6.9 KiB
Markdown
324 lines
6.9 KiB
Markdown
# GAMILIT - CHECKLIST DE VALIDACION
|
|
|
|
**Proyecto:** Gamilit Platform
|
|
**Fase:** 4.1 - Migracion de Gamilit
|
|
**Estado:** Pendiente
|
|
|
|
---
|
|
|
|
## ESTRUCTURA
|
|
|
|
```markdown
|
|
[ ] gamilit-platform/ existe
|
|
[ ] apps/backend/ existe
|
|
[ ] apps/frontend/ existe
|
|
[ ] apps/database/ existe
|
|
[ ] docker/ existe
|
|
[ ] orchestration/ existe
|
|
[ ] docs/ existe
|
|
[ ] .github/workflows/ existe
|
|
```
|
|
|
|
---
|
|
|
|
## SERVICE DESCRIPTORS
|
|
|
|
### apps/backend/service.descriptor.yml
|
|
|
|
```markdown
|
|
[ ] Archivo existe
|
|
[ ] Es YAML valido
|
|
[ ] service.name = "gamilit-api"
|
|
[ ] service.type = "backend"
|
|
[ ] service.runtime = "node"
|
|
[ ] service.owner_agent = "NEXUS-BACKEND"
|
|
[ ] ports.internal = 3000
|
|
[ ] ports.registry_ref = "projects.gamilit.api"
|
|
[ ] database.registry_ref = "gamilit"
|
|
[ ] ci.docker = true
|
|
```
|
|
|
|
### apps/frontend/service.descriptor.yml
|
|
|
|
```markdown
|
|
[ ] Archivo existe
|
|
[ ] Es YAML valido
|
|
[ ] service.name = "gamilit-web"
|
|
[ ] service.type = "frontend"
|
|
[ ] service.runtime = "static"
|
|
[ ] service.owner_agent = "NEXUS-FRONTEND"
|
|
[ ] ports.internal = 3001
|
|
[ ] ports.registry_ref = "projects.gamilit.web"
|
|
[ ] dependencies.services incluye "gamilit-api"
|
|
```
|
|
|
|
---
|
|
|
|
## CODIGO MIGRADO
|
|
|
|
### Backend
|
|
|
|
```markdown
|
|
[ ] package.json existe
|
|
[ ] package.json tiene scripts: build, dev, test, lint
|
|
[ ] tsconfig.json existe
|
|
[ ] src/ existe con codigo
|
|
[ ] Dockerfile existe
|
|
[ ] npm install ejecuta sin errores
|
|
[ ] npm run build ejecuta sin errores
|
|
[ ] npm run lint ejecuta sin errores (o warnings aceptables)
|
|
```
|
|
|
|
### Frontend
|
|
|
|
```markdown
|
|
[ ] package.json existe
|
|
[ ] package.json tiene scripts: build, dev, test, lint
|
|
[ ] src/ existe con codigo
|
|
[ ] Dockerfile existe
|
|
[ ] npm install ejecuta sin errores
|
|
[ ] npm run build ejecuta sin errores
|
|
```
|
|
|
|
### Database
|
|
|
|
```markdown
|
|
[ ] ddl/ existe con scripts DDL
|
|
[ ] seeds/ existe (puede estar vacio)
|
|
[ ] migrations/ existe (puede estar vacio)
|
|
```
|
|
|
|
---
|
|
|
|
## DOCKER
|
|
|
|
### docker/docker-compose.yml
|
|
|
|
```markdown
|
|
[ ] Archivo existe
|
|
[ ] Es YAML valido (docker-compose config)
|
|
[ ] Service gamilit-api definido
|
|
[ ] Usa expose (NO ports)
|
|
[ ] Puerto 3000 expuesto
|
|
[ ] Labels de Traefik configurados
|
|
[ ] Host = api.gamilit.localhost
|
|
[ ] Healthcheck definido
|
|
[ ] Networks: gamilit_${ENV:-local}, infra_shared
|
|
[ ] Service gamilit-web definido
|
|
[ ] Usa expose (NO ports)
|
|
[ ] Puerto 3001 expuesto
|
|
[ ] Labels de Traefik configurados
|
|
[ ] Host = gamilit.localhost
|
|
[ ] depends_on: gamilit-api
|
|
[ ] Networks: gamilit_${ENV:-local}, infra_shared
|
|
[ ] Networks son external: true
|
|
```
|
|
|
|
### docker/.env.example
|
|
|
|
```markdown
|
|
[ ] Archivo existe
|
|
[ ] Variables documentadas:
|
|
[ ] NODE_ENV
|
|
[ ] DATABASE_URL
|
|
[ ] JWT_SECRET
|
|
[ ] REACT_APP_API_URL
|
|
[ ] No contiene valores reales/secretos
|
|
```
|
|
|
|
---
|
|
|
|
## ORCHESTRATION
|
|
|
|
```markdown
|
|
[ ] orchestration/inventarios/ migrado
|
|
[ ] orchestration/trazas/ migrado (si existe)
|
|
[ ] orchestration/00-guidelines/ migrado (si existe)
|
|
[ ] Paths actualizados en archivos migrados
|
|
```
|
|
|
|
---
|
|
|
|
## ROOT FILES
|
|
|
|
```markdown
|
|
[ ] package.json existe
|
|
[ ] Define workspaces: ["apps/backend", "apps/frontend"]
|
|
[ ] Scripts de root definidos
|
|
[ ] README.md existe
|
|
[ ] Describe el proyecto
|
|
[ ] Instrucciones de setup
|
|
[ ] Instrucciones de desarrollo
|
|
[ ] .gitignore existe
|
|
[ ] Ignora node_modules
|
|
[ ] Ignora .env (pero no .env.example)
|
|
[ ] Ignora dist/build
|
|
```
|
|
|
|
---
|
|
|
|
## VALIDACION FUNCIONAL
|
|
|
|
### Build
|
|
|
|
```bash
|
|
# Backend
|
|
cd apps/backend
|
|
npm install
|
|
npm run build
|
|
# [ ] Resultado: SUCCESS
|
|
|
|
# Frontend
|
|
cd apps/frontend
|
|
npm install
|
|
npm run build
|
|
# [ ] Resultado: SUCCESS
|
|
```
|
|
|
|
### Docker
|
|
|
|
```bash
|
|
# Verificar config
|
|
cd docker
|
|
docker-compose config
|
|
# [ ] Resultado: Sin errores
|
|
|
|
# Levantar servicios (requiere Traefik y redes)
|
|
docker-compose up -d
|
|
# [ ] Resultado: Servicios levantan
|
|
|
|
# Verificar health
|
|
curl -f http://api.gamilit.localhost/health
|
|
# [ ] Resultado: HTTP 200
|
|
|
|
curl -f http://gamilit.localhost
|
|
# [ ] Resultado: HTTP 200
|
|
```
|
|
|
|
### Integracion con Control Plane
|
|
|
|
```bash
|
|
# Validar service descriptors contra registries
|
|
./control-plane/devtools/scripts/validation/validate-service-descriptors.sh gamilit-platform/
|
|
# [ ] Resultado: Sin errores
|
|
|
|
# Validar puertos
|
|
./control-plane/devtools/scripts/validation/validate-ports.sh
|
|
# [ ] Resultado: Sin conflictos
|
|
```
|
|
|
|
---
|
|
|
|
## VALIDACION AUTOMATIZADA
|
|
|
|
```bash
|
|
#!/bin/bash
|
|
# validate-gamilit.sh
|
|
|
|
PROJECT_DIR="/home/adrian/Documentos/workspace-v1/repos/gamilit-platform"
|
|
|
|
echo "=== Validando Migracion de Gamilit ==="
|
|
|
|
# 1. Verificar estructura
|
|
echo "Verificando estructura..."
|
|
REQUIRED_DIRS=(
|
|
"apps/backend"
|
|
"apps/frontend"
|
|
"apps/database"
|
|
"docker"
|
|
"orchestration"
|
|
)
|
|
|
|
for dir in "${REQUIRED_DIRS[@]}"; do
|
|
if [ -d "$PROJECT_DIR/$dir" ]; then
|
|
echo " [OK] $dir/"
|
|
else
|
|
echo " [FAIL] $dir/ no existe"
|
|
fi
|
|
done
|
|
|
|
# 2. Verificar service descriptors
|
|
echo ""
|
|
echo "Verificando service descriptors..."
|
|
for svc in "apps/backend" "apps/frontend"; do
|
|
descriptor="$PROJECT_DIR/$svc/service.descriptor.yml"
|
|
if [ -f "$descriptor" ]; then
|
|
if python3 -c "import yaml; yaml.safe_load(open('$descriptor'))" 2>/dev/null; then
|
|
echo " [OK] $svc/service.descriptor.yml (YAML valido)"
|
|
else
|
|
echo " [FAIL] $svc/service.descriptor.yml (YAML invalido)"
|
|
fi
|
|
else
|
|
echo " [FAIL] $svc/service.descriptor.yml no existe"
|
|
fi
|
|
done
|
|
|
|
# 3. Verificar docker-compose
|
|
echo ""
|
|
echo "Verificando docker-compose..."
|
|
if [ -f "$PROJECT_DIR/docker/docker-compose.yml" ]; then
|
|
cd "$PROJECT_DIR/docker"
|
|
if docker-compose config > /dev/null 2>&1; then
|
|
echo " [OK] docker-compose.yml valido"
|
|
else
|
|
echo " [FAIL] docker-compose.yml invalido"
|
|
fi
|
|
else
|
|
echo " [FAIL] docker-compose.yml no existe"
|
|
fi
|
|
|
|
# 4. Verificar que NO hay puertos expuestos directamente
|
|
echo ""
|
|
echo "Verificando puertos..."
|
|
if grep -q "ports:" "$PROJECT_DIR/docker/docker-compose.yml" 2>/dev/null; then
|
|
echo " [WARN] docker-compose.yml usa 'ports:' - verificar que sea necesario"
|
|
else
|
|
echo " [OK] docker-compose.yml no expone puertos directamente"
|
|
fi
|
|
|
|
# 5. Verificar redes externas
|
|
echo ""
|
|
echo "Verificando redes..."
|
|
if grep -q "external: true" "$PROJECT_DIR/docker/docker-compose.yml" 2>/dev/null; then
|
|
echo " [OK] Redes configuradas como external"
|
|
else
|
|
echo " [FAIL] Redes no son external"
|
|
fi
|
|
|
|
echo ""
|
|
echo "=== Validacion completada ==="
|
|
```
|
|
|
|
---
|
|
|
|
## CRITERIOS DE APROBACION
|
|
|
|
Para aprobar la migracion de Gamilit:
|
|
|
|
1. **100% estructura creada**
|
|
2. **Service descriptors validos y completos**
|
|
3. **Build exitoso** (backend y frontend)
|
|
4. **Docker compose funcional**
|
|
- No expone puertos directamente
|
|
- Usa redes externas
|
|
- Labels de Traefik correctos
|
|
5. **Servicios accesibles via Traefik**
|
|
6. **Codigo funcional** (healthcheck responde)
|
|
|
|
---
|
|
|
|
## SIGUIENTE PROYECTO
|
|
|
|
Una vez aprobado Gamilit, proceder a:
|
|
|
|
**ERP Suite (Fase 4.2)**
|
|
- Estructura multi-vertical
|
|
- Mas complejo por tener verticales
|
|
|
|
---
|
|
|
|
**Validador:** Tech-Leader
|
|
**Fecha de Validacion:** _________
|
|
**Estado:** [ ] Aprobado [ ] Rechazado
|
|
**Notas:** _________
|