Production-ready AI financial assistant for South African SMEs with multi-tenant architecture, WhatsApp/Telegram integration, and Vercel Workflows
# EquiLedger AI Financial Assistant
## 🚀 **Production-Ready Multi-Tenant AI Financial Assistant**
A comprehensive AI-powered financial management system for South African SMEs, featuring WhatsApp/Telegram integration, VAT compliance, and multi-tenant architecture.
## ✨ **Key Features**
- **🤖 AI Financial Assistant**: Natural language processing for financial tasks
- **📱 Multi-Channel Support**: WhatsApp + Telegram integration
- **🏢 Multi-Tenant Architecture**: Secure business isolation
- **📊 VAT Compliance**: South African tax regulations built-in
- **💼 Invoice Management**: PDF generation and tracking
- **📈 Financial Reporting**: Real-time insights and summaries
- **🔗 External Integrations**: Xero, QuickBooks, banking APIs
- **🌐 Web Dashboard**: Subscription management and data import
## 🏗️ **Architecture**
### **Tech Stack**
- **Frontend/Backend**: Next.js 14 (App Router)
- **Database**: Supabase (PostgreSQL with RLS)
- **ORM**: Prisma with multi-tenant schema
- **AI**: Vercel AI SDK + OpenAI
- **Workflows**: Vercel Workflows
- **Messaging**: Twilio WhatsApp + Telegram Bot API
- **Deployment**: Vercel
### **Multi-Tenant Strategy**
- **Database**: Single database, shared schema with business_id
- **Isolation**: Row Level Security (RLS) + application-level checks
- **Context**: Business ID injected in all operations
- **Security**: Signature verification + rate limiting
## 🚀 **Quick Start**
### **Prerequisites**
- Node.js 18+
- PostgreSQL database (Supabase recommended)
- OpenAI API key
- Twilio account (WhatsApp + SMS)
- Telegram Bot Token
### **Installation**
```bash
# Clone the repository
git clone
github.com
cd equiledger-ai
# Install dependencies
npm install
# Set up environment variables
cp .env.example .env.local
# Fill in your environment variables
# Set up database
npx prisma generate
npx prisma db push
# Start development server
npm run dev
```
### **Environment Variables**
```bash
# Database
DATABASE_URL …