From 56f5b28b870486fa2d78398f6dd5a08271b24b59 Mon Sep 17 00:00:00 2001 From: rckrdmrd Date: Fri, 16 Jan 2026 04:21:07 -0600 Subject: [PATCH] [INTEGRATION] F5: Crear _definitions/ y _quick/ (independiente, 21 tablas) Co-Authored-By: Claude Opus 4.5 --- docs/_MAP.md | 64 +++++- docs/_definitions/DATABASE-SCHEMA.md | 315 ++++++++++++++++++++++++++ docs/_definitions/ENTITIES-CATALOG.md | 153 +++++++++++++ docs/_definitions/MODULES-CATALOG.md | 201 ++++++++++++++++ docs/_definitions/SERVICES-CATALOG.md | 153 +++++++++++++ docs/_definitions/_INDEX.yml | 88 +++++++ docs/_quick/QUICK-API.yml | 237 +++++++++++++++++++ docs/_quick/QUICK-DATABASE.yml | 175 ++++++++++++++ docs/_quick/QUICK-INDEX.yml | 102 +++++++++ docs/_quick/QUICK-MODULES.yml | 166 ++++++++++++++ orchestration/DEPENDENCY-GRAPH.yml | 287 +++++++++++++++++++++++ orchestration/TRACEABILITY.yml | 295 ++++++++++++++++++++++++ orchestration/_refs/WS-REFERENCES.yml | 118 ++++++++++ 13 files changed, 2346 insertions(+), 8 deletions(-) create mode 100644 docs/_definitions/DATABASE-SCHEMA.md create mode 100644 docs/_definitions/ENTITIES-CATALOG.md create mode 100644 docs/_definitions/MODULES-CATALOG.md create mode 100644 docs/_definitions/SERVICES-CATALOG.md create mode 100644 docs/_definitions/_INDEX.yml create mode 100644 docs/_quick/QUICK-API.yml create mode 100644 docs/_quick/QUICK-DATABASE.yml create mode 100644 docs/_quick/QUICK-INDEX.yml create mode 100644 docs/_quick/QUICK-MODULES.yml create mode 100644 orchestration/DEPENDENCY-GRAPH.yml create mode 100644 orchestration/TRACEABILITY.yml create mode 100644 orchestration/_refs/WS-REFERENCES.yml diff --git a/docs/_MAP.md b/docs/_MAP.md index 4dac4e9..0ce4fa7 100644 --- a/docs/_MAP.md +++ b/docs/_MAP.md @@ -4,9 +4,9 @@ id: MAP-DOCS-MII type: Index status: Published -version: "1.0.0" +version: "1.1.0" created_date: 2026-01-10 -updated_date: 2026-01-10 +updated_date: 2026-01-16 simco_version: "4.0.0" --- @@ -29,6 +29,19 @@ simco_version: "4.0.0" ``` docs/ │ +├── _definitions/ # DEFINICIONES CANONICAS +│ ├── _INDEX.yml # Indice de definiciones (@PROJ_DEF_INDEX) +│ ├── DATABASE-SCHEMA.md # Schema BD (@PROJ_DEF_DB) +│ ├── ENTITIES-CATALOG.md # Entidades (@PROJ_DEF_ENTITIES) +│ ├── SERVICES-CATALOG.md # Servicios (@PROJ_DEF_SERVICES) +│ └── MODULES-CATALOG.md # Modulos (@PROJ_DEF_MODULES) +│ +├── _quick/ # NAVEGACION RAPIDA +│ ├── QUICK-INDEX.yml # Indice rapido (@PROJ_QUICK_INDEX) +│ ├── QUICK-API.yml # API endpoints (@PROJ_QUICK_API) +│ ├── QUICK-DATABASE.yml # BD rapido (@PROJ_QUICK_DATABASE) +│ └── QUICK-MODULES.yml # Modulos rapido (@PROJ_QUICK_MODULES) +│ ├── 00-vision-general/ # VISION Y CONTEXTO │ ├── _MAP.md # Indice de vision │ ├── VISION-PROYECTO.md # Propuesta de valor @@ -174,11 +187,45 @@ docs/ ## Fuentes Canonicas -| Tema | Fuente Canonica | NO buscar en | -|------|-----------------|--------------| -| Schema BD | 02-especificaciones/ARQUITECTURA-DATABASE.md | Otros docs | -| Requerimientos | 00-vision-general/REQUERIMIENTOS-FUNCIONALES.md | Epicas | -| Stack | 00-vision-general/ARQUITECTURA-TECNICA.md | Epicas | +| Tema | Fuente Canonica | Alias | NO buscar en | +|------|-----------------|-------|--------------| +| Schema BD | _definitions/DATABASE-SCHEMA.md | @PROJ_DEF_DB | Otros docs | +| Entities | _definitions/ENTITIES-CATALOG.md | @PROJ_DEF_ENTITIES | Inventarios | +| Services | _definitions/SERVICES-CATALOG.md | @PROJ_DEF_SERVICES | Inventarios | +| Modules | _definitions/MODULES-CATALOG.md | @PROJ_DEF_MODULES | Inventarios | +| Requerimientos | 00-vision-general/REQUERIMIENTOS-FUNCIONALES.md | - | Epicas | +| Stack | 00-vision-general/ARQUITECTURA-TECNICA.md | - | Epicas | + +--- + +## Navegacion Rapida (_quick/) + +| Archivo | Alias | Descripcion | +|---------|-------|-------------| +| QUICK-INDEX.yml | @PROJ_QUICK_INDEX | Punto de entrada rapido | +| QUICK-API.yml | @PROJ_QUICK_API | 61 endpoints documentados | +| QUICK-DATABASE.yml | @PROJ_QUICK_DATABASE | 21 tablas, 14 enums | +| QUICK-MODULES.yml | @PROJ_QUICK_MODULES | 14 modulos implementados | + +### Atajos por Rol + +| Rol | Archivos Clave | +|-----|----------------| +| Backend Dev | ENTITIES-CATALOG.md, SERVICES-CATALOG.md, QUICK-API.yml | +| Mobile Dev | QUICK-API.yml, FRONTEND_INVENTORY.yml | +| DBA | DATABASE-SCHEMA.md, QUICK-DATABASE.yml | +| Architect | MODULES-CATALOG.md, DEPENDENCY-GRAPH.yml | + +--- + +## Orchestration + +| Archivo | Descripcion | +|---------|-------------| +| orchestration/_refs/WS-REFERENCES.yml | Referencias a workspace (nivel=0) | +| orchestration/DEPENDENCY-GRAPH.yml | Grafo de dependencias | +| orchestration/TRACEABILITY.yml | Trazabilidad epicas-modulos-objetos | +| orchestration/inventarios/MASTER_INVENTORY.yml | Inventario maestro | --- @@ -201,8 +248,9 @@ docs/ | Fecha | Version | Cambios | |-------|---------|---------| | 2026-01-10 | 1.0.0 | Creacion inicial del mapa | +| 2026-01-16 | 1.1.0 | Agregadas estructuras _definitions/ y _quick/ | --- -**Ultima Actualizacion:** 2026-01-10 +**Ultima Actualizacion:** 2026-01-16 **Autor:** Agente Orquestador diff --git a/docs/_definitions/DATABASE-SCHEMA.md b/docs/_definitions/DATABASE-SCHEMA.md new file mode 100644 index 0000000..dbeba31 --- /dev/null +++ b/docs/_definitions/DATABASE-SCHEMA.md @@ -0,0 +1,315 @@ +# Database Schema - MiInventario + +**Alias:** @PROJ_DEF_DB +**Version:** 1.0.0 +**Ultima actualizacion:** 2026-01-16 + +--- + +## 1. RESUMEN + +| Metrica | Valor | +|---------|-------| +| **Total Schemas** | 1 (public) | +| **Total Tablas** | 21 | +| **Total ENUMs** | 14 | +| **Total Indices** | 17 | +| **Total Foreign Keys** | 13 | + +--- + +## 2. SCHEMAS + +### 2.1 Schema: public + +```yaml +tablas: + # Core + - users + - stores + - store_users + + # Videos e Inventario + - videos + - inventory_items + + # Creditos y Pagos + - credit_balances + - credit_packages + - credit_transactions + - payments + + # Sistema + - referrals + - notifications + - otps + - refresh_tokens + + # Admin + - audit_logs + - promotions + - ia_providers + + # Feedback + - corrections + - ground_truth + - product_submissions + - validation_requests + - validation_responses +``` + +--- + +## 3. TABLAS PRINCIPALES + +### 3.1 users + +```yaml +tabla: "users" +schema: "public" +descripcion: "Usuarios del sistema" +columnas: + - nombre: "id" + tipo: "UUID" + pk: true + - nombre: "phone" + tipo: "varchar(20)" + unique: true + - nombre: "email" + tipo: "varchar(255)" + unique: true + - nombre: "passwordHash" + tipo: "varchar(255)" + - nombre: "name" + tipo: "varchar(100)" + - nombre: "businessName" + tipo: "varchar(100)" + - nombre: "role" + tipo: "users_role_enum" + - nombre: "isActive" + tipo: "boolean" + - nombre: "fcmToken" + tipo: "varchar(255)" + - nombre: "stripeCustomerId" + tipo: "varchar(100)" + - nombre: "createdAt" + tipo: "timestamp" + - nombre: "updatedAt" + tipo: "timestamp" +``` + +### 3.2 stores + +```yaml +tabla: "stores" +schema: "public" +descripcion: "Tiendas de usuarios" +columnas: + - nombre: "id" + tipo: "UUID" + pk: true + - nombre: "ownerId" + tipo: "UUID" + fk: "users.id" + - nombre: "name" + tipo: "varchar(100)" + - nombre: "giro" + tipo: "varchar(50)" + - nombre: "address" + tipo: "varchar(255)" + - nombre: "settings" + tipo: "jsonb" + - nombre: "isActive" + tipo: "boolean" +``` + +### 3.3 videos + +```yaml +tabla: "videos" +schema: "public" +descripcion: "Videos subidos para procesamiento" +columnas: + - nombre: "id" + tipo: "UUID" + pk: true + - nombre: "storeId" + tipo: "UUID" + fk: "stores.id" + - nombre: "uploadedById" + tipo: "UUID" + fk: "users.id" + - nombre: "fileName" + tipo: "varchar(255)" + - nombre: "s3Key" + tipo: "varchar(500)" + - nombre: "status" + tipo: "videos_status_enum" + - nombre: "itemsDetected" + tipo: "integer" + - nombre: "creditsUsed" + tipo: "integer" +``` + +### 3.4 inventory_items + +```yaml +tabla: "inventory_items" +schema: "public" +descripcion: "Items de inventario detectados" +columnas: + - nombre: "id" + tipo: "UUID" + pk: true + - nombre: "storeId" + tipo: "UUID" + fk: "stores.id" + - nombre: "detectedByVideoId" + tipo: "UUID" + fk: "videos.id" + - nombre: "name" + tipo: "varchar(255)" + - nombre: "category" + tipo: "varchar(100)" + - nombre: "quantity" + tipo: "integer" + - nombre: "detectionConfidence" + tipo: "decimal(5,2)" +indices: + - columnas: [storeId, name] + - columnas: [storeId, category] + - columnas: [storeId, barcode] +``` + +### 3.5 credit_balances + +```yaml +tabla: "credit_balances" +schema: "public" +descripcion: "Saldos de creditos por usuario" +columnas: + - nombre: "id" + tipo: "UUID" + pk: true + - nombre: "userId" + tipo: "UUID" + fk: "users.id" + unique: true + - nombre: "balance" + tipo: "integer" + - nombre: "totalPurchased" + tipo: "integer" + - nombre: "totalConsumed" + tipo: "integer" + - nombre: "totalFromReferrals" + tipo: "integer" +``` + +### 3.6 payments + +```yaml +tabla: "payments" +schema: "public" +descripcion: "Pagos de usuarios" +columnas: + - nombre: "id" + tipo: "UUID" + pk: true + - nombre: "userId" + tipo: "UUID" + fk: "users.id" + - nombre: "packageId" + tipo: "UUID" + fk: "credit_packages.id" + - nombre: "amountMXN" + tipo: "decimal(10,2)" + - nombre: "creditsGranted" + tipo: "integer" + - nombre: "method" + tipo: "payments_method_enum" + - nombre: "status" + tipo: "payments_status_enum" + - nombre: "externalId" + tipo: "varchar(255)" +indices: + - columnas: [userId, createdAt] + - columnas: [status, createdAt] + - columnas: [externalId] +``` + +--- + +## 4. ENUMS + +```yaml +enums: + users_role_enum: + valores: [USER, VIEWER, MODERATOR, ADMIN, SUPER_ADMIN] + + videos_status_enum: + valores: [PENDING, UPLOADING, UPLOADED, PROCESSING, COMPLETED, FAILED] + + store_users_role_enum: + valores: [OWNER, OPERATOR] + + referrals_status_enum: + valores: [PENDING, REGISTERED, QUALIFIED, REWARDED] + + payments_method_enum: + valores: [CARD, OXXO, 7ELEVEN] + + payments_status_enum: + valores: [PENDING, PROCESSING, COMPLETED, FAILED, REFUNDED, EXPIRED] + + notifications_type_enum: + valores: [VIDEO_PROCESSING_COMPLETE, VIDEO_PROCESSING_FAILED, LOW_CREDITS, PAYMENT_COMPLETE, PAYMENT_FAILED, REFERRAL_BONUS, PROMO, SYSTEM] + + credit_transactions_type_enum: + valores: [PURCHASE, CONSUMPTION, REFERRAL_BONUS, PROMO, REFUND] + + otps_purpose_enum: + valores: [REGISTRATION, LOGIN, PASSWORD_RESET] + + corrections_type_enum: + valores: [NAME, CATEGORY, QUANTITY, PRICE, BARCODE, IMAGE, OTHER] + + ground_truth_status_enum: + valores: [PENDING, VERIFIED, REJECTED, NEEDS_REVIEW] + + product_submissions_status_enum: + valores: [PENDING, APPROVED, REJECTED, NEEDS_INFO] + + promotions_type_enum: + valores: [PERCENTAGE, FIXED_AMOUNT, CREDITS_BONUS, FREE_CREDITS] +``` + +--- + +## 5. DIAGRAMA DE RELACIONES + +``` + users + / | \ + / | \ + stores credit_balances referrals + | | + store_users credit_transactions + | + videos -----> inventory_items + | | + +------> corrections + | + ground_truth +``` + +--- + +## 6. REFERENCIAS + +- Inventario detallado: `orchestration/inventarios/DATABASE_INVENTORY.yml` +- Entities: Ver @PROJ_DEF_ENTITIES +- Migraciones: `apps/backend/src/migrations/` + +--- + +*Generado: 2026-01-16* diff --git a/docs/_definitions/ENTITIES-CATALOG.md b/docs/_definitions/ENTITIES-CATALOG.md new file mode 100644 index 0000000..581bbd7 --- /dev/null +++ b/docs/_definitions/ENTITIES-CATALOG.md @@ -0,0 +1,153 @@ +# Entities Catalog - MiInventario + +**Alias:** @PROJ_DEF_ENTITIES +**Version:** 1.0.0 +**Ultima actualizacion:** 2026-01-16 + +--- + +## 1. RESUMEN + +| Metrica | Valor | +|---------|-------| +| **Total Entities** | 21 | +| **Por Modulo** | Ver seccion 2 | + +--- + +## 2. ENTITIES POR MODULO + +### 2.1 Modulo: Auth + +| Entity | Archivo | Tabla BD | Descripcion | +|--------|---------|----------|-------------| +| Otp | `auth/entities/otp.entity.ts` | otps | Codigos OTP para verificacion | +| RefreshToken | `auth/entities/refresh-token.entity.ts` | refresh_tokens | Tokens de refresco JWT | + +### 2.2 Modulo: Users + +| Entity | Archivo | Tabla BD | Descripcion | +|--------|---------|----------|-------------| +| User | `users/entities/user.entity.ts` | users | Usuarios del sistema | + +### 2.3 Modulo: Stores + +| Entity | Archivo | Tabla BD | Descripcion | +|--------|---------|----------|-------------| +| Store | `stores/entities/store.entity.ts` | stores | Tiendas de usuarios | +| StoreUser | `stores/entities/store-user.entity.ts` | store_users | Relacion usuarios-tiendas | + +### 2.4 Modulo: Inventory + +| Entity | Archivo | Tabla BD | Descripcion | +|--------|---------|----------|-------------| +| InventoryItem | `inventory/entities/inventory-item.entity.ts` | inventory_items | Items de inventario detectados | + +### 2.5 Modulo: Videos + +| Entity | Archivo | Tabla BD | Descripcion | +|--------|---------|----------|-------------| +| Video | `videos/entities/video.entity.ts` | videos | Videos subidos para procesamiento | + +### 2.6 Modulo: Credits + +| Entity | Archivo | Tabla BD | Descripcion | +|--------|---------|----------|-------------| +| CreditBalance | `credits/entities/credit-balance.entity.ts` | credit_balances | Saldos de creditos | +| CreditPackage | `credits/entities/credit-package.entity.ts` | credit_packages | Paquetes disponibles | +| CreditTransaction | `credits/entities/credit-transaction.entity.ts` | credit_transactions | Transacciones | + +### 2.7 Modulo: Payments + +| Entity | Archivo | Tabla BD | Descripcion | +|--------|---------|----------|-------------| +| Payment | `payments/entities/payment.entity.ts` | payments | Pagos de usuarios | + +### 2.8 Modulo: Referrals + +| Entity | Archivo | Tabla BD | Descripcion | +|--------|---------|----------|-------------| +| Referral | `referrals/entities/referral.entity.ts` | referrals | Sistema de referidos | + +### 2.9 Modulo: Notifications + +| Entity | Archivo | Tabla BD | Descripcion | +|--------|---------|----------|-------------| +| Notification | `notifications/entities/notification.entity.ts` | notifications | Notificaciones | + +### 2.10 Modulo: Admin + +| Entity | Archivo | Tabla BD | Descripcion | +|--------|---------|----------|-------------| +| AuditLog | `admin/entities/audit-log.entity.ts` | audit_logs | Registros de auditoria | +| Promotion | `admin/entities/promotion.entity.ts` | promotions | Promociones | +| IaProvider | `admin/entities/ia-provider.entity.ts` | ia_providers | Proveedores de IA | + +### 2.11 Modulo: Feedback + +| Entity | Archivo | Tabla BD | Descripcion | +|--------|---------|----------|-------------| +| Correction | `feedback/entities/correction.entity.ts` | corrections | Correcciones de usuarios | +| GroundTruth | `feedback/entities/ground-truth.entity.ts` | ground_truth | Datos verificados | +| ProductSubmission | `feedback/entities/product-submission.entity.ts` | product_submissions | Productos enviados | + +### 2.12 Modulo: Validations + +| Entity | Archivo | Tabla BD | Descripcion | +|--------|---------|----------|-------------| +| ValidationRequest | `validations/entities/validation-request.entity.ts` | validation_requests | Solicitudes de validacion | +| ValidationResponse | `validations/entities/validation-response.entity.ts` | validation_responses | Respuestas de validacion | + +--- + +## 3. RELACIONES ENTRE ENTITIES + +```yaml +relaciones: + User: + has_many: [RefreshToken, Store, StoreUser, Video, CreditTransaction, Payment, Referral, Notification, Correction, AuditLog] + has_one: [CreditBalance] + + Store: + belongs_to: [User] + has_many: [StoreUser, Video, InventoryItem] + + Video: + belongs_to: [Store, User] + has_many: [InventoryItem] + + InventoryItem: + belongs_to: [Store, Video] + has_many: [Correction] + + CreditBalance: + belongs_to: [User] + + CreditTransaction: + belongs_to: [User] + + Payment: + belongs_to: [User, CreditPackage] + + Referral: + belongs_to: [User (referrer), User (referred)] + + ValidationRequest: + belongs_to: [Video, InventoryItem] + has_many: [ValidationResponse] + + ValidationResponse: + belongs_to: [ValidationRequest, IaProvider] +``` + +--- + +## 4. REFERENCIAS + +- Database Schema: @PROJ_DEF_DB +- Services: @PROJ_DEF_SERVICES +- Ubicacion: `apps/backend/src/modules/*/entities/` + +--- + +*Generado: 2026-01-16* diff --git a/docs/_definitions/MODULES-CATALOG.md b/docs/_definitions/MODULES-CATALOG.md new file mode 100644 index 0000000..0535e85 --- /dev/null +++ b/docs/_definitions/MODULES-CATALOG.md @@ -0,0 +1,201 @@ +# Modules Catalog - MiInventario + +**Alias:** @PROJ_DEF_MODULES +**Version:** 1.0.0 +**Ultima actualizacion:** 2026-01-16 + +--- + +## 1. RESUMEN + +| Metrica | Valor | +|---------|-------| +| **Total Modulos** | 14 | +| **Implementados** | 14 | +| **En Desarrollo** | 0 | + +--- + +## 2. INDICE DE MODULOS + +### 2.1 Modulos Core (Fundacionales) + +| ID | Nombre | Estado | Endpoints | Descripcion | +|----|--------|--------|-----------|-------------| +| MII-MOD-001 | Auth | Implementado | 5 | Autenticacion JWT, OTP | +| MII-MOD-002 | Users | Implementado | 3 | Gestion de usuarios | +| MII-MOD-003 | Stores | Implementado | 5 | Tiendas multi-tenant | +| MII-MOD-004 | Health | Implementado | 2 | Health checks | + +### 2.2 Modulos de Negocio + +| ID | Nombre | Estado | Endpoints | Descripcion | +|----|--------|--------|-----------|-------------| +| MII-MOD-005 | Inventory | Implementado | 7 | Gestion de inventario | +| MII-MOD-006 | Videos | Implementado | - | Captura y procesamiento (interno) | +| MII-MOD-007 | Credits | Implementado | 3 | Sistema de creditos | +| MII-MOD-008 | Payments | Implementado | 4 | Procesamiento de pagos | +| MII-MOD-009 | Referrals | Implementado | 5 | Sistema de referidos | + +### 2.3 Modulos de Soporte + +| ID | Nombre | Estado | Endpoints | Descripcion | +|----|--------|--------|-----------|-------------| +| MII-MOD-010 | Notifications | Implementado | 5 | Notificaciones push | +| MII-MOD-011 | IA Provider | Implementado | - | Multi-proveedor IA (interno) | +| MII-MOD-012 | Admin | Implementado | 17 | Panel de administracion | +| MII-MOD-013 | Feedback | Implementado | 6 | Sistema de feedback | +| MII-MOD-014 | Validations | Implementado | 4 | Validaciones IA | + +--- + +## 3. DETALLE POR MODULO + +### MII-MOD-001: Auth + +```yaml +modulo: + id: "MII-MOD-001" + nombre: "Authentication" + estado: "implementado" + version: "1.0.0" + + documentacion: + epica: "MII-002" + descripcion: "Autenticacion JWT con OTP para verificacion" + + objetos: + tablas: [otps, refresh_tokens] + entities: [Otp, RefreshToken] + services: [AuthService] + controllers: [AuthController] + guards: [JwtAuthGuard] + strategies: [JwtStrategy] + + endpoints: + - POST /auth/register + - POST /auth/verify-otp + - POST /auth/login + - POST /auth/refresh + - POST /auth/logout + + dependencias: + modulos: [users] + externos: [JWT, bcrypt] +``` + +### MII-MOD-005: Inventory + +```yaml +modulo: + id: "MII-MOD-005" + nombre: "Inventory" + estado: "implementado" + version: "1.0.0" + + documentacion: + epica: "MII-006" + descripcion: "Gestion de items de inventario detectados por IA" + + objetos: + tablas: [inventory_items] + entities: [InventoryItem] + services: [InventoryService] + controllers: [InventoryController] + + endpoints: + - GET /stores/:storeId/inventory + - GET /stores/:storeId/inventory/statistics + - GET /stores/:storeId/inventory/low-stock + - GET /stores/:storeId/inventory/categories + - GET /stores/:storeId/inventory/:itemId + - PATCH /stores/:storeId/inventory/:itemId + - DELETE /stores/:storeId/inventory/:itemId + + dependencias: + modulos: [auth, stores] + externos: [] +``` + +### MII-MOD-012: Admin + +```yaml +modulo: + id: "MII-MOD-012" + nombre: "Admin" + estado: "implementado" + version: "1.0.0" + + documentacion: + epica: "MII-015" + descripcion: "Panel de administracion SaaS" + + objetos: + tablas: [audit_logs, promotions, ia_providers] + entities: [AuditLog, Promotion, IaProvider] + services: + - DashboardService + - ModerationService + - PackagesService + - PromotionsService + - ProvidersService + - AuditLogService + controllers: [AdminController] + + endpoints: + - GET /admin/dashboard + - GET /admin/dashboard/stats + - GET /admin/moderation + - PATCH /admin/moderation/:id + - GET /admin/packages + - POST /admin/packages + - PATCH /admin/packages/:id + - DELETE /admin/packages/:id + - GET /admin/promotions + - POST /admin/promotions + - PATCH /admin/promotions/:id + - DELETE /admin/promotions/:id + - GET /admin/providers + - PATCH /admin/providers/:id + - GET /admin/audit-log + - GET /admin/audit-log/:id + - GET /admin/users + + dependencias: + modulos: [auth, users] + externos: [] +``` + +--- + +## 4. MATRIZ DE DEPENDENCIAS + +``` + Auth Users Stores Inventory Videos Credits Payments Referrals Notif IAP Admin Feedback Valid +Auth - +Users x - +Stores x x - +Inventory x x - +Videos x x x - +Credits x x - +Payments x x x - +Referrals x x x - +Notifications x x - +IA Provider - +Admin x x - +Feedback x x x - +Validations x x x - +``` + +--- + +## 5. REFERENCIAS + +- Database: @PROJ_DEF_DB +- Entities: @PROJ_DEF_ENTITIES +- Services: @PROJ_DEF_SERVICES +- Navegacion rapida: @PROJ_QUICK_MODULES + +--- + +*Generado: 2026-01-16* diff --git a/docs/_definitions/SERVICES-CATALOG.md b/docs/_definitions/SERVICES-CATALOG.md new file mode 100644 index 0000000..f274364 --- /dev/null +++ b/docs/_definitions/SERVICES-CATALOG.md @@ -0,0 +1,153 @@ +# Services Catalog - MiInventario + +**Alias:** @PROJ_DEF_SERVICES +**Version:** 1.0.0 +**Ultima actualizacion:** 2026-01-16 + +--- + +## 1. RESUMEN + +| Metrica | Valor | +|---------|-------| +| **Total Services** | 16 | +| **Por Modulo** | Ver seccion 2 | + +--- + +## 2. SERVICES POR MODULO + +### 2.1 Modulo: Auth + +| Service | Archivo | Dependencias | Descripcion | +|---------|---------|--------------|-------------| +| AuthService | `auth.service.ts` | JwtService, UsersService | Autenticacion JWT, OTP, login | + +### 2.2 Modulo: Users + +| Service | Archivo | Dependencias | Descripcion | +|---------|---------|--------------|-------------| +| UsersService | `users.service.ts` | UserRepository | Gestion de usuarios y perfiles | + +### 2.3 Modulo: Stores + +| Service | Archivo | Dependencias | Descripcion | +|---------|---------|--------------|-------------| +| StoresService | `stores.service.ts` | StoreRepository, StoreUserRepository | Gestion de tiendas multi-tenant | + +### 2.4 Modulo: Inventory + +| Service | Archivo | Dependencias | Descripcion | +|---------|---------|--------------|-------------| +| InventoryService | `inventory.service.ts` | InventoryItemRepository | Gestion de items de inventario | + +### 2.5 Modulo: Videos + +| Service | Archivo | Dependencias | Descripcion | +|---------|---------|--------------|-------------| +| VideosService | `videos.service.ts` | VideoRepository, S3, IaProviderService | Upload y procesamiento de videos | + +### 2.6 Modulo: Credits + +| Service | Archivo | Dependencias | Descripcion | +|---------|---------|--------------|-------------| +| CreditsService | `credits.service.ts` | CreditBalanceRepository, CreditTransactionRepository | Sistema de creditos | + +### 2.7 Modulo: Payments + +| Service | Archivo | Dependencias | Descripcion | +|---------|---------|--------------|-------------| +| PaymentsService | `payments.service.ts` | PaymentRepository, CreditsService, Stripe | Procesamiento de pagos | + +### 2.8 Modulo: Referrals + +| Service | Archivo | Dependencias | Descripcion | +|---------|---------|--------------|-------------| +| ReferralsService | `referrals.service.ts` | ReferralRepository, CreditsService | Sistema de referidos | + +### 2.9 Modulo: Notifications + +| Service | Archivo | Dependencias | Descripcion | +|---------|---------|--------------|-------------| +| NotificationsService | `notifications.service.ts` | NotificationRepository, FCM | Notificaciones push | + +### 2.10 Modulo: IA Provider + +| Service | Archivo | Dependencias | Descripcion | +|---------|---------|--------------|-------------| +| IaProviderService | `ia-provider.service.ts` | OpenAI, Anthropic | Abstraccion multi-proveedor IA | + +### 2.11 Modulo: Admin + +| Service | Archivo | Dependencias | Descripcion | +|---------|---------|--------------|-------------| +| DashboardService | `services/dashboard.service.ts` | Multiple repositories | Dashboard de metricas | +| ModerationService | `services/moderation.service.ts` | ProductSubmissionRepository | Moderacion de contenido | +| PackagesService | `services/packages.service.ts` | CreditPackageRepository | Gestion de paquetes | +| PromotionsService | `services/promotions.service.ts` | PromotionRepository | Gestion de promociones | +| ProvidersService | `services/providers.service.ts` | IaProviderRepository | Config de proveedores IA | +| AuditLogService | `services/audit-log.service.ts` | AuditLogRepository | Registro de auditoria | + +### 2.12 Modulo: Feedback + +| Service | Archivo | Dependencias | Descripcion | +|---------|---------|--------------|-------------| +| FeedbackService | `feedback.service.ts` | CorrectionRepository, GroundTruthRepository | Sistema de feedback | + +### 2.13 Modulo: Validations + +| Service | Archivo | Dependencias | Descripcion | +|---------|---------|--------------|-------------| +| ValidationsService | `validations.service.ts` | ValidationRequestRepository | Validaciones | +| ValidationEngineService | `validation-engine.service.ts` | IaProviderService | Motor de validacion | + +--- + +## 3. INYECCION DE DEPENDENCIAS + +```yaml +dependencias: + AuthService: + inyecta: + - JwtService + - UsersService + - ConfigService + inyectado_en: + - AuthController + + PaymentsService: + inyecta: + - CreditsService + - NotificationsService + - ConfigService (Stripe) + inyectado_en: + - PaymentsController + + IaProviderService: + inyecta: + - ConfigService + inyectado_en: + - VideosService + - ValidationEngineService + + CreditsService: + inyecta: + - CreditBalanceRepository + - CreditTransactionRepository + inyectado_en: + - PaymentsService + - ReferralsService + - VideosService +``` + +--- + +## 4. REFERENCIAS + +- Entities: @PROJ_DEF_ENTITIES +- Controllers: Ver documentacion API +- Ubicacion: `apps/backend/src/modules/*/` + +--- + +*Generado: 2026-01-16* diff --git a/docs/_definitions/_INDEX.yml b/docs/_definitions/_INDEX.yml new file mode 100644 index 0000000..bc6ea13 --- /dev/null +++ b/docs/_definitions/_INDEX.yml @@ -0,0 +1,88 @@ +# Indice de Definiciones del Proyecto MiInventario +# Alias: @PROJ_DEF_INDEX +# Version: 1.0.0 +# Fecha: 2026-01-16 + +version: "1.0.0" +proyecto: "miinventario" +fecha_creacion: "2026-01-16" +descripcion: "Definiciones canonicas del proyecto MiInventario" + +# ============================================================================ +# REFERENCIAS A WORKSPACE (Definiciones Globales) +# ============================================================================ +referencias_workspace: + protocolos: + CCA: "@WS_DEF_CCA" + CAPVED: "@WS_DEF_CAPVED" + + validaciones: + backend: "@WS_DEF_VAL_BE" + frontend: "@WS_DEF_VAL_FE" + ddl: "@WS_DEF_VAL_DDL" + devops: "@WS_DEF_VAL_DEVOPS" + +# ============================================================================ +# DEFINICIONES LOCALES DEL PROYECTO +# ============================================================================ +definiciones_locales: + database: + archivo: "DATABASE-SCHEMA.md" + alias: "@PROJ_DEF_DB" + descripcion: "Schema canonico de base de datos" + tablas_principales: + - users + - stores + - store_users + - videos + - inventory_items + - credit_balances + - credit_packages + - credit_transactions + - payments + - referrals + - notifications + - otps + - refresh_tokens + - audit_logs + - promotions + - ia_providers + - corrections + - ground_truth + - product_submissions + - validation_requests + - validation_responses + + entities: + archivo: "ENTITIES-CATALOG.md" + alias: "@PROJ_DEF_ENTITIES" + descripcion: "Catalogo de entidades del proyecto" + total_entities: 21 + + services: + archivo: "SERVICES-CATALOG.md" + alias: "@PROJ_DEF_SERVICES" + descripcion: "Catalogo de servicios del proyecto" + total_services: 16 + + modules: + archivo: "MODULES-CATALOG.md" + alias: "@PROJ_DEF_MODULES" + descripcion: "Catalogo de modulos del proyecto" + total_modules: 14 + +# ============================================================================ +# HERENCIA (Proyecto independiente) +# ============================================================================ +herencia: + padre: null + nivel: 0 + definiciones_heredadas: [] + +# ============================================================================ +# ESTADISTICAS +# ============================================================================ +estadisticas: + total_definiciones: 4 + total_referencias_ws: 6 + ultima_actualizacion: "2026-01-16" diff --git a/docs/_quick/QUICK-API.yml b/docs/_quick/QUICK-API.yml new file mode 100644 index 0000000..3c7c91e --- /dev/null +++ b/docs/_quick/QUICK-API.yml @@ -0,0 +1,237 @@ +# Navegacion Rapida de API - MiInventario +# Alias: @PROJ_QUICK_API +# Version: 1.0.0 +# Fecha: 2026-01-16 + +version: "1.0.0" +proyecto: "miinventario" + +# ============================================================================ +# ENDPOINTS POR MODULO +# ============================================================================ +por_modulo: + auth: + base: "/auth" + endpoints: + - { method: "POST", path: "/register", descripcion: "Iniciar registro con OTP" } + - { method: "POST", path: "/verify-otp", descripcion: "Verificar OTP y crear cuenta" } + - { method: "POST", path: "/login", descripcion: "Iniciar sesion" } + - { method: "POST", path: "/refresh", descripcion: "Renovar tokens" } + - { method: "POST", path: "/logout", descripcion: "Cerrar sesion" } + + users: + base: "/users" + endpoints: + - { method: "GET", path: "/me", descripcion: "Obtener perfil actual" } + - { method: "PATCH", path: "/me", descripcion: "Actualizar perfil" } + - { method: "PATCH", path: "/me/fcm-token", descripcion: "Actualizar FCM token" } + + stores: + base: "/stores" + endpoints: + - { method: "POST", path: "/", descripcion: "Crear tienda" } + - { method: "GET", path: "/", descripcion: "Listar tiendas" } + - { method: "GET", path: "/:id", descripcion: "Obtener tienda" } + - { method: "PATCH", path: "/:id", descripcion: "Actualizar tienda" } + - { method: "DELETE", path: "/:id", descripcion: "Eliminar tienda" } + + inventory: + base: "/stores/:storeId/inventory" + endpoints: + - { method: "GET", path: "/", descripcion: "Listar inventario" } + - { method: "GET", path: "/statistics", descripcion: "Estadisticas" } + - { method: "GET", path: "/low-stock", descripcion: "Items con stock bajo" } + - { method: "GET", path: "/categories", descripcion: "Categorias disponibles" } + - { method: "GET", path: "/:itemId", descripcion: "Obtener item" } + - { method: "PATCH", path: "/:itemId", descripcion: "Actualizar item" } + - { method: "DELETE", path: "/:itemId", descripcion: "Eliminar item" } + + credits: + base: "/credits" + endpoints: + - { method: "GET", path: "/balance", descripcion: "Obtener balance" } + - { method: "GET", path: "/transactions", descripcion: "Historial transacciones" } + - { method: "GET", path: "/packages", descripcion: "Paquetes disponibles" } + + payments: + base: "/payments" + endpoints: + - { method: "POST", path: "/", descripcion: "Crear pago" } + - { method: "GET", path: "/", descripcion: "Historial pagos" } + - { method: "GET", path: "/:paymentId", descripcion: "Detalle pago" } + - { method: "POST", path: "/webhook/stripe", descripcion: "Webhook Stripe", auth: false } + + referrals: + base: "/referrals" + endpoints: + - { method: "GET", path: "/my-code", descripcion: "Codigo personal" } + - { method: "GET", path: "/stats", descripcion: "Estadisticas referidos" } + - { method: "GET", path: "/", descripcion: "Listar referidos" } + - { method: "GET", path: "/validate", descripcion: "Validar codigo", auth: false } + - { method: "POST", path: "/apply", descripcion: "Aplicar codigo" } + + notifications: + base: "/notifications" + endpoints: + - { method: "GET", path: "/", descripcion: "Listar notificaciones" } + - { method: "GET", path: "/unread-count", descripcion: "Contar no leidas" } + - { method: "PATCH", path: "/:id/read", descripcion: "Marcar leida" } + - { method: "POST", path: "/mark-all-read", descripcion: "Marcar todas leidas" } + - { method: "POST", path: "/register-token", descripcion: "Registrar FCM token" } + + feedback: + base: "/feedback" + endpoints: + - { method: "GET", path: "/", descripcion: "Listar feedback" } + - { method: "POST", path: "/", descripcion: "Enviar feedback" } + - { method: "GET", path: "/:id", descripcion: "Obtener feedback" } + - { method: "POST", path: "/corrections", descripcion: "Enviar correccion" } + - { method: "POST", path: "/ground-truth", descripcion: "Enviar ground truth" } + - { method: "POST", path: "/product-submission", descripcion: "Enviar producto" } + + validations: + base: "/validations" + endpoints: + - { method: "POST", path: "/", descripcion: "Crear validacion" } + - { method: "GET", path: "/:id", descripcion: "Obtener validacion" } + - { method: "GET", path: "/:id/response", descripcion: "Obtener respuesta" } + + admin: + base: "/admin" + endpoints: + - { method: "GET", path: "/dashboard", descripcion: "Dashboard principal" } + - { method: "GET", path: "/dashboard/stats", descripcion: "Estadisticas" } + - { method: "GET", path: "/moderation", descripcion: "Lista moderacion" } + - { method: "PATCH", path: "/moderation/:id", descripcion: "Actualizar moderacion" } + - { method: "GET", path: "/packages", descripcion: "Listar paquetes" } + - { method: "POST", path: "/packages", descripcion: "Crear paquete" } + - { method: "PATCH", path: "/packages/:id", descripcion: "Actualizar paquete" } + - { method: "DELETE", path: "/packages/:id", descripcion: "Eliminar paquete" } + - { method: "GET", path: "/promotions", descripcion: "Listar promociones" } + - { method: "POST", path: "/promotions", descripcion: "Crear promocion" } + - { method: "PATCH", path: "/promotions/:id", descripcion: "Actualizar promocion" } + - { method: "DELETE", path: "/promotions/:id", descripcion: "Eliminar promocion" } + - { method: "GET", path: "/providers", descripcion: "Listar proveedores IA" } + - { method: "PATCH", path: "/providers/:id", descripcion: "Actualizar proveedor" } + - { method: "GET", path: "/audit-log", descripcion: "Ver audit log" } + - { method: "GET", path: "/audit-log/:id", descripcion: "Detalle audit log" } + - { method: "GET", path: "/users", descripcion: "Listar usuarios" } + + health: + base: "/health" + endpoints: + - { method: "GET", path: "/", descripcion: "Health check", auth: false } + - { method: "GET", path: "/ready", descripcion: "Readiness check", auth: false } + +# ============================================================================ +# ENDPOINTS POR METODO +# ============================================================================ +por_metodo: + GET: + - "/users/me" + - "/stores" + - "/stores/:id" + - "/stores/:storeId/inventory" + - "/stores/:storeId/inventory/statistics" + - "/stores/:storeId/inventory/low-stock" + - "/stores/:storeId/inventory/categories" + - "/stores/:storeId/inventory/:itemId" + - "/credits/balance" + - "/credits/transactions" + - "/credits/packages" + - "/payments" + - "/payments/:paymentId" + - "/referrals/my-code" + - "/referrals/stats" + - "/referrals" + - "/referrals/validate" + - "/notifications" + - "/notifications/unread-count" + - "/feedback" + - "/feedback/:id" + - "/validations/:id" + - "/validations/:id/response" + - "/admin/dashboard" + - "/admin/dashboard/stats" + - "/admin/moderation" + - "/admin/packages" + - "/admin/promotions" + - "/admin/providers" + - "/admin/audit-log" + - "/admin/audit-log/:id" + - "/admin/users" + - "/health" + - "/health/ready" + + POST: + - "/auth/register" + - "/auth/verify-otp" + - "/auth/login" + - "/auth/refresh" + - "/auth/logout" + - "/stores" + - "/payments" + - "/payments/webhook/stripe" + - "/referrals/apply" + - "/notifications/mark-all-read" + - "/notifications/register-token" + - "/feedback" + - "/feedback/corrections" + - "/feedback/ground-truth" + - "/feedback/product-submission" + - "/validations" + - "/admin/packages" + - "/admin/promotions" + + PATCH: + - "/users/me" + - "/users/me/fcm-token" + - "/stores/:id" + - "/stores/:storeId/inventory/:itemId" + - "/notifications/:id/read" + - "/admin/moderation/:id" + - "/admin/packages/:id" + - "/admin/promotions/:id" + - "/admin/providers/:id" + + DELETE: + - "/stores/:id" + - "/stores/:storeId/inventory/:itemId" + - "/admin/packages/:id" + - "/admin/promotions/:id" + +# ============================================================================ +# AUTENTICACION +# ============================================================================ +autenticacion: + tipo: "JWT Bearer" + header: "Authorization" + formato: "Bearer {token}" + endpoints_publicos: + - "/auth/register" + - "/auth/verify-otp" + - "/auth/login" + - "/auth/refresh" + - "/referrals/validate" + - "/payments/webhook/stripe" + - "/health" + - "/health/ready" + +# ============================================================================ +# ERRORES COMUNES +# ============================================================================ +errores: + 400: "Bad Request - Datos invalidos" + 401: "Unauthorized - Token invalido o expirado" + 403: "Forbidden - Sin permisos" + 404: "Not Found - Recurso no encontrado" + 422: "Unprocessable Entity - Validacion fallida" + 500: "Internal Server Error" + +# ============================================================================ +# REFERENCIAS +# ============================================================================ +referencias: + swagger: "/api/docs" + services: "@PROJ_DEF_SERVICES" + backend_inventory: "orchestration/inventarios/BACKEND_INVENTORY.yml" diff --git a/docs/_quick/QUICK-DATABASE.yml b/docs/_quick/QUICK-DATABASE.yml new file mode 100644 index 0000000..6fe4ecb --- /dev/null +++ b/docs/_quick/QUICK-DATABASE.yml @@ -0,0 +1,175 @@ +# Navegacion Rapida de Base de Datos - MiInventario +# Alias: @PROJ_QUICK_DATABASE +# Version: 1.0.0 +# Fecha: 2026-01-16 + +version: "1.0.0" +proyecto: "miinventario" + +# ============================================================================ +# SCHEMAS +# ============================================================================ +schemas: + public: + descripcion: "Schema principal (unico)" + tablas_count: 21 + tablas_principales: + - users + - stores + - videos + - inventory_items + - credit_balances + - payments + +# ============================================================================ +# TABLAS PRINCIPALES (Top 10) +# ============================================================================ +tablas_principales: + - nombre: "users" + schema: "public" + descripcion: "Usuarios del sistema" + entity: "User.entity.ts" + relaciones: ["stores", "credit_balances", "payments", "referrals", "notifications"] + + - nombre: "stores" + schema: "public" + descripcion: "Tiendas de usuarios" + entity: "Store.entity.ts" + relaciones: ["users", "store_users", "videos", "inventory_items"] + + - nombre: "videos" + schema: "public" + descripcion: "Videos subidos para procesamiento" + entity: "Video.entity.ts" + relaciones: ["stores", "users", "inventory_items"] + + - nombre: "inventory_items" + schema: "public" + descripcion: "Items de inventario detectados" + entity: "InventoryItem.entity.ts" + relaciones: ["stores", "videos", "corrections"] + + - nombre: "credit_balances" + schema: "public" + descripcion: "Saldos de creditos por usuario" + entity: "CreditBalance.entity.ts" + relaciones: ["users"] + + - nombre: "credit_transactions" + schema: "public" + descripcion: "Transacciones de creditos" + entity: "CreditTransaction.entity.ts" + relaciones: ["users"] + + - nombre: "payments" + schema: "public" + descripcion: "Pagos de usuarios" + entity: "Payment.entity.ts" + relaciones: ["users", "credit_packages"] + + - nombre: "referrals" + schema: "public" + descripcion: "Sistema de referidos" + entity: "Referral.entity.ts" + relaciones: ["users"] + + - nombre: "notifications" + schema: "public" + descripcion: "Notificaciones de usuarios" + entity: "Notification.entity.ts" + relaciones: ["users"] + + - nombre: "audit_logs" + schema: "public" + descripcion: "Registros de auditoria" + entity: "AuditLog.entity.ts" + relaciones: ["users"] + +# ============================================================================ +# BUSQUEDA RAPIDA +# ============================================================================ +busqueda: + por_modulo: + auth: ["otps", "refresh_tokens"] + users: ["users"] + stores: ["stores", "store_users"] + inventory: ["inventory_items"] + videos: ["videos"] + credits: ["credit_balances", "credit_packages", "credit_transactions"] + payments: ["payments"] + referrals: ["referrals"] + notifications: ["notifications"] + admin: ["audit_logs", "promotions", "ia_providers"] + feedback: ["corrections", "ground_truth", "product_submissions"] + validations: ["validation_requests", "validation_responses"] + + por_tipo: + catalogo: + - credit_packages + - ia_providers + transaccional: + - videos + - inventory_items + - credit_transactions + - payments + - referrals + - notifications + - corrections + - validation_requests + - validation_responses + auditoria: + - audit_logs + - ground_truth + configuracion: + - promotions + - ia_providers + +# ============================================================================ +# ENUMS IMPORTANTES +# ============================================================================ +enums: + users_role_enum: + valores: [USER, VIEWER, MODERATOR, ADMIN, SUPER_ADMIN] + uso: "Roles de usuario en el sistema" + + videos_status_enum: + valores: [PENDING, UPLOADING, UPLOADED, PROCESSING, COMPLETED, FAILED] + uso: "Estado de procesamiento de video" + + payments_method_enum: + valores: [CARD, OXXO, 7ELEVEN] + uso: "Metodo de pago" + + payments_status_enum: + valores: [PENDING, PROCESSING, COMPLETED, FAILED, REFUNDED, EXPIRED] + uso: "Estado de pago" + + credit_transactions_type_enum: + valores: [PURCHASE, CONSUMPTION, REFERRAL_BONUS, PROMO, REFUND] + uso: "Tipo de transaccion de creditos" + +# ============================================================================ +# MIGRACIONES RECIENTES +# ============================================================================ +migraciones: + ubicacion: "apps/backend/src/migrations/" + recientes: + - archivo: "1768099560565-Init.ts" + descripcion: "Creacion inicial de tablas" + fecha: "2026-01-10" + + - archivo: "1736502000000-CreateFeedbackTables.ts" + descripcion: "Tablas de feedback y correcciones" + fecha: "2026-01-10" + + - archivo: "1736600000000-CreateAdminTables.ts" + descripcion: "Tablas de administracion" + fecha: "2026-01-13" + +# ============================================================================ +# REFERENCIAS +# ============================================================================ +referencias: + schema_completo: "@PROJ_DEF_DB" + entities: "@PROJ_DEF_ENTITIES" + inventario: "orchestration/inventarios/DATABASE_INVENTORY.yml" diff --git a/docs/_quick/QUICK-INDEX.yml b/docs/_quick/QUICK-INDEX.yml new file mode 100644 index 0000000..096d020 --- /dev/null +++ b/docs/_quick/QUICK-INDEX.yml @@ -0,0 +1,102 @@ +# Indice de Navegacion Rapida - MiInventario +# Alias: @PROJ_QUICK_INDEX +# Version: 1.0.0 +# Fecha: 2026-01-16 + +version: "1.0.0" +proyecto: "miinventario" +fecha_creacion: "2026-01-16" +descripcion: "Navegacion rapida del proyecto MiInventario" + +# ============================================================================ +# PUNTO DE ENTRADA RAPIDO +# ============================================================================ +inicio_rapido: + descripcion: "Accesos directos a recursos principales" + + documentacion: + principal: "docs/README.md" + mapa: "docs/_MAP.md" + vision: "docs/00-vision-general/" + + definiciones: + indice: "docs/_definitions/_INDEX.yml" + database: "docs/_definitions/DATABASE-SCHEMA.md" + entities: "docs/_definitions/ENTITIES-CATALOG.md" + services: "docs/_definitions/SERVICES-CATALOG.md" + modules: "docs/_definitions/MODULES-CATALOG.md" + + orchestration: + indice: "orchestration/README.md" + inventarios: "orchestration/inventarios/" + trazas: "orchestration/trazas/" + context_map: "orchestration/CONTEXT-MAP.yml" + +# ============================================================================ +# INDICES RAPIDOS +# ============================================================================ +indices_rapidos: + modulos: "QUICK-MODULES.yml" + database: "QUICK-DATABASE.yml" + api: "QUICK-API.yml" + +# ============================================================================ +# ATAJOS POR ROL +# ============================================================================ +por_rol: + backend_developer: + - "docs/_definitions/ENTITIES-CATALOG.md" + - "docs/_definitions/SERVICES-CATALOG.md" + - "orchestration/inventarios/BACKEND_INVENTORY.yml" + - "docs/_quick/QUICK-API.yml" + + mobile_developer: + - "docs/_quick/QUICK-API.yml" + - "orchestration/inventarios/FRONTEND_INVENTORY.yml" + + database_admin: + - "docs/_definitions/DATABASE-SCHEMA.md" + - "docs/_quick/QUICK-DATABASE.yml" + - "orchestration/inventarios/DATABASE_INVENTORY.yml" + + architect: + - "docs/00-vision-general/ARQUITECTURA-TECNICA.md" + - "docs/_definitions/MODULES-CATALOG.md" + - "orchestration/DEPENDENCY-GRAPH.yml" + - "orchestration/CONTEXT-MAP.yml" + + product_owner: + - "docs/00-vision-general/VISION-PROYECTO.md" + - "docs/01-epicas/_MAP.md" + - "orchestration/MASTER_INVENTORY.yml" + +# ============================================================================ +# ATAJOS POR TAREA +# ============================================================================ +por_tarea: + implementar_endpoint: + - "docs/_definitions/ENTITIES-CATALOG.md" + - "docs/_definitions/SERVICES-CATALOG.md" + - "docs/_quick/QUICK-API.yml" + + crear_tabla: + - "docs/_definitions/DATABASE-SCHEMA.md" + - "docs/_quick/QUICK-DATABASE.yml" + - "orchestration/inventarios/DATABASE_INVENTORY.yml" + + agregar_modulo: + - "docs/_definitions/MODULES-CATALOG.md" + - "orchestration/inventarios/BACKEND_INVENTORY.yml" + + investigar_epica: + - "docs/01-epicas/_MAP.md" + - "docs/01-epicas/MII-*.md" + +# ============================================================================ +# REFERENCIAS A WORKSPACE +# ============================================================================ +workspace: + quick_index: "@WS_QUICK_INDEX" + definitions: "@WS_DEF_*" + catalog: "shared/catalog/" + directivas: "orchestration/directivas/" diff --git a/docs/_quick/QUICK-MODULES.yml b/docs/_quick/QUICK-MODULES.yml new file mode 100644 index 0000000..fbf3398 --- /dev/null +++ b/docs/_quick/QUICK-MODULES.yml @@ -0,0 +1,166 @@ +# Navegacion Rapida de Modulos - MiInventario +# Alias: @PROJ_QUICK_MODULES +# Version: 1.0.0 +# Fecha: 2026-01-16 + +version: "1.0.0" +proyecto: "miinventario" + +# ============================================================================ +# MODULOS POR ESTADO +# ============================================================================ +por_estado: + implementado: + - id: "MII-MOD-001" + nombre: "Auth" + ruta: "apps/backend/src/modules/auth/" + endpoints: 5 + + - id: "MII-MOD-002" + nombre: "Users" + ruta: "apps/backend/src/modules/users/" + endpoints: 3 + + - id: "MII-MOD-003" + nombre: "Stores" + ruta: "apps/backend/src/modules/stores/" + endpoints: 5 + + - id: "MII-MOD-004" + nombre: "Health" + ruta: "apps/backend/src/modules/health/" + endpoints: 2 + + - id: "MII-MOD-005" + nombre: "Inventory" + ruta: "apps/backend/src/modules/inventory/" + endpoints: 7 + + - id: "MII-MOD-006" + nombre: "Videos" + ruta: "apps/backend/src/modules/videos/" + endpoints: 0 # Servicio interno + + - id: "MII-MOD-007" + nombre: "Credits" + ruta: "apps/backend/src/modules/credits/" + endpoints: 3 + + - id: "MII-MOD-008" + nombre: "Payments" + ruta: "apps/backend/src/modules/payments/" + endpoints: 4 + + - id: "MII-MOD-009" + nombre: "Referrals" + ruta: "apps/backend/src/modules/referrals/" + endpoints: 5 + + - id: "MII-MOD-010" + nombre: "Notifications" + ruta: "apps/backend/src/modules/notifications/" + endpoints: 5 + + - id: "MII-MOD-011" + nombre: "IA Provider" + ruta: "apps/backend/src/modules/ia-provider/" + endpoints: 0 # Servicio interno + + - id: "MII-MOD-012" + nombre: "Admin" + ruta: "apps/backend/src/modules/admin/" + endpoints: 17 + + - id: "MII-MOD-013" + nombre: "Feedback" + ruta: "apps/backend/src/modules/feedback/" + endpoints: 6 + + - id: "MII-MOD-014" + nombre: "Validations" + ruta: "apps/backend/src/modules/validations/" + endpoints: 4 + + desarrollo: [] + + planificado: [] + +# ============================================================================ +# MODULOS POR CATEGORIA +# ============================================================================ +por_categoria: + foundation: + descripcion: "Modulos base del sistema" + modulos: + - { id: "MII-MOD-001", nombre: "Auth", estado: "implementado" } + - { id: "MII-MOD-002", nombre: "Users", estado: "implementado" } + - { id: "MII-MOD-003", nombre: "Stores", estado: "implementado" } + - { id: "MII-MOD-004", nombre: "Health", estado: "implementado" } + + business: + descripcion: "Modulos de negocio core" + modulos: + - { id: "MII-MOD-005", nombre: "Inventory", estado: "implementado" } + - { id: "MII-MOD-006", nombre: "Videos", estado: "implementado" } + - { id: "MII-MOD-007", nombre: "Credits", estado: "implementado" } + - { id: "MII-MOD-008", nombre: "Payments", estado: "implementado" } + - { id: "MII-MOD-009", nombre: "Referrals", estado: "implementado" } + + integration: + descripcion: "Integraciones externas" + modulos: + - { id: "MII-MOD-011", nombre: "IA Provider", estado: "implementado" } + + support: + descripcion: "Modulos de soporte" + modulos: + - { id: "MII-MOD-010", nombre: "Notifications", estado: "implementado" } + - { id: "MII-MOD-012", nombre: "Admin", estado: "implementado" } + - { id: "MII-MOD-013", nombre: "Feedback", estado: "implementado" } + - { id: "MII-MOD-014", nombre: "Validations", estado: "implementado" } + +# ============================================================================ +# BUSQUEDA RAPIDA +# ============================================================================ +busqueda: + por_epica: + MII-001: ["Health"] + MII-002: ["Auth"] + MII-003: ["Stores"] + MII-004: ["Videos"] + MII-005: ["IA Provider"] + MII-006: ["Inventory"] + MII-007: ["Feedback"] + MII-008: ["Validations"] + MII-009: ["Credits"] + MII-010: ["Credits"] + MII-011: ["Payments"] + MII-012: ["Payments"] + MII-013: ["Payments"] + MII-014: ["Referrals"] + MII-015: ["Admin"] + + por_integracion: + Stripe: ["Payments"] + Firebase_FCM: ["Notifications"] + S3_MinIO: ["Videos"] + OpenAI: ["IA Provider"] + Anthropic: ["IA Provider"] + +# ============================================================================ +# ESTADISTICAS +# ============================================================================ +estadisticas: + total_modulos: 14 + total_endpoints: 61 + total_entities: 21 + total_services: 16 + test_coverage: 90 + +# ============================================================================ +# REFERENCIAS +# ============================================================================ +referencias: + catalogo_completo: "@PROJ_DEF_MODULES" + services: "@PROJ_DEF_SERVICES" + backend_inventory: "orchestration/inventarios/BACKEND_INVENTORY.yml" diff --git a/orchestration/DEPENDENCY-GRAPH.yml b/orchestration/DEPENDENCY-GRAPH.yml new file mode 100644 index 0000000..a02a505 --- /dev/null +++ b/orchestration/DEPENDENCY-GRAPH.yml @@ -0,0 +1,287 @@ +# Grafo de Dependencias - MiInventario +# Version: 1.0.0 +# Fecha: 2026-01-16 + +version: "1.0.0" +proyecto: "miinventario" +fecha_creacion: "2026-01-16" + +# ============================================================================ +# DEPENDENCIAS EXTERNAS (NPM, etc.) +# ============================================================================ +dependencias_externas: + backend: + framework: "NestJS" + version: "^10.0.0" + principales: + - nombre: "@nestjs/core" + version: "^10.0.0" + uso: "Framework core" + - nombre: "@nestjs/typeorm" + version: "^10.0.0" + uso: "ORM integration" + - nombre: "@nestjs/jwt" + version: "^10.0.0" + uso: "JWT authentication" + - nombre: "@nestjs/bull" + version: "^10.0.0" + uso: "Queue processing" + - nombre: "stripe" + version: "^14.0.0" + uso: "Payment processing" + - nombre: "openai" + version: "^4.0.0" + uso: "AI vision processing" + - nombre: "@anthropic-ai/sdk" + version: "^0.10.0" + uso: "AI vision fallback" + - nombre: "firebase-admin" + version: "^12.0.0" + uso: "Push notifications" + - nombre: "@aws-sdk/client-s3" + version: "^3.0.0" + uso: "File storage" + + mobile: + framework: "React Native (Expo)" + version: "SDK 52" + principales: + - nombre: "expo" + version: "^52.0.0" + uso: "Mobile framework" + - nombre: "expo-router" + version: "^4.0.0" + uso: "Navigation" + - nombre: "expo-camera" + version: "^15.0.0" + uso: "Video capture" + - nombre: "zustand" + version: "^4.0.0" + uso: "State management" + - nombre: "react-query" + version: "^5.0.0" + uso: "Data fetching" + + database: + tipo: "PostgreSQL" + version: "15+" + orm: "TypeORM" + + cache: + tipo: "Redis" + version: "7+" + uso: "Bull Queue, caching" + + storage: + tipo: "S3/MinIO" + uso: "Video storage" + +# ============================================================================ +# DEPENDENCIAS INTERNAS (Entre modulos del proyecto) +# ============================================================================ +dependencias_internas: + modulos: + auth: + depende_de: [users] + dependientes: [stores, inventory, credits, payments, referrals, notifications, admin, feedback, validations] + + users: + depende_de: [] + dependientes: [auth, stores, credits, payments, referrals, notifications, admin, feedback] + + stores: + depende_de: [auth, users] + dependientes: [inventory, videos, feedback, validations] + + inventory: + depende_de: [auth, stores] + dependientes: [feedback, validations] + + videos: + depende_de: [auth, stores, credits, ia-provider] + dependientes: [inventory] + + credits: + depende_de: [auth, users] + dependientes: [payments, referrals, videos] + + payments: + depende_de: [auth, credits, notifications] + dependientes: [] + + referrals: + depende_de: [auth, users, credits] + dependientes: [] + + notifications: + depende_de: [auth, users] + dependientes: [payments] + + ia-provider: + depende_de: [] + dependientes: [videos, validations] + + admin: + depende_de: [auth, users] + dependientes: [] + + feedback: + depende_de: [auth, users, stores] + dependientes: [] + + validations: + depende_de: [auth, stores, inventory, ia-provider] + dependientes: [] + +# ============================================================================ +# DEPENDENCIAS DE WORKSPACE +# ============================================================================ +dependencias_workspace: + definiciones: + - "@WS_DEF_CCA" + - "@WS_DEF_VAL_BE" + - "@WS_DEF_VAL_FE" + + directivas: + - "SIMCO-TAREA.md" + - "SIMCO-BACKEND.md" + - "PRINCIPIO-CAPVED.md" + + catalogos: [] + +# ============================================================================ +# DEPENDENCIAS DE OTROS PROYECTOS +# ============================================================================ +dependencias_proyectos: + proyectos: [] + nota: "Proyecto independiente - no depende de otros proyectos" + +# ============================================================================ +# INTEGRACIONES EXTERNAS +# ============================================================================ +integraciones: + - nombre: "Stripe" + tipo: "payments" + modulos: [payments] + endpoints_externos: + - "api.stripe.com" + + - nombre: "OXXO (via Stripe)" + tipo: "payments" + modulos: [payments] + + - nombre: "7-Eleven" + tipo: "payments" + modulos: [payments] + estado: "planificado" + + - nombre: "Firebase FCM" + tipo: "notifications" + modulos: [notifications] + endpoints_externos: + - "fcm.googleapis.com" + + - nombre: "S3/MinIO" + tipo: "storage" + modulos: [videos] + endpoints_externos: + - "s3.amazonaws.com (prod)" + - "localhost:9000 (dev)" + + - nombre: "OpenAI GPT-4o Vision" + tipo: "ai" + modulos: [ia-provider] + endpoints_externos: + - "api.openai.com" + + - nombre: "Anthropic Claude Vision" + tipo: "ai" + modulos: [ia-provider] + endpoints_externos: + - "api.anthropic.com" + +# ============================================================================ +# GRAFO VISUAL +# ============================================================================ +grafo: + formato: "mermaid" + diagrama: | + graph TD + subgraph Foundation + AUTH[Auth] + USERS[Users] + STORES[Stores] + HEALTH[Health] + end + + subgraph Business + INV[Inventory] + VIDEOS[Videos] + CREDITS[Credits] + PAYMENTS[Payments] + REFERRALS[Referrals] + end + + subgraph Support + NOTIF[Notifications] + ADMIN[Admin] + FEEDBACK[Feedback] + VALID[Validations] + end + + subgraph Integration + IAP[IA Provider] + end + + AUTH --> USERS + STORES --> AUTH + STORES --> USERS + INV --> AUTH + INV --> STORES + VIDEOS --> AUTH + VIDEOS --> STORES + VIDEOS --> CREDITS + VIDEOS --> IAP + CREDITS --> AUTH + CREDITS --> USERS + PAYMENTS --> AUTH + PAYMENTS --> CREDITS + PAYMENTS --> NOTIF + REFERRALS --> AUTH + REFERRALS --> USERS + REFERRALS --> CREDITS + NOTIF --> AUTH + NOTIF --> USERS + ADMIN --> AUTH + ADMIN --> USERS + FEEDBACK --> AUTH + FEEDBACK --> USERS + FEEDBACK --> STORES + VALID --> AUTH + VALID --> STORES + VALID --> INV + VALID --> IAP + + subgraph External + STRIPE[Stripe] + FCM[Firebase FCM] + S3[S3/MinIO] + OPENAI[OpenAI] + CLAUDE[Anthropic] + end + + PAYMENTS --> STRIPE + NOTIF --> FCM + VIDEOS --> S3 + IAP --> OPENAI + IAP --> CLAUDE + +# ============================================================================ +# ESTADISTICAS +# ============================================================================ +estadisticas: + total_dependencias_externas: 15 + total_dependencias_internas: 25 + total_dependencias_workspace: 5 + total_integraciones: 7 + ultima_actualizacion: "2026-01-16" diff --git a/orchestration/TRACEABILITY.yml b/orchestration/TRACEABILITY.yml new file mode 100644 index 0000000..c0a68d6 --- /dev/null +++ b/orchestration/TRACEABILITY.yml @@ -0,0 +1,295 @@ +# Trazabilidad - MiInventario +# Version: 1.0.0 +# Fecha: 2026-01-16 + +version: "1.0.0" +proyecto: "miinventario" +fecha_creacion: "2026-01-16" + +# ============================================================================ +# TRAZABILIDAD EPICA -> MODULO -> OBJETOS +# ============================================================================ +trazabilidad_epicas: + MII-001: + nombre: "Infraestructura Base" + fase: 1 + modulos: [health] + objetos_bd: [] + entregables: + - docker-compose + - PostgreSQL 15 + - Redis + - MinIO + + MII-002: + nombre: "Autenticacion" + fase: 1 + modulos: [auth, users] + objetos_bd: + tablas: [users, otps, refresh_tokens] + enums: [users_role_enum, otps_purpose_enum] + objetos_backend: + entities: [User, Otp, RefreshToken] + services: [AuthService, UsersService] + controllers: [AuthController, UsersController] + guards: [JwtAuthGuard] + strategies: [JwtStrategy] + + MII-003: + nombre: "Gestion de Tiendas" + fase: 1 + modulos: [stores] + objetos_bd: + tablas: [stores, store_users] + enums: [store_users_role_enum] + objetos_backend: + entities: [Store, StoreUser] + services: [StoresService] + controllers: [StoresController] + + MII-004: + nombre: "Captura de Video" + fase: 1 + modulos: [videos] + objetos_bd: + tablas: [videos] + enums: [videos_status_enum] + objetos_backend: + entities: [Video] + services: [VideosService] + integraciones: [S3/MinIO] + + MII-005: + nombre: "Procesamiento IA" + fase: 1 + modulos: [ia-provider, videos] + objetos_bd: + tablas: [ia_providers] + objetos_backend: + entities: [IaProvider] + services: [IaProviderService] + integraciones: [OpenAI, Anthropic] + + MII-006: + nombre: "Reportes de Inventario" + fase: 1 + modulos: [inventory] + objetos_bd: + tablas: [inventory_items] + objetos_backend: + entities: [InventoryItem] + services: [InventoryService] + controllers: [InventoryController] + + MII-007: + nombre: "Retroalimentacion" + fase: 2 + modulos: [feedback] + objetos_bd: + tablas: [corrections, ground_truth, product_submissions] + enums: [corrections_type_enum, ground_truth_status_enum, product_submissions_status_enum] + objetos_backend: + entities: [Correction, GroundTruth, ProductSubmission] + services: [FeedbackService] + controllers: [FeedbackController] + + MII-008: + nombre: "Validacion Aleatoria" + fase: 2 + modulos: [validations] + objetos_bd: + tablas: [validation_requests, validation_responses] + objetos_backend: + entities: [ValidationRequest, ValidationResponse] + services: [ValidationsService, ValidationEngineService] + controllers: [ValidationsController] + + MII-009: + nombre: "Wallet y Creditos" + fase: 3 + modulos: [credits] + objetos_bd: + tablas: [credit_balances, credit_transactions] + enums: [credit_transactions_type_enum] + objetos_backend: + entities: [CreditBalance, CreditTransaction] + services: [CreditsService] + controllers: [CreditsController] + + MII-010: + nombre: "Paquetes de Recarga" + fase: 3 + modulos: [credits] + objetos_bd: + tablas: [credit_packages] + objetos_backend: + entities: [CreditPackage] + + MII-011: + nombre: "Pagos con Tarjeta" + fase: 3 + modulos: [payments] + objetos_bd: + tablas: [payments] + enums: [payments_method_enum, payments_status_enum] + objetos_backend: + entities: [Payment] + services: [PaymentsService] + controllers: [PaymentsController] + integraciones: [Stripe] + + MII-012: + nombre: "Pagos OXXO" + fase: 3 + modulos: [payments] + integraciones: [Stripe (OXXO)] + + MII-013: + nombre: "Pagos 7-Eleven" + fase: 3 + modulos: [payments] + estado: "planificado" + + MII-014: + nombre: "Sistema de Referidos" + fase: 4 + modulos: [referrals] + objetos_bd: + tablas: [referrals] + enums: [referrals_status_enum] + objetos_backend: + entities: [Referral] + services: [ReferralsService] + controllers: [ReferralsController] + + MII-015: + nombre: "Administracion SaaS" + fase: 4 + modulos: [admin] + objetos_bd: + tablas: [audit_logs, promotions] + enums: [promotions_type_enum] + objetos_backend: + entities: [AuditLog, Promotion] + services: + - DashboardService + - ModerationService + - PackagesService + - PromotionsService + - ProvidersService + - AuditLogService + controllers: [AdminController] + +# ============================================================================ +# MATRIZ DE COBERTURA +# ============================================================================ +cobertura: + total_epicas: 15 + epicas_completadas: 15 + total_modulos: 14 + modulos_implementados: 14 + total_tablas: 21 + tablas_implementadas: 21 + total_entities: 21 + entities_implementadas: 21 + + porcentajes: + epicas: 100 + modulos: 100 + tablas: 100 + entities: 100 + tests_backend: 90 + tests_mobile: 0 + +# ============================================================================ +# REFERENCIAS CRUZADAS +# ============================================================================ +referencias_cruzadas: + por_tabla: + users: + epicas: [MII-002] + modulos: [auth, users] + entities: [User] + services: [UsersService, AuthService] + + stores: + epicas: [MII-003] + modulos: [stores] + entities: [Store] + services: [StoresService] + + videos: + epicas: [MII-004] + modulos: [videos] + entities: [Video] + services: [VideosService] + + inventory_items: + epicas: [MII-006] + modulos: [inventory] + entities: [InventoryItem] + services: [InventoryService] + + credit_balances: + epicas: [MII-009] + modulos: [credits] + entities: [CreditBalance] + services: [CreditsService] + + payments: + epicas: [MII-011, MII-012] + modulos: [payments] + entities: [Payment] + services: [PaymentsService] + + referrals: + epicas: [MII-014] + modulos: [referrals] + entities: [Referral] + services: [ReferralsService] + +# ============================================================================ +# IMPACTO DE CAMBIOS +# ============================================================================ +impacto: + tablas_criticas: + users: + impacta: + entities: [User] + services: [UsersService, AuthService, CreditsService, PaymentsService, ReferralsService] + modulos: [auth, users, credits, payments, referrals, notifications, admin, feedback] + riesgo: "ALTO" + + videos: + impacta: + entities: [Video, InventoryItem] + services: [VideosService, InventoryService] + modulos: [videos, inventory] + riesgo: "ALTO" + + credit_balances: + impacta: + entities: [CreditBalance] + services: [CreditsService, PaymentsService, ReferralsService] + modulos: [credits, payments, referrals, videos] + riesgo: "ALTO" + +# ============================================================================ +# HISTORIAL DE CAMBIOS +# ============================================================================ +historial: + - fecha: "2026-01-16" + tipo: "creacion" + descripcion: "Trazabilidad inicial del proyecto" + autor: "Claude" + +# ============================================================================ +# ESTADISTICAS +# ============================================================================ +estadisticas: + epicas_mapeadas: 15 + modulos_mapeados: 14 + tablas_mapeadas: 21 + entities_mapeadas: 21 + documentos_referenciados: 4 + ultima_actualizacion: "2026-01-16" diff --git a/orchestration/_refs/WS-REFERENCES.yml b/orchestration/_refs/WS-REFERENCES.yml new file mode 100644 index 0000000..c87066a --- /dev/null +++ b/orchestration/_refs/WS-REFERENCES.yml @@ -0,0 +1,118 @@ +# Referencias a Workspace - MiInventario +# Alias: @PROJ_WS_REFS +# Version: 1.0.0 +# Fecha: 2026-01-16 + +version: "1.0.0" +proyecto: "miinventario" +fecha_creacion: "2026-01-16" + +# ============================================================================ +# REFERENCIAS A DEFINICIONES GLOBALES +# ============================================================================ +definiciones_workspace: + protocolos: + CCA: + alias: "@WS_DEF_CCA" + archivo: "orchestration/_definitions/protocols/CCA-PROTOCOL.md" + uso: "Protocolo de Carga de Contexto Automatica" + + CCA_LIGHT: + alias: "@WS_DEF_CCA_LIGHT" + archivo: "orchestration/_definitions/protocols/CCA-LIGHT.md" + uso: "Version ligera para subagentes" + + CAPVED: + alias: "@WS_DEF_CAPVED" + archivo: "orchestration/directivas/principios/PRINCIPIO-CAPVED.md" + uso: "Ciclo de vida de tareas" + + validaciones: + backend: + alias: "@WS_DEF_VAL_BE" + archivo: "orchestration/_definitions/validations/VALIDATION-BACKEND.md" + comandos: ["npm run build", "npm run lint", "npm run test"] + + frontend: + alias: "@WS_DEF_VAL_FE" + archivo: "orchestration/_definitions/validations/VALIDATION-FRONTEND.md" + comandos: ["npm run build", "npm run lint", "npm run typecheck"] + + ddl: + alias: "@WS_DEF_VAL_DDL" + archivo: "orchestration/_definitions/validations/VALIDATION-DDL.md" + + devops: + alias: "@WS_DEF_VAL_DEVOPS" + archivo: "orchestration/_definitions/validations/VALIDATION-DEVOPS.md" + +# ============================================================================ +# REFERENCIAS A NAVEGACION RAPIDA GLOBAL +# ============================================================================ +navegacion_workspace: + indice: + alias: "@WS_QUICK_INDEX" + archivo: "orchestration/_quick/QUICK-INDEX.yml" + + perfiles: + alias: "@WS_QUICK_PERFILES" + archivo: "orchestration/_quick/QUICK-PERFILES.yml" + + directivas: + alias: "@WS_QUICK_DIRECTIVAS" + archivo: "orchestration/_quick/QUICK-DIRECTIVAS.yml" + +# ============================================================================ +# REFERENCIAS A CATALOGO COMPARTIDO +# ============================================================================ +catalogo_compartido: + indice: + alias: "@WS_CATALOG" + archivo: "shared/catalog/CATALOG-INDEX.yml" + + funcionalidades: + auth: "shared/catalog/auth/" + notifications: "shared/catalog/notifications/" + payments: "shared/catalog/payments/" + multi_tenancy: "shared/catalog/multi-tenancy/" + +# ============================================================================ +# HERENCIA DE PROYECTO (nivel=0 - Proyecto Independiente) +# ============================================================================ +herencia: + padre: null + nivel: 0 + hereda_de: [] + descripcion: "Proyecto independiente sin herencia de otros proyectos" + +# ============================================================================ +# PROPAGACION +# ============================================================================ +propagacion: + mirror: "shared/mirrors/miinventario/" + status: "shared/mirrors/miinventario/PROPAGATION-STATUS.yml" + consumidores: [] + proveedores: [] + nota: "Proyecto independiente - no tiene consumidores ni proveedores" + +# ============================================================================ +# ALIASES LOCALES DEL PROYECTO +# ============================================================================ +aliases_proyecto: + definiciones: + database: "@PROJ_DEF_DB" + entities: "@PROJ_DEF_ENTITIES" + services: "@PROJ_DEF_SERVICES" + modules: "@PROJ_DEF_MODULES" + + navegacion: + quick_index: "@PROJ_QUICK_INDEX" + quick_api: "@PROJ_QUICK_API" + quick_database: "@PROJ_QUICK_DATABASE" + quick_modules: "@PROJ_QUICK_MODULES" + + inventarios: + master: "@PROJ_INV_MASTER" + backend: "@PROJ_INV_BACKEND" + frontend: "@PROJ_INV_FRONTEND" + database: "@PROJ_INV_DATABASE"