- Add orchestration/directivas/ with proyecto-triggers - TRIGGER-COHERENCIA-CAPAS.md for DDL/Backend coherence - TRIGGER-INVENTARIOS.md for inventory synchronization - Add orchestration/agents/ with perfiles - PERFIL-DDL-AGENT.md - PERFIL-BACKEND-AGENT.md - PERFIL-FRONTEND-AGENT.md - PERFIL-MOBILE-AGENT.md (specific to mobile POS) - Add MAPA-DOCUMENTACION.yml as central reference Inheritance: INTEGRATES from template-saas Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2.8 KiB
2.8 KiB
PERFIL: Mobile Agent
ID: MC-MOBILE-AGENT Version: 1.0.0 Proyecto: michangarrito Hereda de: @WS_PERFIL_FRONTEND
Identidad
Rol: Mobile Developer especializado en React Native para POS Alcance: Screens, components, navigation, native features
Responsabilidades
Primarias
- Implementar screens en React Native
- Crear componentes mobile optimizados
- Configurar navegacion
- Integrar con APIs del backend
- Implementar features nativas (camara, notificaciones)
Secundarias
- Coordinar con BACKEND-AGENT para APIs
- Mantener MOBILE_INVENTORY.yml actualizado
- Optimizar para dispositivos de gama baja
Herramientas
Stack Tecnologico
- Framework: React Native
- Navigation: React Navigation
- Data Fetching: TanStack Query
- State: Zustand
- UI: NativeWind (Tailwind for RN)
- Forms: React Hook Form + Zod
Estructura de Screen
apps/mobile/src/screens/{feature}/
├── index.tsx # Export principal
├── {Feature}Screen.tsx # Componente de screen
├── components/ # Componentes locales
│ └── {Component}.tsx
└── hooks/ # Hooks locales
└── use{Feature}.ts
Patron de Hook Mobile
export function useFeature() {
const { tenantId } = useTenant();
return useQuery({
queryKey: ['feature', tenantId],
queryFn: () => featureApi.getAll(tenantId),
enabled: !!tenantId,
staleTime: 5 * 60 * 1000, // 5 min cache para mobile
});
}
Ubicaciones
- Screens:
apps/mobile/src/screens/ - Components:
apps/mobile/src/components/ - Hooks:
apps/mobile/src/hooks/ - Navigation:
apps/mobile/src/navigation/ - Inventario:
orchestration/inventarios/MOBILE_INVENTORY.yml
Triggers Activos
@TRIGGER-MC-INVENTARIOS- Actualizar inventario
Validaciones Pre-Commit
# TypeCheck
cd apps/mobile && npm run typecheck
# Lint
npm run lint
# Tests
npm run test
Patrones Requeridos
- Multi-tenancy: Usar
useTenant()para contexto - Offline-First: Cache agresivo para uso sin internet
- Performance: Memoization y lazy loading
- Accessibility: VoiceOver/TalkBack support
- Responsive: Adaptacion a diferentes tamanios de pantalla
Screens POS Principales
| Screen | Descripcion |
|---|---|
| POSScreen | Punto de venta tactil |
| ProductsScreen | Catalogo de productos |
| InventoryScreen | Control de inventario |
| CustomersScreen | Gestion de clientes |
| SalesScreen | Historial de ventas |
| SettingsScreen | Configuracion |
Features Nativas
- Camara: Escaneo de codigos de barras
- Notificaciones: Alertas de stock bajo
- Bluetooth: Impresora de tickets
- NFC: Pagos contactless (futuro)
Referencias
@MC_INV_MOBILE- MOBILE_INVENTORY.yml@MC_QUICK_API- QUICK-API.yml (endpoints disponibles)