michangarrito/CLAUDE.md
Adrian Flores Cortes 631250df84
Some checks failed
CI/CD Pipeline / Backend CI (push) Has been cancelled
CI/CD Pipeline / Frontend CI (push) Has been cancelled
CI/CD Pipeline / WhatsApp Service CI (push) Has been cancelled
CI/CD Pipeline / Mobile CI (push) Has been cancelled
CI/CD Pipeline / Docker Build (./apps/backend, ./apps/backend/Dockerfile, backend) (push) Has been cancelled
CI/CD Pipeline / Docker Build (./apps/frontend, ./apps/frontend/Dockerfile, frontend) (push) Has been cancelled
CI/CD Pipeline / Docker Build (./apps/whatsapp-service, ./apps/whatsapp-service/Dockerfile, whatsapp-service) (push) Has been cancelled
CI/CD Pipeline / Deploy to Production (push) Has been cancelled
[SEMANA-3-AGENTES] feat: Add IDE configurations (L3)
- Add CLAUDE.md with project-specific instructions
- Add .trae/rules/ and AGENT-CAPABILITIES.md
- Add .windsurf/rules/ and AGENT-CAPABILITIES.md
- Add .gemini/antigravity/README.md
- Stack: NestJS 10.3.0 + React 19.2.0 + React Native (Expo)
- Type: CONSUMER (receives from template-saas)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-24 17:45:08 -06:00

4.7 KiB

CLAUDE.md - MiChangarrito

Hereda de: workspace-v2/CLAUDE.md, template-saas Sistema: SIMCO v4.3.0 + NEXUS v4.0 Proyecto: michangarrito Tipo: CONSUMER (de template-saas) Versión: 0.9.5 Actualizado: 2026-01-24


EXTENSIONES LOCALES

Este archivo EXTIENDE (no reemplaza) las reglas del workspace. Para reglas base, ver: ../../CLAUDE.md


DESCRIPCION DEL PROYECTO

MiChangarrito es un SaaS para tienditas/changarros mexicanos con:

  • Punto de Venta (POS) móvil y web
  • Gestión de inventario inteligente
  • Integración WhatsApp Business
  • Pagos múltiples (Stripe, MercadoPago, CoDi, SPEI)
  • Asistente IA para comerciantes

STACK TECNOLOGICO

Capa Tecnología Versión
Backend NestJS 10.3.0
Frontend Web React + Vite 19.2.0
Mobile React Native (Expo) SDK 51
Database PostgreSQL 16+
Cache Redis 7
ORM TypeORM 0.3.x
WhatsApp Meta Business API -
LLM OpenRouter/Claude/GPT-4 Multi-provider

CREDENCIALES BD

Database: michangarrito_dev
User: michangarrito_dev
Password: mch_dev_2026
Port: 5432
Host: localhost
Redis Port: 6389

ESTRUCTURA DEL MONOREPO

michangarrito/
├── apps/
│   ├── backend/          → NestJS API (23 módulos)
│   ├── frontend/         → React Web App
│   ├── mobile/           → React Native (Expo)
│   ├── mcp-server/       → Gateway LLM (15 herramientas)
│   ├── whatsapp-service/ → Meta Cloud API
│   └── database/         → DDL (11 schemas)
├── orchestration/        → Sistema SIMCO
└── docs/                 → Documentación

MODULOS BACKEND (23)

Módulo Descripción
auth JWT + OTP + PIN + Biométrico
billing Suscripciones
categories Catálogos
codi-spei Pagos QR Banxico
customers Clientes + Fiados
delivery Entregas domicilio
exports Exportación datos
integrations Integraciones
inventory Control inventario
invoices Facturación
marketplace Marketplace B2B
messaging Mensajería
notifications Push/Email/WhatsApp
onboarding Onboarding inteligente
orders Pedidos
payments Gateway pagos
products Catálogo productos
referrals Programa referidos
sales Punto de venta
settings Configuración
subscriptions Planes suscripción
templates Templates catálogos
widgets Widgets/Atajos

PUERTOS DE SERVICIOS

Servicio Puerto
Backend API 3141
Frontend Web 3140
Mobile (Expo) 8081
MCP Server 3142
WhatsApp Service 3143
PostgreSQL 5432
Redis 6389

HERENCIA

Este proyecto hereda de:

  • workspace-v2/orchestration/ → Directivas globales
  • template-saas/ → Patrones SaaS, multi-tenancy, auth

NO exporta a otros proyectos

  • Es aplicación final (CONSUMER)

REGLAS ESPECIFICAS

1. Multi-Tenancy

  • Cada changarrito es un tenant
  • RLS obligatorio en queries
  • Datos completamente aislados

2. Pagos México

  • CoDi/SPEI: Validar con Banxico sandbox
  • MercadoPago: Usar cuenta de pruebas
  • Clip: Solo modo sandbox

3. WhatsApp Business

  • Meta Cloud API únicamente
  • Validar templates antes de enviar
  • Rate limits estrictos

4. LLM Integration

  • MCP Server agnóstico a proveedor
  • OpenRouter como fallback
  • Caché de respuestas para costos

VALIDACIONES ADICIONALES

Además de las validaciones del workspace:

  1. Backend:

    cd apps/backend && npm run build && npm run lint
    
  2. Frontend:

    cd apps/frontend && npm run build && npm run lint
    
  3. Mobile:

    cd apps/mobile && npx expo doctor
    

ALIASES LOCALES

  • @BACKEND → apps/backend/src/modules/
  • @FRONTEND → apps/frontend/src/
  • @MOBILE → apps/mobile/src/
  • @WHATSAPP → apps/whatsapp-service/
  • @MCP → apps/mcp-server/
  • @DDL → apps/database/

ANTES DE IMPLEMENTAR

  1. Verificar especificación en docs/
  2. Consultar si ya existe en template-saas
  3. Revisar herencia - NO duplicar lo heredado
  4. Considerar impacto en móvil Y web

DESPUES DE IMPLEMENTAR

  1. Actualizar inventarios locales
  2. Verificar que funciona en web Y móvil
  3. Commit y push siguiendo SIMCO-GIT
  4. NO propagar - es CONSUMER

ESTADO ACTUAL

Madurez: Pre-producción
MVP: 95% completado
En Producción: No
Modo: Multi-tenant

Bloqueadores para Producción:
  - Cuenta Meta Business verificada
  - API keys Stripe producción
  - API keys LLM producción

MiChangarrito v0.9.5 - Sistema SIMCO v4.3.0