- Backend NestJS con módulos de autenticación, inventario, créditos - Frontend React con dashboard y componentes UI - Base de datos PostgreSQL con migraciones - Tests E2E configurados - Configuración de Docker y deployment Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
326 lines
7.6 KiB
Markdown
326 lines
7.6 KiB
Markdown
# PLAN DE IMPLEMENTACION - MiInventario
|
|
|
|
**Version:** 1.0.0
|
|
**Fecha:** 2026-01-10
|
|
**Estado:** Aprobado
|
|
**SIMCO Version:** 4.0.0
|
|
|
|
---
|
|
|
|
## Resumen Ejecutivo
|
|
|
|
| Campo | Valor |
|
|
|-------|-------|
|
|
| Total Fases | 4 |
|
|
| Total Epicas | 15 |
|
|
| Total Story Points | 202 |
|
|
| Duracion Estimada | 12-16 semanas |
|
|
| Prioridad | Alta |
|
|
|
|
---
|
|
|
|
## FASE 1: MVP Core
|
|
|
|
**Objetivo:** Funcionalidad base de inventario por video
|
|
**Story Points:** 97
|
|
**Duracion Estimada:** 6-8 semanas
|
|
|
|
### MII-001: Infraestructura Base (8 SP)
|
|
|
|
**Objetivo:** Establecer la base tecnica del proyecto
|
|
|
|
| Entregable | Descripcion |
|
|
|------------|-------------|
|
|
| Docker Compose | Servicios PostgreSQL, Redis, MinIO |
|
|
| Schemas base | Extensions, auth, public |
|
|
| Proyecto NestJS | Estructura inicial |
|
|
| Proyecto Expo | Estructura inicial |
|
|
| CI/CD base | GitHub Actions |
|
|
|
|
**Dependencias:** Ninguna
|
|
**Bloquea:** MII-002
|
|
|
|
### MII-002: Autenticacion (13 SP)
|
|
|
|
**Objetivo:** Sistema completo de autenticacion
|
|
|
|
| Entregable | Descripcion |
|
|
|------------|-------------|
|
|
| Registro | Email/telefono con OTP |
|
|
| Login | JWT + Refresh tokens |
|
|
| Perfil | Datos basicos de usuario |
|
|
| Consentimientos | GDPR/Mexico compliance |
|
|
|
|
**Dependencias:** MII-001
|
|
**Bloquea:** MII-003
|
|
**Catalogo:** auth, session-management
|
|
|
|
### MII-003: Gestion de Tiendas (8 SP)
|
|
|
|
**Objetivo:** Multi-tienda por usuario
|
|
|
|
| Entregable | Descripcion |
|
|
|------------|-------------|
|
|
| CRUD Tiendas | Crear, editar, eliminar |
|
|
| Multi-tenant | RLS por tienda |
|
|
| Roles | Owner/Operator |
|
|
|
|
**Dependencias:** MII-002
|
|
**Bloquea:** MII-004
|
|
**Catalogo:** multi-tenancy
|
|
|
|
### MII-004: Captura de Video (21 SP)
|
|
|
|
**Objetivo:** Captura guiada de video en mobile
|
|
|
|
| Entregable | Descripcion |
|
|
|------------|-------------|
|
|
| Guia UX | Instrucciones de captura |
|
|
| Validacion | Resolucion, luz, duracion |
|
|
| Compresion | Preprocesado local |
|
|
| Upload | Subida resiliente |
|
|
|
|
**Dependencias:** MII-003
|
|
**Bloquea:** MII-005
|
|
|
|
### MII-005: Procesamiento IA (34 SP)
|
|
|
|
**Objetivo:** Deteccion y conteo de productos
|
|
|
|
| Entregable | Descripcion |
|
|
|------------|-------------|
|
|
| Cola trabajos | Bull + Redis |
|
|
| Extraccion | Frames de video |
|
|
| Deteccion | Integracion proveedor IA |
|
|
| Conteo | Consolidacion multi-frame |
|
|
|
|
**Dependencias:** MII-004
|
|
**Bloquea:** MII-006, MII-007, MII-008
|
|
|
|
### MII-006: Reportes de Inventario (13 SP)
|
|
|
|
**Objetivo:** Visualizacion de resultados
|
|
|
|
| Entregable | Descripcion |
|
|
|------------|-------------|
|
|
| Reporte sesion | Lista por SKU |
|
|
| Historial | Sesiones anteriores |
|
|
| Exportacion | PDF/CSV |
|
|
| Compartir | WhatsApp |
|
|
|
|
**Dependencias:** MII-005
|
|
**Bloquea:** MII-007, MII-008, MII-009
|
|
|
|
---
|
|
|
|
## FASE 2: Retroalimentacion
|
|
|
|
**Objetivo:** Mejora continua del modelo IA
|
|
**Story Points:** 21
|
|
**Duracion Estimada:** 2-3 semanas
|
|
|
|
### MII-007: Retroalimentacion (13 SP)
|
|
|
|
| Entregable | Descripcion |
|
|
|------------|-------------|
|
|
| Correccion SKU | Cambiar producto detectado |
|
|
| Correccion cantidad | Ajustar conteo |
|
|
| Etiquetado | Productos desconocidos |
|
|
| Ground truth | Registro de correcciones |
|
|
|
|
**Dependencias:** MII-006
|
|
|
|
### MII-008: Validacion Aleatoria (8 SP)
|
|
|
|
| Entregable | Descripcion |
|
|
|------------|-------------|
|
|
| Micro-auditorias | X% de sesiones |
|
|
| Reglas | Activacion por calidad |
|
|
| Registro | Respuestas como ground truth |
|
|
|
|
**Dependencias:** MII-006
|
|
|
|
---
|
|
|
|
## FASE 3: Monetizacion
|
|
|
|
**Objetivo:** Sistema de creditos y pagos
|
|
**Story Points:** 50
|
|
**Duracion Estimada:** 3-4 semanas
|
|
|
|
### MII-009: Wallet y Creditos (13 SP)
|
|
|
|
| Entregable | Descripcion |
|
|
|------------|-------------|
|
|
| Cartera | Balance por usuario |
|
|
| Consumo | Creditos por sesion |
|
|
| Motor costos | COGS IA |
|
|
| Precio | Regla 2x COGS |
|
|
|
|
**Dependencias:** MII-006
|
|
**Bloquea:** MII-010, MII-011, MII-012, MII-013, MII-014
|
|
|
|
### MII-010: Paquetes de Recarga (8 SP)
|
|
|
|
| Entregable | Descripcion |
|
|
|------------|-------------|
|
|
| Paquetes | $50, $100, $200, $500 |
|
|
| Equivalencias | Dinamicas por costo IA |
|
|
| Promociones | Bonos temporales |
|
|
|
|
**Dependencias:** MII-009
|
|
|
|
### MII-011: Pagos con Tarjeta (8 SP)
|
|
|
|
| Entregable | Descripcion |
|
|
|------------|-------------|
|
|
| Stripe | Integracion checkout |
|
|
| Webhooks | Confirmacion |
|
|
| UI | Flujo de pago |
|
|
|
|
**Dependencias:** MII-010
|
|
**Catalogo:** payments
|
|
|
|
### MII-012: Pagos OXXO (13 SP)
|
|
|
|
| Entregable | Descripcion |
|
|
|------------|-------------|
|
|
| Voucher | Generacion referencia |
|
|
| Confirmacion | Webhook asincrono |
|
|
| Expiracion | 72h configurable |
|
|
|
|
**Dependencias:** MII-010
|
|
|
|
### MII-013: Pagos 7-Eleven (8 SP)
|
|
|
|
| Entregable | Descripcion |
|
|
|------------|-------------|
|
|
| Agregador | Integracion |
|
|
| Referencias | Generacion |
|
|
| Confirmacion | Webhook |
|
|
|
|
**Dependencias:** MII-010
|
|
|
|
---
|
|
|
|
## FASE 4: Crecimiento
|
|
|
|
**Objetivo:** Referidos y administracion
|
|
**Story Points:** 34
|
|
**Duracion Estimada:** 2-3 semanas
|
|
|
|
### MII-014: Sistema de Referidos (21 SP)
|
|
|
|
| Entregable | Descripcion |
|
|
|------------|-------------|
|
|
| Codigos | Link/codigo unico |
|
|
| Atribucion | Registro con referido |
|
|
| Recompensas | 1 credito break-even |
|
|
| Multinivel | Configurable (1-3 niveles) |
|
|
| Anti-fraude | Deteccion y limites |
|
|
|
|
**Dependencias:** MII-009
|
|
|
|
### MII-015: Administracion SaaS (13 SP)
|
|
|
|
| Entregable | Descripcion |
|
|
|------------|-------------|
|
|
| Costos IA | Configuracion |
|
|
| Paquetes | Gestion |
|
|
| Referidos | Reglas |
|
|
| Metricas | Dashboard |
|
|
|
|
**Dependencias:** MII-009, MII-014
|
|
|
|
---
|
|
|
|
## Diagrama de Dependencias
|
|
|
|
```
|
|
MII-001
|
|
│
|
|
▼
|
|
MII-002
|
|
│
|
|
▼
|
|
MII-003
|
|
│
|
|
▼
|
|
MII-004
|
|
│
|
|
▼
|
|
MII-005
|
|
│
|
|
├───────────────────┬───────────────────┐
|
|
▼ ▼ ▼
|
|
MII-006 MII-007 MII-008
|
|
│
|
|
▼
|
|
MII-009
|
|
│
|
|
├───────────┬───────────┬───────────┐
|
|
▼ ▼ ▼ ▼
|
|
MII-010 MII-011 MII-012 MII-014
|
|
│ │ │ │
|
|
│ │ │ ▼
|
|
│ │ │ MII-015
|
|
▼ │ ▼
|
|
MII-013 │ (webhook)
|
|
▼
|
|
(webhook)
|
|
```
|
|
|
|
---
|
|
|
|
## Cronograma Tentativo
|
|
|
|
| Semana | Fase | Epicas | Notas |
|
|
|--------|------|--------|-------|
|
|
| 1-2 | 1 | MII-001, MII-002 | Infraestructura y Auth |
|
|
| 3-4 | 1 | MII-003, MII-004 | Tiendas y Video |
|
|
| 5-6 | 1 | MII-005 | Procesamiento IA (critico) |
|
|
| 7-8 | 1/2 | MII-006, MII-007, MII-008 | Reportes y Feedback |
|
|
| 9-10 | 3 | MII-009, MII-010 | Wallet y Paquetes |
|
|
| 11-12 | 3 | MII-011, MII-012, MII-013 | Pagos |
|
|
| 13-14 | 4 | MII-014, MII-015 | Referidos y Admin |
|
|
|
|
**Total: 14 semanas** (puede variar segun recursos)
|
|
|
|
---
|
|
|
|
## Riesgos y Mitigaciones
|
|
|
|
| Riesgo | Probabilidad | Impacto | Mitigacion |
|
|
|--------|--------------|---------|------------|
|
|
| Complejidad IA | Alta | Alto | Abstraccion multi-proveedor, empezar simple |
|
|
| Performance video | Media | Medio | Preprocesado en dispositivo |
|
|
| Integracion pagos | Media | Alto | Usar Stripe para OXXO (probado) |
|
|
| Fraude referidos | Media | Medio | Sistema anti-fraude desde inicio |
|
|
| Costos IA variables | Media | Medio | Pricing dinamico |
|
|
|
|
---
|
|
|
|
## Criterios de Exito por Fase
|
|
|
|
### Fase 1 (MVP)
|
|
- [ ] Usuario puede registrarse y crear tienda
|
|
- [ ] Usuario puede grabar video y recibir reporte
|
|
- [ ] Precision IA > 70% en productos conocidos
|
|
|
|
### Fase 2 (Feedback)
|
|
- [ ] Usuario puede corregir errores
|
|
- [ ] Ground truth se registra correctamente
|
|
|
|
### Fase 3 (Monetizacion)
|
|
- [ ] Usuario puede comprar creditos
|
|
- [ ] Pagos OXXO funcionan end-to-end
|
|
|
|
### Fase 4 (Crecimiento)
|
|
- [ ] Sistema de referidos operativo
|
|
- [ ] Admin puede configurar parametros
|
|
|
|
---
|
|
|
|
**Ultima Actualizacion:** 2026-01-10
|
|
**Aprobado por:** Agente Orquestador
|