Commit Graph

41 Commits

Author SHA1 Message Date
Claude AI
db1258bc2a feat(frontend): add Templates and Variables routes to MainLayout 2026-01-29 11:19:42 +00:00
Claude AI
0230ab4e36 feat(frontend): add advanced node components to FlowBuilder
Add visual components for all new Flow Engine node types including:
- Basic nodes: Buttons, SetVariable
- Control nodes: Switch, Delay, Random, Loop, GoTo
- Validation nodes: Email, Phone, Number, Date, Regex, Options
- Script nodes: JavaScript, HTTP Request
- AI nodes: AI Response, AI Sentiment

Reorganize toolbar into categorized dropdown menus for better UX.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 11:18:57 +00:00
Claude AI
b458b8e8dd refactor(flow-engine): use NodeRegistry for modular node execution
Replace hardcoded if/elif chain in _execute_node with dynamic node
executor lookup via NodeRegistry. All node executors are registered at
module load time, enabling extensibility without modifying engine code.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 11:16:46 +00:00
Claude AI
20e5c2d13b feat(frontend): add GlobalVariables management page
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 11:16:20 +00:00
Claude AI
bcb09204ae chore(docker): add OpenAI config to flow-engine
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 11:16:04 +00:00
Claude AI
26e5ce5a31 feat(fase4): add validation nodes
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 11:13:36 +00:00
Claude AI
058f837ecb feat(fase4): add advanced nodes - switch, delay, random, loop, goto
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 11:13:36 +00:00
Claude AI
62d4c37c1d feat(fase4): add GlobalVariable API routes
Add schemas and router for global variables with CRUD operations
and admin-only access controls for create/update/delete.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 11:13:26 +00:00
Claude AI
991bd161f0 feat(fase4): add AI response and sentiment nodes
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 11:13:15 +00:00
Claude AI
76c48ff78f feat(fase4): add FlowTemplates frontend page
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 11:13:10 +00:00
Claude AI
af061b1a07 feat(fase4): add JavaScript and HTTP request nodes
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 11:13:03 +00:00
Claude AI
b8d97e2557 feat(fase4): add FlowTemplate model and API
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 11:10:54 +00:00
Claude AI
835c4aa387 feat(fase4): add NodeExecutor architecture with basic nodes
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 11:10:21 +00:00
Claude AI
64b186314f feat(fase4): add GlobalVariable database model
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 11:10:13 +00:00
Claude AI
e3b14be00f docs: add Fase 4 Flow Engine Avanzado implementation plan
15 tasks covering:
- NodeExecutor modular architecture with registry
- Advanced nodes: switch, delay, random, loop, goto
- Validation nodes: email, phone, number, date, regex, options
- Script nodes: JavaScript eval, HTTP request
- AI nodes: OpenAI response, sentiment analysis
- Global variables system (model, API, frontend)
- Flow templates for reusable flows
- Frontend: new node components, variables page, templates page

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 11:08:15 +00:00
Claude AI
7a7c961d35 feat(fase3): add Queues and Supervisor routes to MainLayout
- Add TeamOutlined and BarChartOutlined icons
- Import Queues and SupervisorDashboard pages
- Add /queues and /supervisor menu items
- Add routes for Queues and SupervisorDashboard

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 11:00:52 +00:00
Claude AI
f76c9bb3f4 feat(fase3): enhance Inbox with transfers, notes, and quick replies
Add comprehensive agent inbox functionality including:
- Status filter dropdown to filter conversations by bot/waiting/active/resolved
- Priority tags displayed in conversation list for non-normal priorities
- Internal notes feature with visual distinction (orange styling, dashed border)
- Quick replies panel showing shortcut tags with tooltip previews
- Transfer modal for moving conversations to queues or agents
- Transfer to bot action for returning conversations to bot handling
- Resolve conversation action to close conversations
- Helper functions for message styling (background, color, border)
- Refactored render functions for improved code organization

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 10:59:49 +00:00
Claude AI
9a640b7136 feat(fase3): add Supervisor Dashboard frontend
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 10:59:26 +00:00
Claude AI
aadb98571c feat(fase3): add Queue management frontend page
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 10:59:25 +00:00
Claude AI
c18e0b9d2a feat(fase3): add Queue and QuickReply API routes
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 10:56:39 +00:00
Claude AI
e0ff66504b feat(fase3): add conversation transfer and note API routes
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 10:56:35 +00:00
Claude AI
5746ad42e5 feat(fase3): add supervisor dashboard API
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 10:54:51 +00:00
Claude AI
cb25cf782d feat(fase3): add Queue and QuickReply API schemas
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 10:54:26 +00:00
Claude AI
aca30d8dc2 feat(fase3): extend Conversation model with SLA and queue fields
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 10:54:13 +00:00
Claude AI
49462a3538 feat(fase3): add AssignmentService for queue management
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 10:54:12 +00:00
Claude AI
c9365c9d43 feat(fase3): add agent status update and list endpoints
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 10:52:31 +00:00
Claude AI
8784ec2e3f feat(fase3): add QuickReply database model
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 10:52:30 +00:00
Claude AI
6cf27fe255 feat(fase3): add Queue and QueueAgent database models
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 10:52:24 +00:00
Claude AI
2ed272e511 docs: add Fase 3 Inbox Avanzado + Multi-agente implementation plan
14 tasks covering:
- Queue and QueueAgent database models
- QuickReply model for fast responses
- AssignmentService with round-robin, least-busy, skill-based
- Conversation transfers (queue, agent, bot)
- Internal notes system
- Agent status management
- Supervisor dashboard API
- Frontend: Queues page, enhanced Inbox, Supervisor Dashboard

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 10:49:49 +00:00
Claude AI
363e332f29 feat(phase2): integrate flow engine and add flows navigation
- Add FLOW_ENGINE_URL to API Gateway config
- Integrate flow engine in message handler (BOT status only)
- Add /flows routes to MainLayout with FlowList and FlowBuilder
- Add Flujos menu item with ApartmentOutlined icon

