Skip to content

Latest commit

 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

#DataBased WhatsApp Chatbot

This repository contains a scaffold for a premium BSNL WhatsApp chatbot: FastAPI backend, SQLite DB models, WhatsApp webhook, OTP auth, and stubs for AI, voice, payments, and Fiber flows.

Quick start

  1. Create a virtual env and install:
python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
  1. Copy environment file and fill keys:
cp .env.example .env
# edit .env to add TWILIO / OPENAI / UPI values
  1. Run the app:
uvicorn app.main:app --reload --host 0.0.0.0 --port 8000

WhatsApp webhook

Configure your WhatsApp provider (Twilio / Meta Cloud API) to forward incoming messages to /webhook.

Mermaid workflow (paste into GitHub or Mermaid live editor):

flowchart TD
  User-->WhatsAppChatbot
  WhatsAppChatbot-->Menu[Main Menu]
  Menu-->OTP[OTP Verification]
  OTP-->FastAPI
  FastAPI-->DB[Database / Services]
  DB-->FastAPI
  FastAPI-->WhatsAppChatbot
  WhatsAppChatbot-->User
  subgraph Escalation
    UserIssue-->Chatbot
    Chatbot-->TicketCreated
    TicketCreated-->HumanAgent
  end
Loading

Files added

  • app/main.py — FastAPI app + webhook and sample endpoints
  • app/db.py — SQLModel/SQLite engine
  • app/models.py — core models (User, Ticket, Transaction)
  • app/services.py — business logic stubs
  • app/utils.py — OTP + helpers
  • requirements.txt — Python deps
  • .env.example — env vars template

Next steps

  • Wire actual WhatsApp provider credentials
  • Implement payment gateway webhook (UPI)
  • Integrate OpenAI (or other LLM) for AI chat
  • Add voice transcription (Whisper) and multilingual support

If you want, I can now implement the WhatsApp webhook routing for menu flows and OTP end-to-end.

Releases

Packages

Contributors

Languages