🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
3.1 KiB
3.1 KiB
| id | title | type | epic | status | story_points | priority | project | created_date | updated_date |
|---|---|---|---|---|---|---|---|---|---|
| EPIC-IAI-004 | EPIC IAI-004 - Multi-Tenancy | Epic Document | IAI-004 | Planned | 40 | Alta | inmobiliaria-analytics | 2026-01-04 | 2026-01-04 |
EPIC IAI-004: Sistema Multi-Tenant
Vision
Arquitectura multi-tenant para soportar multiples organizaciones (agencias inmobiliarias) en una sola instancia de la aplicacion, con aislamiento de datos mediante Row-Level Security (RLS).
Alcance
Incluye
- Modelo de tenant/organizacion
- Row-Level Security (RLS) en PostgreSQL
- Onboarding de nuevos tenants
- Administracion de tenant
- Branding por tenant (white-label basico)
No Incluye
- Facturacion por tenant (ver IAI-005)
- Despliegue multi-region
Arquitectura
┌─────────────────────────────────────────────────────────────┐
│ APLICACION (Single Instance) │
├─────────────────────────────────────────────────────────────┤
│ │
│ ┌─────────┐ ┌─────────┐ ┌─────────┐ │
│ │ Tenant A│ │ Tenant B│ │ Tenant C│ │
│ │ (RLS) │ │ (RLS) │ │ (RLS) │ │
│ └────┬────┘ └────┬────┘ └────┬────┘ │
│ │ │ │ │
│ └─────────────┼─────────────┘ │
│ │ │
│ ┌───────▼───────┐ │
│ │ PostgreSQL │ │
│ │ (RLS) │ │
│ └───────────────┘ │
└─────────────────────────────────────────────────────────────┘
Dependencias
Depende de
- IAI-001: Fundamentos (auth, usuarios)
- IAI-003: Usuarios (modelo base)
Bloquea a
- IAI-005: Pagos (facturacion por tenant)
- IAI-006: Portales (portales por tenant)
Story Points Estimados
| Tipo | Cantidad | SP |
|---|---|---|
| User Stories | 5 | 40 |
| Total | - | 40 |
Riesgos
| Riesgo | Probabilidad | Impacto | Mitigacion |
|---|---|---|---|
| Data leakage entre tenants | Baja | Critico | RLS exhaustivo, testing |
| Performance con muchos tenants | Media | Alto | Indices, particionamiento |
Estado: Planned Sprint: -