How ph0void/asistente-de-ventas-pora-whatsapp-con-ia works
Purpose
This repository is intended to run a 24/7 WhatsApp sales assistant. It responds to customer messages, presents/searches a product catalog, records customers and orders, and writes invoices and operational data to Google Sheets.
Available Repository Surface
Only README.md is present in the supplied tree. The README describes intended behavior and startup commands, but no application source, package manifest, environment template, or deployment files are available to verify implementation details.
Entry Point and Startup Model
The documented operator flow is:
1. Install Node.js dependencies with npm install.
2. Configure a Google Sheet ID in .env.
3. Launch development mode with npm run dev.
4. Scan a WhatsApp QR code to authorize the bot session.
The implied runtime entry point is an npm development script, but its target cannot be identified without package.json.
WhatsApp Interaction Boundary
The bot’s external conversational boundary is WhatsApp Web, described as using whatsapp-web.js. Incoming customer messages should drive the sales workflow; outbound messages provide conversational replies, catalog information, and simulated typing behavior. QR authorization and persistent session storage are required for account access continuity.
Grounding: README.md.
AI Response and Decision Stage
An AI provider interprets customer context and generates natural-language sales responses. The README names Ollama, GPT-4, and Gemini as selectable model backends, implying a provider abstraction or configurable inference boundary. No prompt logic, model-selection mechanism, credentials handling, or fallback behavior is visible.
Grounding: README.md.
Commerce Workflow Stage
The stated business capabilities form the core domain flow: identify/register a customer, search or share catalog items, create an order, retain conversation history, and create invoice records. Google Sheets is positioned as the operational system of record rather than merely an export target.
Grounding: README.md.
Persistence and External Services
Material external dependencies are:
• WhatsApp Web / whatsapp-web.js for messaging and account sessions.
• Google Sheets for customers, products, orders, and invoices.
• One of Ollama, OpenAI GPT-4, or Google Gemini for AI responses.
• Local persistent storage for WhatsApp authentication/session state.
Credentials and sheet identifiers are implied to be environment-driven through .env, but no actual configuration contract is included.
Grounding: README.md.
Architectural Gaps
The supplied repository cannot establish module boundaries, data schemas, webhook/polling behavior, concurrency controls, error recovery, Google authentication method, or production hosting topology. Before extending or graph-planning the implementation, recover the missing source tree and especially package.json, environment documentation, WhatsApp session storage setup, and Sheets integration code.
Main entry points: README.md WhatsApp Sales Assistant
Components 14
Bot Runtime
Implementation boundaries are inferred from README.
- npm run dev · Documented development launch entry; script target is unknown.
README.md - WhatsApp Sales Assistant · Core implementation is not present in the supplied repository.
README.md - Sales Workflow · Identifies customers, searches catalog, creates orders, and retains history.
README.md
External Services
- WhatsApp Web
README.md - AI Provider · Interprets customer context and generates sales replies.
README.md - Google Sheets · Stores operational commerce records.
README.md
Operational Data
- Session Storage · Persists WhatsApp authorization state.
README.md - Customers
README.md - Product Catalog
README.md - Orders
README.md - Invoices
README.md - Conversation History
README.md
Other components
- Operator
README.md - Customer Messages
README.md
Connections 16
- Operator → npm run dev: starts
- npm run dev → WhatsApp Sales Assistant: launches
- WhatsApp Sales Assistant → WhatsApp Web: connects via whatsapp-web.js
- WhatsApp Web → WhatsApp Sales Assistant: delivers messages
- WhatsApp Sales Assistant → Session Storage: persists auth session
- Customer Messages → WhatsApp Web: sends message
- WhatsApp Sales Assistant → Sales Workflow: routes conversation
- Sales Workflow → AI Provider: requests sales response
- AI Provider → WhatsApp Sales Assistant: generated reply
- Sales Workflow → Google Sheets: reads and writes records
- Google Sheets → Customers: stores
- Google Sheets → Product Catalog: stores
- Google Sheets → Orders: stores
- Google Sheets → Invoices: stores
- Sales Workflow → Conversation History: retains context
- WhatsApp Sales Assistant → WhatsApp Web: sends replies and catalog