How remsystem-official/whatsapp-ia works
This is a WhatsApp support bot. A user message enters through the WhatsApp client and chat controller, which routes recognized commands to command handlers or sends ordinary text to the Groq response service. The bot also provides fixed help and fetches user listings from an external API. The graph reflects the sampled source and README; the external API endpoint and Groq service are documented/configured, but their runtime details beyond the shown calls are not inferred.
Main entry points: ChatController.js Chat Controller · command.handler.js Command Router · Groq.service.js Groq Response Service · index.js Bot Entry
Components 15
Bot Runtime
- Bot Entry
index.js - WhatsApp Client
config/whatsapp-client.js - Chat Controller
controllers/ChatController.js
Command Handling
- Command Types
common/constanst/commands.const.js - Command Router
commands/handler/command.handler.js - Help Reply
commands/help.command.js - User Listing
commands/users.command.js
AI Responses
- Assistant Rules
rules.txt - Groq Response Service
services/groq/Groq.service.js
User Data API
- JSONPlaceholder Service
services/api/jsonPlaceholder.service.js - HTTP Client Config
config/axios.config.js
Other components
- WhatsApp User
- Groq API
- External User API
Connections 20
- Bot Entry → WhatsApp Client: loads
index.js - Bot Entry → Chat Controller: creates
index.js - Bot Entry → WhatsApp Client: initializes
index.js - WhatsApp Client → WhatsApp: connects
config/whatsapp-client.js - WhatsApp User → WhatsApp: messages
- WhatsApp → Chat Controller: delivers messages
- Chat Controller → Command Types: checks commands
controllers/ChatController.js - Chat Controller → Command Router: dispatches commands
controllers/ChatController.js - Chat Controller → Groq Response Service: requests replies
controllers/ChatController.js - Command Router → Command Types: uses command types
commands/handler/command.handler.js - Command Router → Help Reply: dispatches help
commands/handler/command.handler.js - Command Router → User Listing: dispatches support
commands/handler/command.handler.js - Help Reply → WhatsApp User: replies
commands/help.command.js - User Listing → JSONPlaceholder Service: fetches users
commands/users.command.js - User Listing → WhatsApp User: replies
commands/users.command.js - Groq Response Service → Assistant Rules: loads rules
services/groq/Groq.service.js - Groq Response Service → Groq API: requests completion
services/groq/Groq.service.js - Groq Response Service → WhatsApp User: returns reply via chat
- JSONPlaceholder Service → HTTP Client Config: sends requests
services/api/jsonPlaceholder.service.js - HTTP Client Config → External User API: requests user data