diff --git a/.gitmodules b/.gitmodules index aa3817069..658b6f0ef 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,23 +1,23 @@ [submodule "backend"] - path = backend + path = apps/backend url = git@gitea-server:rckrdmrd/michangarrito-backend-v2.git [submodule "database"] - path = database + path = apps/database url = git@gitea-server:rckrdmrd/michangarrito-database-v2.git [submodule "frontend"] - path = frontend + path = apps/frontend-web url = git@gitea-server:rckrdmrd/michangarrito-frontend-v2.git [submodule "mcp-server"] - path = mcp-server + path = apps/mcp-server url = git@gitea-server:rckrdmrd/michangarrito-mcp-server-v2.git [submodule "mobile"] - path = mobile + path = apps/frontend-mobile url = git@gitea-server:rckrdmrd/michangarrito-mobile-v2.git [submodule "whatsapp-service"] - path = whatsapp-service + path = apps/whatsapp-service url = git@gitea-server:rckrdmrd/michangarrito-whatsapp-service-v2.git diff --git a/CLAUDE.md b/CLAUDE.md index 94e1837b0..be7150dfb 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -4,8 +4,9 @@ **Sistema:** SIMCO v4.3.0 + NEXUS v4.0 **Proyecto:** michangarrito **Tipo:** CONSUMER (de template-saas) -**Versión:** 0.9.5 -**Actualizado:** 2026-01-24 +**Versión:** 1.0.0 +**Actualizado:** 2026-02-06 +**ADR Vinculante:** ADR-0011 (Estructura Canonica apps/) --- @@ -55,21 +56,26 @@ Redis Port: 6389 --- -## ESTRUCTURA DEL MONOREPO +## ESTRUCTURA CANONICA (ADR-0011) ``` michangarrito/ -├── apps/ -│ ├── backend/ → NestJS API (23 módulos) -│ ├── frontend/ → React Web App -│ ├── mobile/ → React Native (Expo) -│ ├── mcp-server/ → Gateway LLM (15 herramientas) -│ ├── whatsapp-service/ → Meta Cloud API -│ └── database/ → DDL (11 schemas) -├── orchestration/ → Sistema SIMCO -└── docs/ → Documentación +├── apps/ # Contenedor canonico de aplicaciones +│ ├── backend/ # NestJS API (submodule, 23 modulos) +│ ├── frontend-web/ # React Web App (submodule) +│ ├── frontend-mobile/ # React Native Expo (submodule) +│ ├── mcp-server/ # Gateway LLM (submodule, 15 herramientas) +│ ├── whatsapp-service/ # Meta Cloud API (submodule) +│ ├── database/ # DDL PostgreSQL (submodule, 11 schemas) +│ └── _MAP.md # Indice de aplicaciones +├── orchestration/ # Sistema SIMCO local +├── docs/ # Documentacion +├── .claude/ # Instrucciones Claude Code +└── .gitmodules # 6 submodules en apps/ ``` +**IMPORTANTE:** Todo desarrollo nuevo DEBE ir dentro de `apps/`. No crear archivos en raiz. + --- ## MODULOS BACKEND (23) @@ -166,12 +172,12 @@ Además de las validaciones del workspace: 2. **Frontend:** ```bash - cd apps/frontend && npm run build && npm run lint + cd apps/frontend-web && npm run build && npm run lint ``` 3. **Mobile:** ```bash - cd apps/mobile && npx expo doctor + cd apps/frontend-mobile && npx expo doctor ``` --- @@ -179,8 +185,8 @@ Además de las validaciones del workspace: ## ALIASES LOCALES - `@BACKEND` → apps/backend/src/modules/ -- `@FRONTEND` → apps/frontend/src/ -- `@MOBILE` → apps/mobile/src/ +- `@FRONTEND` → apps/frontend-web/src/ +- `@MOBILE` → apps/frontend-mobile/src/ - `@WHATSAPP` → apps/whatsapp-service/ - `@MCP` → apps/mcp-server/ - `@DDL` → apps/database/ @@ -221,4 +227,9 @@ Bloqueadores para Producción: --- -*MiChangarrito v0.9.5 - Sistema SIMCO v4.3.0* +- `@APPS-MAP` → apps/_MAP.md + +--- + +*MiChangarrito v1.0.0 - Sistema SIMCO v4.0.0* +*Estructura migrada a apps/ canonico: 2026-02-06* diff --git a/apps/_MAP.md b/apps/_MAP.md new file mode 100644 index 000000000..ed20e9d2e --- /dev/null +++ b/apps/_MAP.md @@ -0,0 +1,31 @@ +# _MAP: Aplicaciones de michangarrito + +**Carpeta:** apps/ +**Proposito:** Contenedor canonico de todas las aplicaciones del proyecto (ADR-0011) +**Estado:** Activo +**Ultima actualizacion:** 2026-02-06 + +--- + +## Aplicaciones + +| App | Ruta | Tipo | Stack | Estado | Git | +|-----|------|------|-------|--------|-----| +| **Backend API** | `apps/backend/` | API REST | NestJS 10 + TypeScript | Activo | Submodule (michangarrito-backend-v2) | +| **Frontend Web** | `apps/frontend-web/` | SPA | React 19 + Vite | Activo | Submodule (michangarrito-frontend-v2) | +| **Frontend Mobile** | `apps/frontend-mobile/` | Mobile App | React Native Expo SDK 51 | Activo | Submodule (michangarrito-mobile-v2) | +| **MCP Server** | `apps/mcp-server/` | LLM Gateway | Node.js + 15 tools | Activo | Submodule (michangarrito-mcp-server-v2) | +| **WhatsApp Service** | `apps/whatsapp-service/` | Messaging | Meta Cloud API | Activo | Submodule (michangarrito-whatsapp-service-v2) | +| **Database** | `apps/database/` | DDL | PostgreSQL 16+ | Activo | Submodule (michangarrito-database-v2) | + +--- + +## Notas + +- Migrado a estructura apps/ canonica (ADR-0011) 2026-02-06 +- 6 submodulos git separados (POLYREPO) +- Proyecto con mayor cantidad de submodulos en el workspace + +--- + +*Generado por TASK-2026-02-06-ESTANDARIZACION-ESTRUCTURA-PROYECTOS (Sprint 4)* diff --git a/backend b/apps/backend similarity index 100% rename from backend rename to apps/backend diff --git a/database b/apps/database similarity index 100% rename from database rename to apps/database diff --git a/mobile b/apps/frontend-mobile similarity index 100% rename from mobile rename to apps/frontend-mobile diff --git a/frontend b/apps/frontend-web similarity index 100% rename from frontend rename to apps/frontend-web diff --git a/mcp-server b/apps/mcp-server similarity index 100% rename from mcp-server rename to apps/mcp-server diff --git a/whatsapp-service b/apps/whatsapp-service similarity index 100% rename from whatsapp-service rename to apps/whatsapp-service diff --git a/docker-compose.yml b/docker-compose.yml index eb6b0c85c..a268a85fc 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -28,9 +28,9 @@ services: PGDATA: /var/lib/postgresql/data/pgdata volumes: - postgres_data:/var/lib/postgresql/data - - ./database/schemas:/docker-entrypoint-initdb.d/schemas:ro - - ./database/seeds:/docker-entrypoint-initdb.d/seeds:ro - - ./database/init:/docker-entrypoint-initdb.d:ro + - ./apps/database/schemas:/docker-entrypoint-initdb.d/schemas:ro + - ./apps/database/seeds:/docker-entrypoint-initdb.d/seeds:ro + - ./apps/database/init:/docker-entrypoint-initdb.d:ro ports: - "${DB_PORT:-5432}:5432" healthcheck: