A WhatsApp chatbot for task management, designed to work with Evolution API in a secure internal network environment.
### Core Principles
1. **Trust-but-Verify Approach**: Leverage WhatsApp's message metadata to minimize API calls while maintaining security
2. **Progressive Validation**: Verify users naturally through interactions rather than upfront checks
3. **Background Reconciliation**: Use periodic syncs to maintain data accuracy without impacting real-time performance
## 📌 Overview
This service provides a WhatsApp interface for task management within WhatsApp groups. It:
- Listens for `/tarea` commands in WhatsApp groups
- Stores tasks in a SQLite database
- Manages user permissions and group membership
- Integrates with Evolution API for WhatsApp connectivity
### Message Processing Flow
## 🔐 Security Model
- **Internal Networking**: The webhook only accepts connections from Evolution API via internal Docker networking
- **Environment Variables**: Sensitive configuration is managed through environment variables
- **Group Restrictions**: Only operates within pre-approved WhatsApp groups
- **Input Validation**: Sanitizes and validates all user inputs
## 🧱 Architecture
```mermaid
graph TD
A[Webhook Received] --> B{Valid Payload?}
@ -24,25 +32,77 @@ graph TD
H -->|No| J[Process Command]
```
### Alias for actions
- I want that, when an user sends `/tarea` to the bot, with no extra arguments, it should show all the pending tasks for the user in a private message (the same behaviour as calling `/tarea mostrar`