Commit inicial: Sales Bot - Sistema de Automatización de Ventas

- Stack completo con Mattermost, NocoDB y Sales Bot
- Procesamiento OCR de tickets con Tesseract
- Sistema de comisiones por tubos de tinte
- Comandos slash /metas y /ranking
- Documentación completa del proyecto

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-01-18 02:41:53 +00:00
commit 5d9cbd4812
21 changed files with 4625 additions and 0 deletions

47
sales-bot/.env.example Normal file
View File

@@ -0,0 +1,47 @@
# ============================================================================
# SALES BOT - VARIABLES DE ENTORNO (EJEMPLO)
# ============================================================================
#
# Copiar este archivo a .env y configurar los valores
#
# === MATTERMOST ===
# URL de tu instancia de Mattermost
MATTERMOST_URL=http://localhost:8065
# Token del bot salesbot (obtener en Integraciones > Bot Accounts)
MATTERMOST_BOT_TOKEN=tu_token_aqui
# Nombre del equipo en Mattermost
MATTERMOST_TEAM_NAME=sales
# Secret del webhook (obtener en Integraciones > Outgoing Webhooks)
MATTERMOST_WEBHOOK_SECRET=tu_secret_aqui
# Incoming webhook para responder en el canal
MATTERMOST_WEBHOOK_URL=http://localhost:8065/hooks/tu_hook_id
# === NOCODB ===
# URL de tu instancia de NocoDB
NOCODB_URL=http://localhost:8080
# Token de API de NocoDB (obtener en Settings > API Tokens)
NOCODB_TOKEN=tu_token_aqui
# IDs de tablas en NocoDB (obtener de la URL al abrir cada tabla)
NOCODB_TABLE_VENDEDORES=tu_table_id
NOCODB_TABLE_VENTAS=tu_table_id
NOCODB_TABLE_VENTAS_DETALLE=tu_table_id
NOCODB_TABLE_METAS=tu_table_id
# === FLASK ===
FLASK_PORT=5000
FLASK_DEBUG=False
# === LOGGING ===
LOG_LEVEL=INFO
LOG_FILE=/app/logs/sales-bot.log
# === ZONA HORARIA ===
# México: -6, Cancún: -5, España: +1
TZ_OFFSET=-6