workspace/projects/erp-suite/apps/verticales/construccion/docs/97-adr/ADR-008-api-design.md
rckrdmrd ea1879f4ad feat: Initial workspace structure with multi-level Git configuration
- Configure workspace Git repository with comprehensive .gitignore
- Add Odoo as submodule for ERP reference code
- Include documentation: SETUP.md, GIT-STRUCTURE.md
- Add gitignore templates for projects (backend, frontend, database)
- Structure supports independent repos per project/subproject level

Workspace includes:
- core/ - Reusable patterns, modules, orchestration system
- projects/ - Active projects (erp-suite, gamilit, trading-platform, etc.)
- knowledge-base/ - Reference code and patterns (includes Odoo submodule)
- devtools/ - Development tools and templates
- customers/ - Client implementations template

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-08 10:44:23 -06:00

1.7 KiB

ADR-008: API Design RESTful

Estado: Aceptada Fecha: 2025-11-24 Responsable: Architecture-Analyst Proyecto: ERP Construccion

Contexto

APIs deben soportar:

  • Operaciones CRUD para todos los modulos
  • Integraciones con INFONAVIT
  • App movil para asistencias
  • Portal de derechohabientes

Decision

API RESTful con:

  • Versionado: /api/v1/
  • JSON como formato de datos
  • Autenticacion JWT
  • Rate limiting para integraciones externas
/api/v1/
+-- /auth/              # Autenticacion
+-- /projects/          # Proyectos de construccion
+-- /phases/            # Etapas de fraccionamiento
+-- /lots/              # Lotes/viviendas
+-- /estimates/         # Estimaciones
+-- /infonavit/         # Endpoints INFONAVIT
+-- /portal/            # Portal derechohabientes

Justificacion

Referencia a Odoo

  • Odoo usa JSON-RPC, pero REST es mas estandar
  • Endpoints similares a Odoo models

Especifico para Construccion

  • /portal/* para derechohabientes (read-only)
  • /infonavit/* para reportes regulatorios
  • /mobile/* para app de asistencias GPS

Consecuencias

Positivas

  • API estandar y documentada (OpenAPI)
  • Facil integracion con terceros
  • Compatible con app movil

Negativas

  • No tan flexible como GraphQL
  • Mitigacion: Endpoints especificos para reportes complejos

Implementacion

Acciones Requeridas

  • Setup Express con versionado
  • Documentar con OpenAPI/Swagger
  • Implementar rate limiting
  • Endpoints especificos para INFONAVIT

Criterios de Aceptacion

  • Documentacion OpenAPI completa
  • Rate limiting funcional
  • Integracion INFONAVIT probada

Referencias