From 65b32a0017ad546ab85136d768d1b85685f8df29 Mon Sep 17 00:00:00 2001 From: Adrian Flores Cortes Date: Fri, 6 Feb 2026 10:35:45 -0600 Subject: [PATCH] [TASK-2026-02-06-ESTANDARIZACION-ESTRUCTURA-PROYECTOS] refactor: Migrate to canonical apps/ structure (ADR-0011) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - backend/ → apps/backend/, database/ → apps/database/, mobile/ → apps/frontend-mobile/ - Updated .gitmodules, docker-compose.yml, CLAUDE.md v1.0.0 - Added apps/_MAP.md Co-Authored-By: Claude Opus 4.6 --- .gitmodules | 6 +-- CLAUDE.md | 39 +++++++++++++++---- apps/_MAP.md | 28 +++++++++++++ backend => apps/backend | 0 database => apps/database | 0 mobile => apps/frontend-mobile | 0 docker-compose.yml | 2 +- orchestration/00-guidelines/HERENCIA-SIMCO.md | 2 +- 8 files changed, 65 insertions(+), 12 deletions(-) create mode 100644 apps/_MAP.md rename backend => apps/backend (100%) rename database => apps/database (100%) rename mobile => apps/frontend-mobile (100%) diff --git a/.gitmodules b/.gitmodules index 3806f74..f965110 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,11 +1,11 @@ [submodule "backend"] - path = backend + path = apps/backend url = git@gitea-server:rckrdmrd/miinventario-backend-v2.git [submodule "database"] - path = database + path = apps/database url = git@gitea-server:rckrdmrd/miinventario-database-v2.git [submodule "mobile"] - path = mobile + path = apps/frontend-mobile url = git@gitea-server:rckrdmrd/miinventario-mobile-v2.git diff --git a/CLAUDE.md b/CLAUDE.md index 1f02fd7..33398c7 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -4,8 +4,9 @@ **Sistema:** SIMCO v4.0.0 + NEXUS v4.0 **Proyecto:** miinventario **Tipo:** CONSUMER -**Versión:** 0.1.0 -**Actualizado:** 2026-02-02 +**Versión:** 1.0.0 +**Actualizado:** 2026-02-06 +**ADR Vinculante:** ADR-0011 (Estructura Canonica apps/) --- @@ -16,26 +17,50 @@ Para reglas base, ver: `../../CLAUDE.md` --- -## DESCRIPCIÓN DEL PROYECTO +## DESCRIPCION DEL PROYECTO -Sistema de gestión de inventarios. +Sistema de gestion de inventarios con app movil. --- -## STACK TECNOLÓGICO +## STACK TECNOLOGICO - Backend: [A definir] -- Frontend: [A definir] +- Mobile: React Native - Database: PostgreSQL --- +## ESTRUCTURA CANONICA (ADR-0011) + +``` +miinventario/ +├── apps/ # Contenedor canonico de aplicaciones +│ ├── backend/ # API (submodule → miinventario-backend-v2) +│ ├── frontend-mobile/ # React Native (submodule → miinventario-mobile-v2) +│ ├── database/ # DDL PostgreSQL (submodule → miinventario-database-v2) +│ └── _MAP.md # Indice de aplicaciones +├── orchestration/ # Sistema SIMCO local +├── docs/ # Documentacion +├── .claude/ # Instrucciones Claude Code +└── .gitmodules # 3 submodules en apps/ +``` + +**IMPORTANTE:** Todo desarrollo nuevo DEBE ir dentro de `apps/`. No crear archivos en raiz. + +--- + ## ALIAS LOCALES | Alias | Ruta | |-------|------| | @LOCAL-ORCHESTRATION | orchestration/ | +| @BACKEND | apps/backend/ | +| @MOBILE | apps/frontend-mobile/ | +| @DDL | apps/database/ | +| @APPS-MAP | apps/_MAP.md | --- -**Sistema:** SIMCO v4.0.0 | **Tipo:** Instrucciones de Proyecto +*Mi Inventario 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 0000000..8da1504 --- /dev/null +++ b/apps/_MAP.md @@ -0,0 +1,28 @@ +# _MAP: Aplicaciones de miinventario + +**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 | [A definir] | Planificado | Submodule (miinventario-backend-v2) | +| **Frontend Mobile** | `apps/frontend-mobile/` | Mobile App | React Native | Planificado | Submodule (miinventario-mobile-v2) | +| **Database** | `apps/database/` | DDL | PostgreSQL 15+ | Activo | Submodule (miinventario-database-v2) | + +--- + +## Notas + +- Migrado a estructura apps/ canonica (ADR-0011) 2026-02-06 +- No tiene frontend-web (solo mobile) +- 3 submodulos git separados (POLYREPO) + +--- + +*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/docker-compose.yml b/docker-compose.yml index 7ef7cdb..3de383c 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -14,7 +14,7 @@ services: - "5433:5432" volumes: - miinventario_postgres_data:/var/lib/postgresql/data - - ./database/schemas:/docker-entrypoint-initdb.d:ro + - ./apps/database/schemas:/docker-entrypoint-initdb.d:ro healthcheck: test: ["CMD-SHELL", "pg_isready -U postgres"] interval: 10s diff --git a/orchestration/00-guidelines/HERENCIA-SIMCO.md b/orchestration/00-guidelines/HERENCIA-SIMCO.md index 5c92b72..238a30e 100644 --- a/orchestration/00-guidelines/HERENCIA-SIMCO.md +++ b/orchestration/00-guidelines/HERENCIA-SIMCO.md @@ -40,7 +40,7 @@ | SIMCO-BACKEND.md | Operaciones NestJS | | SIMCO-FRONTEND.md | Operaciones React/RN | | SIMCO-INVENTARIOS.md | Gestionar inventarios | -| SIMCO-ESTRUCTURA-DOCS.md | Estructura de documentacion | +| SIMCO-FRONTMATTER-SCHEMA.md | Estructura de documentacion (frontmatter) | | SIMCO-INTEGRACIONES-EXTERNAS.md | Integraciones externas | ---