This completes Phase 2: Flow Engine Básico

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 10:24:08 +00:00
Claude AI
c97d380635 feat(phase2): add Flow Builder UI and internal flow routes
- Add FlowBuilder.tsx with React Flow visual editor
- Add FlowList.tsx for flow management
- Add /internal/flow/send endpoint for flow-engine messaging
- Add reactflow dependency to frontend

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 10:23:02 +00:00
Claude AI
14a579d5ca feat(fase2): add Flow API routes and Flow Engine main app
API Gateway:
- Add flows router with CRUD endpoints
- Add activate/deactivate endpoints
- Auto-deactivate other flows for welcome/fallback triggers

Flow Engine:
- Add main.py with FastAPI app
- Add /process endpoint for message handling
- Add SQLAlchemy models (mirrors api-gateway)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 10:20:35 +00:00
Claude AI
8824f65a62 feat(fase2): add Flow schemas and Flow Engine core
API Gateway:
- Add Pydantic schemas for Flow API (create, update, response, nodes, edges)

Flow Engine:
- Add FlowContext for variable management and interpolation
- Add FlowEngine for executing chatbot flows
- Support node types: trigger, message, buttons, wait_input, condition, set_variable

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 10:19:11 +00:00
Claude AI
257baaaf19 feat(fase2): add Flow models, Flow Engine setup, update Docker Compose
- Add Flow and FlowSession SQLAlchemy models for chatbot flows
- Add TriggerType enum (welcome, keyword, fallback, event, manual)
- Setup flow-engine service with FastAPI structure
- Add flow-engine to docker-compose.yml

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 10:17:44 +00:00
Claude AI
4a004b0b00 docs: add Fase 2 Flow Engine implementation plan 2026-01-29 10:13:58 +00:00
Claude AI
1d34504d04 feat: add Alembic database migrations setup
- alembic.ini with configuration
- alembic/env.py with model imports and connection handling
- alembic/versions/ for migration scripts

This completes Fase 1 Foundation implementation.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 10:02:10 +00:00
Claude AI
dcb7fb5974 feat: add Layer 3 - API Gateway main app, WhatsApp routes, Frontend pages
API Gateway:
- main.py with FastAPI app, CORS, health endpoints
- WhatsApp routes: accounts CRUD, conversations, messages, internal events
- WhatsApp schemas for request/response validation

Frontend:
- Login page with register option for first admin
- MainLayout with sidebar navigation and user dropdown
- Dashboard with statistics cards (accounts, conversations)
- WhatsApp Accounts page with QR modal for connection
- Inbox page with conversation list and real-time chat

Full feature set for Fase 1 Foundation complete.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 10:01:06 +00:00
Claude AI
7042aa2061 feat: add Layer 2 - WhatsApp Core logic, API Gateway models/auth, Frontend core
WhatsApp Core:
- SessionManager with Baileys integration for multi-account support
- Express server with REST API and Socket.IO for real-time events
- Session lifecycle management (create, disconnect, delete)
- Message sending with support for text, image, document, audio, video

API Gateway:
- Database models: User, WhatsAppAccount, Contact, Conversation, Message
- JWT authentication with access/refresh tokens
- Auth endpoints: login, refresh, register, me
- Pydantic schemas for request/response validation

Frontend:
- React 18 app structure with routing
- Zustand auth store with persistence
- API client with automatic token handling
- Base CSS and TypeScript declarations

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 09:55:10 +00:00
Claude AI
31d68bc118 feat: add Layer 1 foundation - Docker, WhatsApp Core, API Gateway, Frontend setup
- docker-compose.yml with PostgreSQL, Redis, all services
- nginx/nginx.conf reverse proxy configuration
- services/whatsapp-core: package.json, tsconfig.json, Dockerfile
- services/api-gateway: requirements.txt, Dockerfile, app/__init__.py
- frontend: package.json, tsconfig.json, vite.config.ts, index.html, Dockerfile, nginx.conf

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 09:45:00 +00:00
Claude AI
b4355fbc96 docs: add Fase 1 implementation plan with 16 tasks
- Docker Compose configuration
- WhatsApp Core (Node.js + Baileys)
- API Gateway (FastAPI + JWT)
- Frontend (React + Vite + Ant Design)
- Complete code for each task

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 09:41:06 +00:00
Claude AI
a92a7efccc Initial commit: Documentación completa del proyecto WhatsApp Centralizado
- README principal con descripción del proyecto
- Documento de diseño completo (arquitectura, DB, flujos)
- Documentación de API REST y WebSocket
- Guía del Flow Builder (30+ tipos de nodos)
- Documentación de integración con Odoo
- Guía de despliegue con Docker
- Esquema de base de datos
- Estructura de carpetas del proyecto
- Archivo .env.example con todas las variables

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 09:29:57 +00:00