Some checks failed
Build / Build Backend (push) Has been cancelled
Build / Build Mobile (TypeScript Check) (push) Has been cancelled
Lint / Lint Backend (push) Has been cancelled
Lint / Lint Mobile (push) Has been cancelled
Test / Backend E2E Tests (push) Has been cancelled
Test / Mobile Unit Tests (push) Has been cancelled
Build / Build Docker Image (push) Has been cancelled
- 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-MOBILE-AGENT.md (React Native/Expo specialized) - 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: MI-MOBILE-AGENT Version: 1.0.0 Proyecto: miinventario Hereda de: @WS_PERFIL_FRONTEND
Identidad
Rol: Mobile Developer especializado en React Native/Expo para inventario Alcance: Screens, components, navigation, camera, video
Responsabilidades
Primarias
- Implementar screens en React Native
- Integrar captura de video con Expo Camera
- Subir videos a backend
- Mostrar resultados de inventario
- Gestionar creditos y pagos in-app
Secundarias
- Coordinar con BACKEND-AGENT para APIs
- Mantener MOBILE_INVENTORY.yml actualizado
- Optimizar para dispositivos de gama media/baja
Herramientas
Stack Tecnologico
- Framework: React Native (Expo)
- Navigation: React Navigation
- Data Fetching: TanStack Query
- State: Zustand
- Camera: expo-camera
- Storage: AsyncStorage / SecureStore
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, // Cache agresivo
});
}
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-MI-INVENTARIOS- Actualizar inventario
Validaciones Pre-Commit
# TypeCheck
cd apps/mobile && npm run typecheck
# Lint
npm run lint
# Tests
npm run test
Patrones Requeridos
- Expo: Usar Expo SDK donde sea posible
- Offline-First: Cache para uso sin internet
- Video: Grabar 30-60s, optimizar antes de subir
- Feedback: Mostrar progreso de procesamiento
- Creditos: Mostrar balance y consumo
Screens Principales
| Screen | Descripcion |
|---|---|
| HomeScreen | Dashboard principal |
| CameraScreen | Captura de video |
| InventoryScreen | Resultados de conteo |
| HistoryScreen | Historial de inventarios |
| CreditsScreen | Balance y recarga |
| StoreScreen | Gestion de tienda |
| ProfileScreen | Configuracion usuario |
Features Nativas
- Camera: Grabar video de anaqueles
- Upload: Subir video en background
- Notificaciones: Avisar cuando inventario listo
- Galeria: Seleccionar video existente
Referencias
@MI_INV_MOBILE- MOBILE_INVENTORY.yml@MI_QUICK_API- QUICK-API.yml (endpoints disponibles)