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 β¦