A WhatsApp chatbot for task management, designed to work with Evolution API in a secure internal network environment.
### Core Principles
## 📌 Overview
1. **Trust-but-Verify Approach**: Leverage WhatsApp's message metadata to minimize API calls while maintaining security
This service provides a WhatsApp interface for task management within WhatsApp groups. It:
2. **Progressive Validation**: Verify users naturally through interactions rather than upfront checks
- Listens for `/tarea` commands in WhatsApp groups
3. **Background Reconciliation**: Use periodic syncs to maintain data accuracy without impacting real-time performance
- 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
```mermaid
graph TD
graph TD
A[Webhook Received] --> B{Valid Payload?}
A[Webhook Received] --> B{Valid Payload?}
@ -24,25 +32,77 @@ graph TD
H -->|No| J[Process Command]
H -->|No| J[Process Command]
```
```
### Alias for actions
## ✅ Current Features
- Task creation with optional due dates
- 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`