<<<<<<< HEAD
Built with Flutter, FastAPI, and designed for future C++ AI Engine integration.
Brema AI is an open-source, modular AI assistant designed to deliver a fast, secure, and extensible conversational experience across desktop, mobile, and web platforms.
Unlike traditional AI clients that depend on a single provider, Brema AI uses a provider-based architecture, allowing seamless switching between local and cloud AI models without modifying the frontend.
The project is built with:
- π¨ Flutter (Cross-platform UI)
- β‘ FastAPI (Backend API)
- π§ Provider-based AI Router
- π₯οΈ Local AI support (Ollama)
- βοΈ Cloud AI support (Gemini, OpenAI)
- π Future C++/CUDA AI Engine integration
- β Flutter Desktop Application
- β FastAPI REST Backend
- β Modular AI Router
- β Mock AI Provider
- β Provider Switching Architecture
- β Environment-based Configuration
- β Modern Chat UI
- β RESTful API
- β Markdown-ready Responses
- π¬ Streaming AI Responses
- π Multiple Conversations
- π PDF & Document Analysis
- πΌοΈ Image Understanding
- π€ Voice Input
- π Text-to-Speech
- π Drag & Drop Attachments
- π Web Support
- π± Android & iOS
- π§ Memory & Context Management
- βοΈ Settings Page
- π Light/Dark Themes
- πΎ Local Chat History
- π Authentication
- π€ Local C++ AI Engine
- π CUDA Acceleration
Flutter Frontend
β
βΌ
FastAPI Backend
β
AI Provider Router
β
βββββββββββββ¬βββββββββββββββ¬βββββββββββββββ
βΌ βΌ βΌ βΌ
Mock AI Ollama Gemini OpenAI
β
βΌ
Future C++ AI Engine
brema_ai/
βββ backend/
β βββ app/
β β βββ api/
β β βββ core/
β β βββ models/
β β βββ services/
β β βββ schemas/
β β
β βββ requirements.txt
β βββ .env.example
β
βββ frontend/
β βββ lib/
β β βββ models/
β β βββ screens/
β β βββ services/
β β βββ widgets/
β β βββ main.dart
β β
β βββ assets/
β βββ pubspec.yaml
β
βββ LICENSE
βββ CONTRIBUTING.md
βββ README.md
git clone https://github.com/bundlab/brema_ai.git
cd brema_aicd backend
python3 -m venv venv
source venv/bin/activateInstall dependencies
pip install -r requirements.txtCopy the environment file
cp .env.example .envRun the server
uvicorn app.main:app --reloadBackend URL
http://127.0.0.1:8000
API Documentation
http://127.0.0.1:8000/docs
cd frontend
flutter pub get
flutter runBrema AI supports multiple providers through a unified interface.
| Provider | Status |
|---|---|
| Mock | β |
| Ollama | π§ |
| Gemini | π§ |
| OpenAI | π§ |
| C++ AI Engine | π |
Provider selection is controlled using the .env configuration.
Example:
DEFAULT_PROVIDER=mockFuture options:
DEFAULT_PROVIDER=ollamaDEFAULT_PROVIDER=geminiDEFAULT_PROVIDER=openai- Flutter
- Dart
- Material 3
- FastAPI
- Python
- HTTPX
- Pydantic
- Ollama
- Gemini
- OpenAI
- CUDA
- Tensor Engine
- C++
- Flutter Desktop
- FastAPI Backend
- Provider Router
- Beautiful UI
- Markdown
- Streaming
- Image Upload
- PDF Analysis
- Voice Support
- Local AI
- CUDA
- C++ Engine
- Enterprise Features
- Authentication
- Cloud Sync
Contributions are welcome.
Please read the CONTRIBUTING.md guide before submitting issues or pull requests.
This project is licensed under the MIT License.
See the LICENSE file for details.
Abdullahi Bundi
Software Engineer β’ AI Developer β’ Open Source Contributor
GitHub
Made with β€οΈ using Flutter, FastAPI, and Open Source Technologies.
======= # BremaAIA polished, desktop-first AI chat application built with Flutter (frontend) and FastAPI (backend), targeting Ubuntu 24.04 LTS. BremaAI delivers a fast, native-feeling chat experience powered by Google Generative AI (Gemini) and optimized for developer workflows: markdown rendering, syntax-highlighted code blocks, selectable text, and a minimal desktop UI.
Table of contents
- Features
- Architecture
- Preview
- Quick start
- Development
- Configuration
- Troubleshooting
- Contributing
- License
- Support
- High-performance AI responses (Gemini 2.5 Flash-Lite)
- Native Linux (Ubuntu) optimizations and desktop-friendly UI
- Beautiful Markdown rendering with syntax highlighting (Python, JavaScript, etc.)
- Selectable and copyable text for easy reuse of answers and code
- Lightweight, responsive UI built with Flutter
- Robust backend API built with FastAPI for low-latency, scalable requests
BremaAI is split into two main components:
-
Frontend β Flutter (Dart)
- Desktop-first UI, runnable on Linux using Flutter's linux target
- Handles UI, local state, and rendering of Markdown & code blocks
-
Backend β FastAPI (Python)
- Exposes endpoints that proxy and manage requests to the chosen AI provider (Gemini)
- Responsible for authentication, rate limiting, request batching, and any server-side business logic
This separation keeps the UI lightweight while enabling secure key management, caching, and scalable compute on the server side.
Place screenshots in assets/screenshots/ and they will render here. Example image placeholders:
Tips:
- Use PNG or WebP images with a width of 1280px for best clarity on large displays.
- Commit images to
assets/screenshots/using the filenames above or update the links below.
Prerequisites
- Flutter SDK (stable channel recommended)
- Python 3.10+ and pip
- Ubuntu 24.04 LTS (primary target for desktop builds)
- A valid API key for the configured AI provider (Gemini)
Run the backend (FastAPI)
-
Create a virtual environment and install dependencies
python -m venv .venv source .venv/bin/activate pip install -r backend/requirements.txt
-
Start the FastAPI server (example)
uvicorn backend.main:app --reload --host 0.0.0.0 --port 8000
Run the frontend (Flutter)
-
Fetch dependencies
flutter pub get
-
Run the app on Linux
flutter run -d linux --dart-define=API_URL=http://localhost:8000 --dart-define=API_KEY=YOUR_API_KEY_HERE
Notes
- Replace YOUR_API_KEY_HERE with your actual API key. For local development you can pass it via dart-define or configure the backend to read it from a secure environment variable.
- For production, keep API keys secret and manage them via a secrets manager or CI/CD environment variables.
- Recommended editors: Visual Studio Code, Android Studio, or IntelliJ IDEA.
- Use hot reload and hot restart for fast UI iteration.
- Project layout follows a conventional split:
- backend/ β FastAPI server and API code
- frontend/ β Flutter application (desktop target)
Useful commands
- flutter analyze β run static analysis
- flutter test β run tests (if available)
- flutter build linux β build a production Linux binary
- uvicorn backend.main:app --reload β run backend in development
The app uses two main configuration points:
- API_KEY β your AI provider key (used by backend or directly by the client if configured that way)
- API_URL β backend endpoint (e.g., http://localhost:8000)
Example local run:
flutter run -d linux --dart-define=API_URL=http://localhost:8000 --dart-define=API_KEY=YOUR_API_KEY_HERE
Adjust the backend configuration in backend/.env or environment variables as needed.
- If Flutter cannot target Linux, ensure desktop support is enabled and system dependencies are installed (see
flutter doctor). - If the backend returns errors, check the FastAPI logs and confirm your API key and provider quotas.
- CORS issues: if the frontend communicates directly to the backend, ensure CORS middleware is configured in FastAPI.
Contributions are welcome. Suggested workflow:
- Fork the repository
- Create a branch:
feature/<name>orfix/<issue> - Commit with a clear message
- Open a pull request describing the changes
Please include tests for any non-trivial backend logic and follow existing code style conventions.
Add or update a LICENSE file in the repository root to make the project license explicit (e.g., MIT, Apache-2.0).
For bug reports or feature requests, open an issue in this repository. For direct maintainer contact, add a maintainer email or handle in this section.
Made with care β Bundlab
origin/main

