🐙 Pulpo
Automatizá la atención de tu negocio por WhatsApp y Telegram.
Pulpo conecta tus canales de mensajería a un sistema de bots inteligentes: respuesta automática, historial de conversaciones y gestión desde un portal propio. Sin código, sin complicaciones.
✨ ¿Qué hace Pulpo?
- Respuesta automática — tu bot responde al instante cuando no estás disponible
- Multi-canal — WhatsApp y Telegram desde un solo lugar
- Portal de bot — cada cliente gestiona sus canales, ve conversaciones y responde inline
- Panel admin — control total: agregar bots, ver estado de bots, monitorear en tiempo real
🚀 Empezar ahora
Accedé al portal público:
https://unbuoyant-surgeless-micheal.ngrok-free.dev/bot
- ¿Ya tenés una cuenta? Ingresá con tu clave de bot.
- ¿Primera vez? → Crear bot nueva
📲 Conectar Telegram paso a paso
Para agregar un bot de Telegram a tu bot en Pulpo:
1. Crear el bot en Telegram
- Abrí Telegram y buscá @BotFather
- Enviá
/newbot - Elegí un nombre para tu bot (ej:
Soporte Herrería) - Elegí un username (debe terminar en
bot, ej:herreria_soporte_bot) - BotFather te va a dar un token con este formato:
123456789:ABCdefGHIjklMNOpqrSTUvwxYZ - Guardalo — lo vas a necesitar en el paso siguiente
2. Agregar el bot a Pulpo
- Entrá a tu portal: https://unbuoyant-surgeless-micheal.ngrok-free.dev/bot
- En la sección Telegram, pegá el token en el campo y hacé click en + Agregar
- Listo — el bot ya está activo y respondiendo
3. Activar el bot
Compartí el link de tu bot (t.me/herreria_soporte_bot) con tus clientes. Cuando te escriban, Pulpo:
- Responde automáticamente con tu mensaje configurado
- Registra la conversación en tu portal
- Te permite responder manualmente desde el chat inline
📱 Conectar WhatsApp
- En la sección WhatsApp del portal, ingresá tu número (formato internacional sin
+, ej:5491155612767) - Click en + Agregar → aparece un código QR
- En tu WhatsApp móvil: Dispositivos vinculados → Vincular dispositivo → escaneá el QR
- En 10-20 segundos el estado pasa a Conectado
El bot mantiene la sesión activa. Si se desconecta, podés reconectar desde el portal sin perder el historial.
🛠️ Stack técnico
| Componente | Tecnología |
|---|---|
| API REST | FastAPI + uvicorn |
| Frontend | React + Vite |
| Base de datos | SQLite async (data/messages.db) |
| Playwright headless (perfil Chrome persistente) | |
| Telegram | python-telegram-bot v21 |
| Exposición | ngrok (etapa 1) → Cloudflare Tunnel (etapa 2) |
⚡ Desarrollo local
Requisitos
- Python 3.11+
- Node 18+
phones.jsoncon la configuración de bots
Arrancar
./start.sh # levanta backend (uvicorn) + frontend (vite)
Los puertos se leen del .env en la raíz:
BACKEND_PORT=8000
FRONTEND_PORT=5173
ADMIN_PASSWORD=...
Tests
# Backend (requiere server corriendo)
cd backend
pytest tests/ -v
# Frontend Playwright (requiere server corriendo)
cd frontend
node_modules/.bin/playwright test
🗂️ Estructura del proyecto
_/
├── backend/
│ ├── main.py # FastAPI app, lifespan, routers
│ ├── sim.py # Simulador (activo cuando ENABLE_BOTS=false)
│ ├── state.py # clients dict + wa_session singleton
│ ├── config.py # lee phones.json
│ ├── db.py # SQLite async
│ ├── api/ # routers: auth, bots, phones, whatsapp,
│ │ # telegram, messages, sim, bot, logs
│ ├── automation/
│ │ └── whatsapp.py # lógica WA Web con Playwright
│ ├── bots/
│ │ └── telegram_bot.py # bot de Telegram
│ └── tests/ # pytest: auth, logs, sim
├── frontend/
│ ├── src/
│ │ ├── pages/
│ │ │ ├── DashboardPage.jsx # panel admin
│ │ │ ├── BotPage.jsx # portal de bot (login + dashboard)
│ │ │ └── NewBotPage.jsx # onboarding nueva bot
│ │ └── components/
│ │ ├── ChatWidget.jsx # chat inline reutilizable
│ │ └── MonitorPanel.jsx # drawer de monitoring en tiempo real
│ └── tests/ # Playwright: login, monitor
├── management/ # planes, visión, arquitectura
├── phones.json # config de bots y teléfonos (gitignoreado)
├── data/ # DB y sesiones Chrome (gitignoreado)
└── start.sh # arranque unificado
🔀 Worktrees (flujo de desarrollo)
Cada feature se desarrolla en su propio worktree — un servidor independiente con DB propia, sin tocar producción.
| Worktree | Backend | Frontend | Estado |
|---|---|---|---|
_ (master) |
8000 | 5173 | Producción |
| dev-1 | 8001 | 5174 | Libre |
| dev-2 | 8002 | 5175 | Libre |
Ver CLAUDE.md para el flujo completo de creación de worktrees, symlinks y setup.
🗺️ Roadmap
- Bots de WhatsApp (Playwright headless)
- Bots de Telegram (python-telegram-bot)
- Respuesta automática configurable por bot
- Portal de bot — gestión de canales + chat inline
- Alta de bot nueva (onboarding autogestionable)
- Panel admin con monitoring en tiempo real
- Exposición pública via ngrok
- Autenticación segura (OAuth / tokens)
- Dominio propio + Cloudflare Tunnel
- Reconexión automática de sesiones WA
Metadata
Release files for pulpo-lib 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pulpo_lib-0.1.0.tar.gz | 442.7 kB | Without provenance | Details for pulpo_lib-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pulpo_lib-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for pulpo_lib-0.1.0-py3-none-any.whl |
Total release size: 590.7 kB
Release files / pulpo_lib-0.1.0.tar.gz
| Download URL | pulpo_lib-0.1.0.tar.gz |
|---|---|
| Size | 442.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
96e39439dc5b52305342a35e9b129ccc5e1aa5d9d1b811cba85d2ac533bb711d
|
|
BLAKE2b-256 checksum How to use checksums |
856840bf8cb458085d0601fcec16f805f9896b725ec15d8ce2709083dc34710c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.7 {"installer":{"name":"uv","version":"0.11.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / pulpo_lib-0.1.0-py3-none-any.whl
| Download URL | pulpo_lib-0.1.0-py3-none-any.whl |
|---|---|
| Size | 147.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a6f90fc0cdbe13bd1e1042fdbeb6729a8ef8b67312eedd91172f6bf92aa550fd
|
|
BLAKE2b-256 checksum How to use checksums |
9269e804791ca74a0d8a7e49567a1b3d8cee31957aa9056087353a6d972136bf
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.7 {"installer":{"name":"uv","version":"0.11.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Security for pulpo-lib 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.