Skip to content

moazmo/TutorOps-Pro

Repository files navigation

TutorOps Pro — 24/7 AI WhatsApp Receptionist

Python FastAPI Docker Google Gemini

An always-on AI assistant that automatically responds to WhatsApp messages using Google Gemini.

FeaturesArchitectureQuick StartCustomization


📢 Demo Project
This is a fully functional demo designed to showcase AI-powered WhatsApp automation. It can be customized for any business — tutoring centers, clinics, retail, real estate, and more. Contact me for custom implementations.


✨ Features

Module Description
🤖 Smart Receptionist Answers questions 24/7 based on your knowledge base
📄 Financial Auditor Extracts payment data from Vodafone Cash/InstaPay receipts using AI vision
📱 WhatsApp Bridge Sends automated replies via WAHA (WhatsApp HTTP API)
🌐 Web Console Browser-based testing interface at /chat

🏗 Architecture

┌─────────────────┐      ┌─────────────────┐      ┌─────────────────┐
│   WhatsApp      │ ──▶  │  WAHA (Docker)  │ ──▶  │  Python Server  │
│   (Your Phone)  │ ◀──  │  localhost:3000 │ ◀──  │  localhost:8000 │
└─────────────────┘      └─────────────────┘      └─────────────────┘
                                                          │
                                                          ▼
                                                  ┌─────────────────┐
                                                  │  Google Gemini  │
                                                  │  (AI Brain)     │
                                                  └─────────────────┘

How It Works

  1. User sends WhatsApp message → WAHA container receives it
  2. Webhook triggers → FastAPI server processes the message
  3. Gemini AI generates response → Based on your knowledge base
  4. Reply sent automatically → Via WAHA back to WhatsApp

🚀 Quick Start

Prerequisites

  • Python 3.10+
  • Docker Desktop
  • Google Gemini API Key (Get one free)
  • ngrok account (optional, for public webhooks)

1. Clone & Install

git clone https://github.com/moazmo/TutorOps-Pro.git
cd TutorOps-Pro

# Create virtual environment
python -m venv .venv
.venv\Scripts\Activate.ps1  # Windows
# source .venv/bin/activate  # Linux/Mac

# Install dependencies
pip install -r requirements.txt

2. Configure Environment

# Copy example and add your keys
cp .env.example .env

Edit .env:

GOOGLE_API_KEY=your_gemini_api_key
NGROK_AUTH_TOKEN=your_ngrok_token  # Optional

3. Start Services

# Start WAHA container
docker-compose up -d

# Start Python server
python server.py

4. Connect WhatsApp

  1. Open http://localhost:3000/dashboard
  2. Configure API Key: tutorops
  3. Click Start on the default session
  4. Scan QR code with WhatsApp → Linked Devices

📁 Project Structure

TutorOps-Pro/
├── server.py              # FastAPI server with /chat and /webhook endpoints
├── tutorops_core.py       # AI logic using Google Gemini
├── whatsapp_bridge.py     # WAHA HTTP API wrapper
├── center_knowledge.txt   # Knowledge base (customize this!)
├── docker-compose.yml     # WAHA container configuration
├── requirements.txt       # Python dependencies
└── .env.example           # Environment template

🎨 Customization for Clients

This demo uses a tutoring center as an example, but the system is industry-agnostic. Here's how to adapt it:

1. Edit the Knowledge Base

Modify center_knowledge.txt with your business info:

BUSINESS NAME: Your Business Name
CONTACT: your@email.com
--- SERVICES ---
* Service 1: Description
* Service 2: Description
--- PRICING ---
* Basic: $99/month
* Premium: $199/month
--- HOURS ---
* Mon-Fri: 9 AM - 6 PM

2. Customize AI Personality

In tutorops_core.py, modify the prompt in smart_receptionist():

prompt = f"""
ACT AS: The professional assistant for '{your_business}'.
TONE: Friendly, professional
# ... customize as needed
"""

Industries This Works For

  • 🏫 Tutoring Centers & Schools
  • 🏥 Medical Clinics
  • 🏠 Real Estate Agencies
  • 🛒 E-commerce Support
  • 🍕 Restaurants & Delivery
  • 💼 Any service-based business

🛠 API Endpoints

Endpoint Method Description
/ GET Health check
/chat GET Web testing interface
/chat POST Send message, get AI response
/webhook POST WAHA webhook receiver

🐛 Troubleshooting

Issue Solution
"Server connection failed" in Dashboard Enter API Key tutorops in Dashboard settings
QR Code not appearing Click "Start" button on the session
Messages not sending Restart Python server
Port 8000 in use taskkill /F /IM python.exe (Windows)

📜 License

MIT License — Free for personal and commercial use.


📫 Contact

Moaz Mohamed
📧 moazmo27@gmail.com
🐙 github.com/moazmo

Interested in a custom implementation for your business? Let's talk!

About

24/7 AI WhatsApp Receptionist powered by Google Gemini

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages