How gustavolibano/conectadistribuicao works
Conecta Distribuição is a WhatsApp bot for querying delivery orders stored in an Excel spreadsheet. Twilio posts incoming messages to the Flask webhook, which interprets help, list, and order-detail requests, consults the in-memory order cache, and returns TwiML. The cache loads at startup and a background watcher refreshes it when the sheet changes; a separate health endpoint reports readiness. The single source file combines these responsibilities, so the graph separates them by role while retaining its exact path. Relationships shown are supported by the README or the excerpted app.py.
Main entry points: app.py Order responses
Components 10
Messaging and HTTP
- WhatsApp endpoint
app.py - Health endpoint
app.py
Request interpretation
- Message interpretation
app.py - Order responses
app.py - Help and listing
app.py
Order data
- Excel workbook
- Workbook loader
app.py - Order cache
app.py - Refresh watcher
app.py
Other components
- Twilio webhook
Connections 11
- Twilio webhook → WhatsApp endpoint: posts messages
README.md - WhatsApp endpoint → Message interpretation: passes message
app.py - WhatsApp endpoint → Order responses: returns TwiML
app.py - Message interpretation → Order responses: dispatches intent
app.py - Order responses → Order cache: looks up orders
app.py - Order responses → Help and listing: handles help/list
app.py - Health endpoint → Order cache: checks readiness
app.py - Excel workbook → Workbook loader: provides workbook
README.md - Workbook loader → Order cache: loads records
app.py - Refresh watcher → Workbook loader: refreshes data
app.py - Refresh watcher → Excel workbook: checks changes
app.py