Template base para proyectos SaaS
Go to file
Adrian Flores Cortes c8b75d0435
Some checks are pending
CI / Backend CI (push) Waiting to run
CI / Frontend CI (push) Waiting to run
CI / Security Scan (push) Waiting to run
CI / CI Summary (push) Blocked by required conditions
[TASK-2026-02-03] analysis: Complete integral analysis Template SaaS
Auditoría completa en 5 fases CAPVED (81 SP):

Fase 1 - Inventario:
- 22 módulos SAAS documentados (SAAS-001 a SAAS-022)
- 11 ADRs, 7 integraciones, 5 especificaciones técnicas
- 17 schemas DDL, 48 tablas, 72 RLS policies
- 23 módulos backend, 71 entities, 41 controllers
- 56 páginas frontend, 22 hooks

Fase 2 - Coherencia:
- DDL→Backend: 93% cobertura
- Backend→Frontend: 58% cobertura (gaps críticos)
- Trazabilidad RF/RNF: 97.3%

Fase 3 - Plan Remediación:
- 16 gaps identificados (4 P0, 4 P1, 4 P2, 4 P3)
- P0: Audit, RBAC, Notifications sin frontend
- 57 archivos obsoletos a purgar (620 KB)
- Plan: 21 tareas, 39 SP en 3 sprints

Outputs:
- FASE-1-INVENTARIO-CONTEXTO.md
- FASE-2-ANALISIS-COHERENCIA.md
- FASE-3-PLANEACION-REMEDIACION.md
- REPORTE-FINAL-ANALISIS.md

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-03 12:49:20 -06:00
.backups [SIMCO-V38] feat: Actualizar a SIMCO v3.8.0 2026-01-10 08:53:08 -06:00
.claude [HOMOLOG] docs: Complete homologation with workspace-v2 standards 2026-02-03 02:55:31 -06:00
.gemini/antigravity [SEMANA-2-AGENTES] feat: Add IDE configurations (L3) 2026-01-24 17:31:34 -06:00
.github/workflows [SIMCO-V38] feat: Actualizar a SIMCO v3.8.0 2026-01-10 08:53:08 -06:00
.trae [SEMANA-2-AGENTES] feat: Add IDE configurations (L3) 2026-01-24 17:31:34 -06:00
.windsurf [SEMANA-2-AGENTES] feat: Add IDE configurations (L3) 2026-01-24 17:31:34 -06:00
backend@b1ee86e0e5 chore: Update backend submodule - test expectations fix 2026-01-30 16:07:42 -06:00
database@2837480e17 chore: Update submodules (SAAS-021 MLM module) 2026-01-25 09:32:40 -06:00
docs [HOMOLOG] docs: Complete homologation with workspace-v2 standards 2026-02-03 02:55:31 -06:00
frontend@b0d5b94c07 [WORKSPACE] chore: Update frontend submodule + restructure tasks to date folders 2026-01-29 17:57:40 -06:00
orchestration [TASK-2026-02-03] analysis: Complete integral analysis Template SaaS 2026-02-03 12:49:20 -06:00
.gitmodules [TEMPLATE-SAAS] chore: Add .gitmodules for L2 submodules 2026-01-30 15:04:36 -06:00
CLAUDE.md [HOMOLOG] docs: Complete homologation with workspace-v2 standards 2026-02-03 02:55:31 -06:00
docker-compose.dev.yml [SIMCO-V38] feat: Actualizar a SIMCO v3.8.0 2026-01-10 08:53:08 -06:00
docker-compose.yml [SIMCO-V38] feat: Actualizar a SIMCO v3.8.0 2026-01-10 08:53:08 -06:00
README.md [SIMCO-V38] feat: Actualizar a SIMCO v3.8.0 2026-01-10 08:53:08 -06:00

Template SaaS Multi-Tenant

Version: 1.0.0 Estado: Completado - DDL 100%, Backend 100%, Frontend 100% Tipo: STANDALONE Sistema: SIMCO + NEXUS v4.0


Descripcion

Template base para desarrollo de plataformas SaaS multi-tenant con arquitectura moderna, siguiendo los estandares definidos en el workspace NEXUS.

Este proyecto sirve como punto de partida para cualquier aplicacion SaaS que requiera:

  • Multi-tenancy con aislamiento de datos (RLS)
  • Sistema de suscripciones y pagos (Stripe)
  • Tres portales: Usuario Final, Admin de Tenant, Superadmin
  • Integracion con LLMs (agnóstico al proveedor)
  • RBAC (Role-Based Access Control)

Stack Tecnologico

Capa Tecnologia
Backend Node.js 20+ / Express.js / TypeScript 5.3+
Frontend React 18+ / Vite 5+ / TypeScript / Tailwind CSS 4
Database PostgreSQL 16+ con RLS
State Zustand
Pagos Stripe
IA Claude / OpenAI / Gemini (wrapper agnóstico)

Modulos Core

Modulo Codigo Descripcion
Auth SAAS-001 Autenticacion JWT (OAuth, MFA planificados)
Tenants SAAS-002 Gestion de organizaciones multi-tenant
Users SAAS-003 Usuarios con RBAC
Billing SAAS-004 Suscripciones Stripe
Plans SAAS-005 Planes y limites
AI Integration SAAS-006 Wrapper multi-proveedor LLM (Claude, GPT-4, Gemini)
Notifications SAAS-007 Email, push, in-app, WhatsApp
Audit Logs SAAS-008 Auditoria de acciones
Feature Flags SAAS-009 Toggles por plan/tenant
Webhooks SAAS-010 Webhooks outbound con BullMQ
Storage SAAS-011 S3, R2, MinIO
CRUD Base SAAS-012 Patrones base reutilizables
Email SAAS-013 SendGrid, SES, SMTP
WhatsApp SAAS-014 WhatsApp Business API

Estructura del Proyecto

template-saas/
├── apps/
│   ├── database/
│   │   ├── ddl/schemas/
│   │   ├── seeds/
│   │   └── scripts/
│   ├── backend/src/
│   │   ├── modules/
│   │   └── shared/
│   └── frontend/src/
│       ├── portals/
│       ├── shared/
│       └── stores/
├── docs/
│   ├── 00-vision-general/
│   ├── 01-modulos/
│   ├── 02-integraciones/
│   └── architecture/adr/
└── orchestration/
    ├── 00-guidelines/
    ├── inventarios/
    ├── planes/
    ├── _archivo/
    └── trazas/

Inicio Rapido

# Database
cd apps/database && ./scripts/drop-and-recreate-database.sh

# Backend
cd apps/backend && npm install && npm run start:dev

# Frontend
cd apps/frontend && npm install && npm run dev

Herencia SIMCO

Este proyecto hereda directivas de:

  • core/orchestration/directivas/simco/
  • shared/catalog/ (funcionalidades reutilizables)

Referencias

  • Vision: docs/00-vision-general/VISION-TEMPLATE-SAAS.md
  • Arquitectura: docs/00-vision-general/ARQUITECTURA-MULTI-TENANT.md
  • Contexto: orchestration/00-guidelines/CONTEXTO-PROYECTO.md
  • Estado: orchestration/PROJECT-STATUS.md

Creado: 2026-01-07 Sistema: NEXUS v3.4 | SIMCO