Bemba Bot is an AI-powered conversational agent for Bemba speakers, not a dictionary/translation tool.
# BembaBot — English–Bemba Dictionary & Chatbot
An open-source Flutter chatbot and translation tool for English and **Bemba** (iciBemba), one of Zambia's most widely spoken languages. Powered by AI intent matching, Supabase, and Google Translate.
## Features
- **Bilingual Chat** — Conversational interface that understands and responds in Bemba
- **Dictionary** — Intent-backed word and phrase lookup with Bemba ↔ English translations
- **Translator** — Sentence and phrase translation via Google Translate API fallback
- **Smart Matching** — Rule-based keyword intent engine with 50+ curated intents
- **Usage Examples** — Contextual sample sentences for common phrases
- **Grammatical Notes** — Built into intent responses to help learners
- **Pronunciation Guides** — Phonetic-friendly Bemba responses in every intent
- **Daily Free Tier** — 20 messages/day free; 7-day trial with unlimited access
- **Offline History** — Chat persistence via SharedPreferences
## Goals
- Promote learning and usage of Bemba (iciBemba)
- Provide a reliable resource for translators, students, educators, and linguists
- Encourage community collaboration to expand the dictionary and intent catalog
## Tech Stack
| Layer | Technology |
|-------|------------|
| Frontend | Flutter (Dart) + Riverpod + GoRouter |
| Backend | Supabase (PostgreSQL, Auth, Edge Functions) |
| State Management | Riverpod (`StateNotifier`) |
| Routing | GoRouter (3 routes: onboarding, chat, subscription) |
| Persistence | SharedPreferences (local), Supabase (remote) |
| Chat Engine | Deno Edge Function with keyword-intent matching |
| Translation | Google Translate Cloud API (fallback) |
| Monetization | In-app purchase (Google Play — stubbed) |
| UI Theme | Material 3 — Green/Gold/Warm Beige + Poppins font |
## Architecture
```
lib/
├── main.dart # Entry point, Supabase init, ProviderScope
├── app.dart # MaterialApp.router
├── core/
│ ├── config/env.dart # Supa …