- Update vision, architecture and technical documentation - Update module definitions (PMC-001 to PMC-008) - Update requirements documentation - Add CONTEXT-MAP.yml and ENVIRONMENT-INVENTORY.yml - Add orchestration guidelines and references 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
221 lines
5.4 KiB
Markdown
221 lines
5.4 KiB
Markdown
---
|
|
id: "ANALISIS-SAAS-PMC"
|
|
title: "Analisis SaaS - Payments y Portales"
|
|
type: "Analysis"
|
|
status: "Draft"
|
|
project: "platform_marketing_content"
|
|
version: "1.0.0"
|
|
created_date: "2026-01-04"
|
|
updated_date: "2026-01-04"
|
|
---
|
|
|
|
# Analisis SaaS: Payments y Portales
|
|
|
|
**Fecha:** 2026-01-04
|
|
**Proyecto:** Platform Marketing Content
|
|
|
|
---
|
|
|
|
## 1. Estado Actual
|
|
|
|
### 1.1 Modulos Existentes
|
|
|
|
| Modulo | Estado | Descripcion |
|
|
|--------|--------|-------------|
|
|
| PMC-001-TENANTS | Definido | Multi-tenancy con planes |
|
|
| PMC-002-CRM | Definido | Clientes, marcas, productos |
|
|
| PMC-003-PROJECTS | Definido | Proyectos y campanas |
|
|
| PMC-004-GENERATION | Definido | Motor IA, ComfyUI |
|
|
| PMC-005-AUTOMATION | Definido | Flujos n8n |
|
|
| PMC-006-ASSETS | Definido | DAM |
|
|
| PMC-007-ADMIN | Definido | Usuarios, roles |
|
|
| PMC-008-ANALYTICS | Definido | Reportes |
|
|
| PMC-009-PAYMENTS | NO EXISTE | Stripe, suscripciones |
|
|
|
|
### 1.2 Planes Definidos (PMC-001)
|
|
|
|
| Plan | Generaciones/mes | Storage | Usuarios | Precio |
|
|
|------|------------------|---------|----------|--------|
|
|
| Free | 50 | 1GB | 1 | $0 |
|
|
| Pro | 500 | 25GB | 5 | $79/mes |
|
|
| Enterprise | Ilimitado | 100GB | Ilimitado | $249/mes |
|
|
| Internal | Ilimitado | Ilimitado | Ilimitado | N/A |
|
|
|
|
### 1.3 Portales Actuales
|
|
|
|
En PMC-007-ADMIN se definen roles:
|
|
- super_admin
|
|
- tenant_admin
|
|
- creative
|
|
- analyst
|
|
- viewer
|
|
- client_portal
|
|
|
|
**Falta:** Clarificar separacion en 3 portales distintos
|
|
|
|
---
|
|
|
|
## 2. Gaps Identificados
|
|
|
|
### 2.1 Modulo de Pagos
|
|
|
|
| Funcionalidad | Estado | Prioridad |
|
|
|---------------|--------|-----------|
|
|
| Integracion Stripe | No existe | Alta |
|
|
| Suscripciones mensuales | No existe | Alta |
|
|
| Checkout flow | No existe | Alta |
|
|
| Webhooks Stripe | No existe | Alta |
|
|
| Facturacion | No existe | Media |
|
|
| Creditos adicionales | No existe | Baja |
|
|
|
|
### 2.2 Portales Diferenciados
|
|
|
|
| Portal | Estado | Descripcion |
|
|
|--------|--------|-------------|
|
|
| Portal Usuario | Parcial | Creativos, viewers |
|
|
| Portal Admin Cliente | Parcial | tenant_admin |
|
|
| Portal Admin SaaS | Parcial | super_admin |
|
|
|
|
---
|
|
|
|
## 3. Plan de Ejecucion
|
|
|
|
### 3.1 Archivos a Crear
|
|
|
|
| Archivo | Tipo | Contenido |
|
|
|---------|------|-----------|
|
|
| PMC-009-PAYMENTS.md | Module | Modulo de pagos completo |
|
|
| RF-PMC-PAY-001-stripe.md | RF | Integracion Stripe |
|
|
| RF-PMC-PAY-002-suscripciones.md | RF | Planes y suscripciones |
|
|
| RF-PMC-PAY-003-checkout.md | RF | Flujo de checkout |
|
|
| RF-PMC-PAY-004-webhooks.md | RF | Webhooks Stripe |
|
|
| ET-PMC-PAY-001-database.md | ET | Modelo de datos billing |
|
|
|
|
### 3.2 Archivos a Modificar
|
|
|
|
| Archivo | Cambios |
|
|
|---------|---------|
|
|
| VISION-GENERAL.md | Agregar seccion Portales y Stripe |
|
|
| PMC-001-TENANTS.md | Actualizar referencia a PMC-009 |
|
|
| PMC-007-ADMIN.md | Clarificar 3 portales |
|
|
|
|
---
|
|
|
|
## 4. Estructura de 3 Portales
|
|
|
|
### Portal 1: Usuario General (Creative/Viewer)
|
|
- Dashboard de proyectos asignados
|
|
- Generacion de contenido
|
|
- Biblioteca de assets
|
|
- Perfil personal
|
|
|
|
### Portal 2: Admin Cliente (Tenant Admin)
|
|
- Dashboard de organizacion
|
|
- Gestion de usuarios
|
|
- Configuracion del tenant
|
|
- Reportes de uso
|
|
- Facturacion y suscripcion
|
|
- Limites y cuotas
|
|
|
|
### Portal 3: Admin SaaS (Super Admin)
|
|
- Dashboard global
|
|
- Gestion de todos los tenants
|
|
- Configuracion de planes
|
|
- Monitoreo de sistema
|
|
- Soporte y tickets
|
|
- Analytics globales
|
|
|
|
---
|
|
|
|
## 5. Productos Stripe Propuestos
|
|
|
|
### Configuracion
|
|
|
|
```yaml
|
|
Productos Stripe:
|
|
- pmc_starter:
|
|
name: "PMC Starter"
|
|
price_monthly: $0
|
|
price_id: TBD
|
|
|
|
- pmc_pro:
|
|
name: "PMC Pro"
|
|
price_monthly: $79
|
|
price_id: TBD
|
|
|
|
- pmc_enterprise:
|
|
name: "PMC Enterprise"
|
|
price_monthly: $249
|
|
price_id: TBD
|
|
|
|
- pmc_generations_pack:
|
|
name: "100 Generaciones Extra"
|
|
price: $19
|
|
price_id: TBD
|
|
type: one_time
|
|
```
|
|
|
|
### Webhooks
|
|
|
|
```yaml
|
|
Eventos a manejar:
|
|
- customer.subscription.created
|
|
- customer.subscription.updated
|
|
- customer.subscription.deleted
|
|
- invoice.payment_succeeded
|
|
- invoice.payment_failed
|
|
- checkout.session.completed
|
|
```
|
|
|
|
---
|
|
|
|
## 6. Validacion vs Requisitos
|
|
|
|
| Requisito | Estado | Archivo |
|
|
|-----------|--------|---------|
|
|
| SaaS multi-tenant | Ya existe | PMC-001-TENANTS |
|
|
| Planes de suscripcion | Ya existe | PMC-001-TENANTS |
|
|
| Integracion Stripe | A crear | PMC-009-PAYMENTS |
|
|
| Portal usuario | A clarificar | VISION-GENERAL |
|
|
| Portal admin cliente | A clarificar | VISION-GENERAL |
|
|
| Portal admin SaaS | A clarificar | VISION-GENERAL |
|
|
|
|
---
|
|
|
|
**Estado:** ✅ COMPLETADO
|
|
|
|
---
|
|
|
|
## 7. Ejecución Completada (Fases 5-8)
|
|
|
|
### 7.1 Archivos Creados
|
|
|
|
| Archivo | Lineas | Contenido |
|
|
|---------|--------|-----------|
|
|
| PMC-009-PAYMENTS.md | ~350 | Modulo completo de pagos Stripe |
|
|
|
|
### 7.2 Archivos Modificados
|
|
|
|
| Archivo | Cambios |
|
|
|---------|---------|
|
|
| VISION-GENERAL.md | +75 lineas (Seccion 5.9 Payments, Seccion 5.10 Portales) |
|
|
|
|
### 7.3 Validación Final
|
|
|
|
| Requisito | Estado | Archivo |
|
|
|-----------|--------|---------|
|
|
| Multi-tenancy | ✅ Ya existia | PMC-001-TENANTS |
|
|
| Planes definidos | ✅ | PMC-009-PAYMENTS |
|
|
| Integracion Stripe | ✅ | PMC-009-PAYMENTS |
|
|
| Productos Stripe | ✅ | PMC-009-PAYMENTS |
|
|
| Webhooks Stripe | ✅ | PMC-009-PAYMENTS |
|
|
| Checkout flow | ✅ | PMC-009-PAYMENTS |
|
|
| Portal Usuario | ✅ | VISION-GENERAL seccion 5.10 |
|
|
| Portal Admin Cliente | ✅ | VISION-GENERAL seccion 5.10 |
|
|
| Portal Admin SaaS | ✅ | VISION-GENERAL seccion 5.10 |
|
|
| YAML front-matter | ✅ | 100% de archivos |
|
|
|
|
**Total archivos nuevos:** 1
|
|
**Total archivos modificados:** 2
|
|
**Estado general:** COMPLETADO
|