How chillandbuild/aira-ai works
AIRA is a multi-tenant lead-management and customer-engagement product: its Android companion syncs call logs, while the web dashboard supports business and operator workflows backed by a FastAPI service. A central customer path is an inbound WhatsApp webhook, conversation handling, AI-assisted reply, and channel response; the dashboard separately manages leads, knowledge, deals, analytics, and calling. Groups reflect these product areas and the backend’s shared runtime. The README is empty, so feature coverage is inferred from the source tree; unsampled components and relationships are shown conservatively.
Main entry points: DashboardClient.tsx Dashboard · ai_reply.py AI Reply Engine · webhook.py WhatsApp Webhook · SyncWorker.kt Sync Worker
Components 31
Android Sync
- Sync Service
android/app/src/main/java/com/aira/sync/SyncService.kt - Sync Worker
android/app/src/main/java/com/aira/sync/SyncWorker.kt - Call Log Reader
android/app/src/main/java/com/aira/sync/CallLogReader.kt - API Client
android/app/src/main/java/com/aira/sync/AiraApi.kt - Sync Preferences
android/app/src/main/java/com/aira/sync/Prefs.kt
Web Dashboard
- Auth Context
frontend/app/dashboard/contexts/AuthRoleContext.tsx - Dashboard
frontend/app/dashboard/DashboardClient.tsx - Lead Workspace
frontend/app/dashboard/leads/LeadsClient.tsx - Inbound Leads
frontend/app/dashboard/inbound-leads/InboundLeadsClient.tsx - Brain Workspace
frontend/components/brain/useBrainData.ts - Telecalling
frontend/app/dashboard/telecalling/lib/useCallingCockpit.ts
Backend API
- API App
backend/app/main.py - WhatsApp Webhook
backend/app/routes/webhook.py - HTTP Routes
backend/app/routes - Auth Dependencies
backend/app/dependencies/auth.py - Supabase Client
backend/app/db/supabase.py - Tenant Settings
backend/app/config_dynamic.py - Supabase
Conversation Intelligence
- AI Reply Engine
backend/app/services/ai_reply.py - Knowledge Service
backend/app/services/knowledge_service.py - Gemini Client
backend/app/services/gemini_client.py - Lead Scoring
backend/app/services/scoring_engine.py
Business Operations
- Paid Intake
backend/app/services/intake.py - Deal Engine
backend/app/services/deal_engine.py - Deal Service
backend/app/services/deals.py - Call AI Pipeline
backend/app/services/call_ai_pipeline.py
Other components
- Phone User
- Business User
- Messaging Customer
- Meta Messaging
- Razorpay
Connections 35
- Phone User → Sync Service: starts sync
- Sync Service → Sync Worker: schedules
android/app/src/main/java/com/aira/sync/SyncService.kt - Sync Worker → Call Log Reader: reads calls
android/app/src/main/java/com/aira/sync/SyncWorker.kt - Sync Worker → API Client: uploads logs
android/app/src/main/java/com/aira/sync/SyncWorker.kt - Sync Worker → Sync Preferences: reads settings
android/app/src/main/java/com/aira/sync/SyncWorker.kt - Business User → Auth Context: signs in
- Auth Context → Dashboard: provides role
frontend/app/dashboard/DashboardClient.tsx - Dashboard → Lead Workspace: opens leads
- Dashboard → Inbound Leads: opens inbound
- Dashboard → Brain Workspace: opens brain
- Dashboard → Telecalling: opens calling
- API App → Auth Dependencies: uses auth
backend/app/main.py - API App → HTTP Routes: registers routes
backend/app/main.py - API App → WhatsApp Webhook: registers webhook
backend/app/main.py - WhatsApp Webhook → Supabase Client: gets database
backend/app/routes/webhook.py - Supabase Client → Supabase: queries
backend/app/db/supabase.py - Tenant Settings → Supabase Client: reads settings
backend/app/config_dynamic.py - WhatsApp Webhook → Messaging Customer: receives messages
- Meta Messaging → WhatsApp Webhook: posts events
- WhatsApp Webhook → AI Reply Engine: handles replies
backend/app/routes/webhook.py - AI Reply Engine → Knowledge Service: retrieves context
backend/app/services/ai_reply.py - AI Reply Engine → Gemini Client: calls model
backend/app/services/ai_reply.py - AI Reply Engine → Meta Messaging: sends response
- AI Reply Engine → Supabase: reads and writes
backend/app/services/ai_reply.py - Knowledge Service → Supabase: reads knowledge
backend/app/services/knowledge_service.py - Gemini Client → Tenant Settings: gets credentials
backend/app/services/gemini_client.py - Lead Scoring → Gemini Client: classifies lead
backend/app/services/scoring_engine.py - Lead Scoring → Supabase: reads lead data
backend/app/services/scoring_engine.py - Paid Intake → Deal Engine: uses deal rules
backend/app/services/intake.py - Paid Intake → Deal Service: uses deal service
backend/app/services/intake.py - Paid Intake → Razorpay: creates payment
- Deal Service → Deal Engine: uses deal rules
backend/app/services/deals.py - Deal Service → Supabase: reads and writes
backend/app/services/deals.py - Call AI Pipeline → Supabase: tracks processing
backend/app/services/call_ai_pipeline.py - Call AI Pipeline → Meta Messaging: fetches recordings