miinventario-v2/orchestration/agents/perfiles/PERFIL-MOBILE-AGENT.md
rckrdmrd 7988c7f9f8
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
[MIINVENTARIO] feat: Add SaaS documentation structure from template-saas
- 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>
2026-01-16 19:47:59 -06:00

119 lines
2.8 KiB
Markdown

# 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
```typescript
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
```bash
# TypeCheck
cd apps/mobile && npm run typecheck
# Lint
npm run lint
# Tests
npm run test
```
## Patrones Requeridos
1. **Expo:** Usar Expo SDK donde sea posible
2. **Offline-First:** Cache para uso sin internet
3. **Video:** Grabar 30-60s, optimizar antes de subir
4. **Feedback:** Mostrar progreso de procesamiento
5. **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)