Skip to content

Commit 0a59ea4

Browse files
committed
docs: adjust readme
1 parent 47414f5 commit 0a59ea4

1 file changed

Lines changed: 61 additions & 5 deletions

File tree

README.md

Lines changed: 61 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
[![MongoDB](https://img.shields.io/badge/MongoDB-%234ea94b.svg?logo=mongodb&logoColor=white)](https://www.mongodb.com/)
99
[![Notion](https://img.shields.io/badge/Notion-000?logo=notion&logoColor=fff)](https://www.notion.com/)
1010
[![WAHA](https://img.shields.io/badge/WAHA-25d366?logo=WhatsApp&logoColor=fff)](https://waha.devlike.pro/)
11+
[![Chatery](https://img.shields.io/badge/Chatery-25D366?logo=WhatsApp&logoColor=fff)](https://chatery.com/)
1112

1213
A FastAPI application that connects to the Notion API and provides RAG (Retrieval-Augmented Generation) capabilities using MongoDB Atlas Vector Search and Google AI Studio.
1314

@@ -55,11 +56,17 @@ MIN_SIMILARITY_SCORE=0.7
5556
CORS_ALLOW_ORIGINS=could be '*' or specific origins here
5657
API_SECRET_KEY=generate_random_string_here
5758
58-
# WAHA configuration
59+
# WAHA configuration (optional - use WAHA or Chatery for WhatsApp integration)
5960
WHITELISTED_NUMBERS=your_comma_separated_phone_numbers_here
6061
WAHA_API_URL=your_url_to_waha_api_here
6162
WAHA_API_KEY=your_waha_api_key_here
6263
WAHA_SESSION_NAME=your_waha_session_name_here
64+
65+
# Chatery configuration (optional - alternative to WAHA)
66+
CHATERY_API_URL=https://api.chatery.com/v1
67+
CHATERY_API_KEY=your_chatery_api_key_here
68+
CHATERY_PHONE_NUMBER_ID=your_phone_number_id_here
69+
CHATERY_WEBHOOK_SECRET=your_webhook_secret_here
6370
```
6471

6572
### 2. MongoDB Atlas Setup
@@ -104,11 +111,15 @@ Once the server is running, visit:
104111
- Click "Share" → "Invite"
105112
- Search for your integration name and invite it
106113

107-
## WAHA (WhatsApp HTTP API) Setup
114+
## WhatsApp Integrations
115+
116+
Cloud Brain supports two WhatsApp integration options: **WAHA** (self-hosted) and **Chatery** (Cloud API). You can use either one or both simultaneously with different phone numbers.
117+
118+
### Option 1: WAHA (WhatsApp HTTP API)
108119

109120
WAHA enables WhatsApp integration, allowing your application to receive and respond to WhatsApp messages with AI-generated answers based on your Notion content.
110121

111-
### Quick Setup
122+
#### Quick Setup
112123

113124
1. **Install and run WAHA** using Docker:
114125
```bash
@@ -128,20 +139,65 @@ WAHA enables WhatsApp integration, allowing your application to receive and resp
128139

129140
4. **Set webhook URL** in WAHA dashboard to: `http://your-app-domain.com/waha/webhook`
130141

131-
### How it works
142+
#### How it works
132143
- Incoming WhatsApp messages are sent to your application via webhook
133144
- Only whitelisted numbers can interact with the bot
134145
- Messages are processed through the RAG system and responses are sent back via WhatsApp
135146

136147
For detailed installation, configuration, and production deployment instructions, visit the [WAHA official documentation](https://waha.devlike.pro/docs/overview/quick-start).
137148

138-
### Host Waha on Sumopod
149+
#### Host WAHA on Sumopod
139150

140151
Instead of running WAHA locally, you can host WAHA+ on SumoPod, which offers low cost hosting (starts from IDR20K/month) for small projects like this one. Follow these steps:
141152
- Sign up for an account on [SumoPod](https://sumopod.com/register?ref=397bb660-81e6-48b8-919d-c0868301d72f)
142153
- Deploy your WAHA instance by clicking the "Deploy Now" button below.
143154
- Once deployed, follow the setup guide above to configure your WAHA instance.
144155

156+
### Option 2: Chatery (WhatsApp Cloud API)
157+
158+
Chatery provides a cloud-based WhatsApp Business API integration without the need for self-hosting. This is a simpler alternative to WAHA for production deployments.
159+
160+
#### Quick Setup
161+
162+
1. **Create a Chatery account** and set up a WhatsApp Business connection:
163+
- Sign up at [Chatery](https://chatery.com)
164+
- Navigate to **Connections** > **Add New Connection** > **WhatsApp**
165+
- Connect your WhatsApp Business phone number
166+
167+
2. **Get API credentials** from Chatery dashboard:
168+
- Go to **Settings** > **API**
169+
- Copy your API URL, API Key, and Phone Number ID
170+
171+
3. **Configure environment variables** in your `.env` file:
172+
```env
173+
# Chatery Configuration
174+
CHATERY_API_URL=https://api.chatery.com/v1
175+
CHATERY_API_KEY=your_chatery_api_key_here
176+
CHATERY_PHONE_NUMBER_ID=your_phone_number_id_here
177+
CHATERY_WEBHOOK_SECRET=your_webhook_secret_here
178+
WHITELISTED_NUMBERS=1234567890,9876543210
179+
```
180+
181+
4. **Set webhook URL** in Chatery dashboard:
182+
```
183+
https://your-domain.com/chatery/webhook
184+
```
185+
186+
#### How it works
187+
- Incoming WhatsApp messages are sent to your application via webhook
188+
- Webhook requests are verified using the webhook secret
189+
- Only whitelisted numbers can interact with the bot
190+
- Messages are processed through the RAG system and responses are sent back via Chatery API
191+
192+
For detailed setup instructions, see the [Chatery Setup Guide](docs/chatery-setup.md).
193+
194+
#### Switching Between WAHA and Chatery
195+
196+
You can use either integration or both simultaneously:
197+
- **Chatery only**: Fill in Chatery env vars, leave WAHA env vars empty
198+
- **WAHA only**: Fill in WAHA env vars, leave Chatery env vars empty
199+
- **Both**: Configure both with different phone numbers and webhook URLs
200+
145201
## Development
146202

147203
### Running Tests

0 commit comments

Comments
 (0)