135 lines
4.0 KiB
YAML
135 lines
4.0 KiB
YAML
# ==============================================================================
|
|
# SERVICE DESCRIPTOR - ERP CORE API
|
|
# ==============================================================================
|
|
# API central del ERP Suite
|
|
# Mantenido por: Backend-Agent
|
|
# Actualizado: 2025-12-18
|
|
# ==============================================================================
|
|
|
|
version: "1.0.0"
|
|
|
|
# ------------------------------------------------------------------------------
|
|
# IDENTIFICACION DEL SERVICIO
|
|
# ------------------------------------------------------------------------------
|
|
service:
|
|
name: "erp-core-api"
|
|
display_name: "ERP Core API"
|
|
description: "API central con funcionalidad compartida del ERP"
|
|
type: "backend"
|
|
runtime: "node"
|
|
framework: "nestjs"
|
|
owner_agent: "NEXUS-BACKEND"
|
|
|
|
# ------------------------------------------------------------------------------
|
|
# CONFIGURACION DE PUERTOS
|
|
# ------------------------------------------------------------------------------
|
|
ports:
|
|
internal: 3010
|
|
registry_ref: "projects.erp_suite.services.api"
|
|
protocol: "http"
|
|
|
|
# ------------------------------------------------------------------------------
|
|
# CONFIGURACION DE BASE DE DATOS
|
|
# ------------------------------------------------------------------------------
|
|
database:
|
|
registry_ref: "erp_core"
|
|
schemas:
|
|
- "public"
|
|
- "auth"
|
|
- "core"
|
|
role: "runtime"
|
|
|
|
# ------------------------------------------------------------------------------
|
|
# DEPENDENCIAS
|
|
# ------------------------------------------------------------------------------
|
|
dependencies:
|
|
services:
|
|
- name: "postgres"
|
|
type: "database"
|
|
required: true
|
|
- name: "redis"
|
|
type: "cache"
|
|
required: false
|
|
|
|
# ------------------------------------------------------------------------------
|
|
# MODULOS
|
|
# ------------------------------------------------------------------------------
|
|
modules:
|
|
auth:
|
|
description: "Autenticacion y sesiones"
|
|
endpoints:
|
|
- { path: "/auth/login", method: "POST" }
|
|
- { path: "/auth/register", method: "POST" }
|
|
- { path: "/auth/refresh", method: "POST" }
|
|
- { path: "/auth/logout", method: "POST" }
|
|
|
|
users:
|
|
description: "Gestion de usuarios"
|
|
endpoints:
|
|
- { path: "/users", method: "GET" }
|
|
- { path: "/users/:id", method: "GET" }
|
|
- { path: "/users", method: "POST" }
|
|
- { path: "/users/:id", method: "PUT" }
|
|
|
|
companies:
|
|
description: "Gestion de empresas"
|
|
endpoints:
|
|
- { path: "/companies", method: "GET" }
|
|
- { path: "/companies/:id", method: "GET" }
|
|
- { path: "/companies", method: "POST" }
|
|
|
|
tenants:
|
|
description: "Multi-tenancy"
|
|
endpoints:
|
|
- { path: "/tenants", method: "GET" }
|
|
- { path: "/tenants/:id", method: "GET" }
|
|
|
|
core:
|
|
description: "Catalogos base"
|
|
submodules:
|
|
- countries
|
|
- currencies
|
|
- uom
|
|
- sequences
|
|
|
|
# ------------------------------------------------------------------------------
|
|
# DOCKER
|
|
# ------------------------------------------------------------------------------
|
|
docker:
|
|
image: "erp-core-api"
|
|
dockerfile: "Dockerfile"
|
|
networks:
|
|
- "erp_core_${ENV:-local}"
|
|
- "infra_shared"
|
|
labels:
|
|
traefik:
|
|
enable: true
|
|
router: "erp-core-api"
|
|
rule: "Host(`api.erp.localhost`)"
|
|
|
|
# ------------------------------------------------------------------------------
|
|
# HEALTH CHECK
|
|
# ------------------------------------------------------------------------------
|
|
healthcheck:
|
|
endpoint: "/health"
|
|
interval: "30s"
|
|
timeout: "5s"
|
|
retries: 3
|
|
|
|
# ------------------------------------------------------------------------------
|
|
# ESTADO
|
|
# ------------------------------------------------------------------------------
|
|
status:
|
|
phase: "development"
|
|
version: "0.1.0"
|
|
completeness: 25
|
|
|
|
# ------------------------------------------------------------------------------
|
|
# METADATA
|
|
# ------------------------------------------------------------------------------
|
|
metadata:
|
|
created_at: "2025-12-18"
|
|
created_by: "Backend-Agent"
|
|
project: "erp-suite"
|
|
team: "erp-team"
|