Template base para proyectos SaaS
Go to file
Adrian Flores Cortes 5f25327f18
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
fix(ddl): Update database ref with storage triggers and whatsapp RLS fix
- storage/06-triggers.sql: Added updated_at triggers for files and usage
- whatsapp RLS: Fixed current_setting pattern with true parameter

Ref: P1 - Triggers storage y correccion RLS whatsapp

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-03 17:18:19 -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@a671697d35 chore: Update backend ref (a671697) 2026-02-03 16:35:34 -06:00
database@c1c5892364 fix(ddl): Update database ref with storage triggers and whatsapp RLS fix 2026-02-03 17:18:19 -06:00
docs docs: Add ET-SAAS-018 to ET-SAAS-022 technical specifications 2026-02-03 13:14:48 -06:00
frontend@9019261f8e [SYNC] chore: Update frontend ref (9019261) 2026-02-03 16:13:36 -06:00
orchestration docs: Update PROXIMA-ACCION.md - E2E tests completed 2026-02-03 16:14:18 -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