# Indice de Especificaciones Tecnicas - MGN-006 Settings

## Identificacion

| Campo | Valor |
|-------|-------|
| **Modulo** | MGN-006 |
| **Epic** | Settings |
| **Total ET** | 3 |
| **Story Points** | 25 |
| **Fecha** | 2025-12-05 |

---

## Especificaciones Tecnicas

| ID | Titulo | RF Cubiertos | Estado |
|----|--------|--------------|--------|
| [ET-SETTINGS-database](./ET-SETTINGS-database.md) | Schema core_settings | RF-001 a RF-004 | Documentado |
| [ET-SETTINGS-backend](./ET-SETTINGS-backend.md) | Servicios y API REST | RF-001 a RF-004 | Documentado |
| [ET-SETTINGS-frontend](./ET-SETTINGS-frontend.md) | Componentes React | RF-001 a RF-004 | Documentado |

---

## Resumen de Componentes

### Database (ET-SETTINGS-database)

| Tabla | RF | Descripcion |
|-------|-----|-------------|
| system_settings | RF-001 | Configuraciones globales del sistema |
| plan_settings | RF-002 | Configuraciones por plan de suscripcion |
| tenant_settings | RF-002 | Configuraciones personalizadas por tenant |
| user_preferences | RF-003 | Preferencias personales de usuario |
| feature_flags | RF-004 | Definicion de feature flags |
| feature_flag_overrides | RF-004 | Overrides de flags por nivel |

**Total:** 6 tablas

### Backend (ET-SETTINGS-backend)

| Servicio | Endpoints | RF |
|----------|-----------|-----|
| SystemSettingsService | 4 | RF-001 |
| TenantSettingsService | 4 | RF-002 |
| UserPreferencesService | 4 | RF-003 |
| FeatureFlagsService | 5 | RF-004 |

**Total:** 17 endpoints

---

## Matriz de Trazabilidad RF -> ET

| RF | Database | Backend |
|----|----------|---------|
| RF-SETTINGS-001 | system_settings | SystemSettingsService |
| RF-SETTINGS-002 | plan_settings, tenant_settings | TenantSettingsService |
| RF-SETTINGS-003 | user_preferences | UserPreferencesService |
| RF-SETTINGS-004 | feature_flags, feature_flag_overrides | FeatureFlagsService |

---

## Dependencias Tecnicas

### Externas
- PostgreSQL 15+ (JSONB)
- Redis (Cache)
- TypeORM 0.3+
- NestJS 10+

### Internas
- core_tenants.tenants
- core_tenants.subscription_plans
- core_users.users
- MGN-001 Auth

---

## Historial

| Version | Fecha | Autor | Cambios |
|---------|-------|-------|---------|
| 1.0 | 2025-12-05 | Requirements-Analyst | Creacion inicial con 2 ET |
| 1.1 | 2025-12-05 | Requirements-Analyst | Agregado ET Frontend |
