BaruaPlus Backend is a robust, enterprise-grade messaging platform built with Python and Flask that simplifies multi-channel communication for businesses of all sizes. The name "Barua" comes from the Swahili word for "letter" or "message", reflecting our mission to make messaging across different platforms as simple as sending a traditional letter.
## 📖 Overview
BaruaPlus Backend is a powerful Flask-based messaging platform that enables businesses and developers to send and schedule messages across multiple channels including Email, WhatsApp, SMS, and Telegram. Built with scalability and reliability in mind.
## ✨ Features
- 📧 **Multi-Channel Messaging** - Send messages via Email (Gmail), WhatsApp (Twilio), SMS, and Telegram
- ⏰ **Scheduled Messages** - Automate message delivery with customizable intervals
- 👥 **Recipient Management** - Organize contacts with groups and communication preferences
- 🔧 **Message Builder** - Flexible message creation with category support
- 🔐 **Secure Authentication** - User registration and login with session management
- 📊 **Comprehensive Logging** - Detailed logging for debugging and monitoring
- 🎯 **Message Categories** - Organize messages by type (Billing, Newsletter, Marketing, etc.)
## 🚀 Quick Start
### Prerequisites
- Python 3.8 or higher
- PostgreSQL database
- Gmail API credentials
- Twilio account (for WhatsApp/SMS)
### Installation
1. **Clone the repository**
```bash
git clone
github.com
cd baruaPlusBackend
```
2. **Create and activate virtual environment**
```bash
python -m venv venv
# On macOS/Linux
source venv/bin/activate
# On Windows
venv\Scripts\activate
```
3. **Install dependencies**
```bash
pip install -r requirements.txt
```
4. **Configure environment variables**
Create a `.env` file in the root directory:
```env
DATABASE_URL=postgresql://user:password@localhost/barua_plus
SECRET_KEY=your-secret-key-here
GMAIL_CLIENT_ID=your-gmail-client-id
GMAIL_CLIENT_SECRET=your-gmail-client-secret
TWILIO_ACCOUNT_SID=your-twilio-account-sid
TWILIO_AUTH_TOKEN=your-twilio-auth-token
```
5. **Initialize database**
```bash
flask db init
flask db migrate -m "Initial migration"
flask db upgrade
```
6. **Run the application**
```bash
flask run
```
The server will start at `
localhost`
## 📁 Project Structu …