Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

8 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

<<<<<<< HEAD

πŸ€– BremaAI

Brema AI Logo

A Modern, Cross-Platform AI Assistant

Built with Flutter, FastAPI, and designed for future C++ AI Engine integration.

Flutter FastAPI Python License Platform


πŸ“– Overview

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

✨ Features

Current

  • βœ… 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

Planned

  • πŸ’¬ 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

πŸ— Project Architecture

                 Flutter Frontend
                        β”‚
                        β–Ό
                 FastAPI Backend
                        β”‚
                 AI Provider Router
                        β”‚
      β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
      β–Ό           β–Ό              β–Ό              β–Ό
   Mock AI     Ollama         Gemini        OpenAI
                                                β”‚
                                                β–Ό
                                       Future C++ AI Engine

πŸ“‚ Project Structure

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

πŸš€ Getting Started

Clone

git clone https://github.com/bundlab/brema_ai.git

cd brema_ai

Backend

Create Virtual Environment

cd backend

python3 -m venv venv

source venv/bin/activate

Install dependencies

pip install -r requirements.txt

Copy the environment file

cp .env.example .env

Run the server

uvicorn app.main:app --reload

Backend URL

http://127.0.0.1:8000

API Documentation

http://127.0.0.1:8000/docs

Frontend

cd frontend

flutter pub get

flutter run

AI Providers

Brema 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=mock

Future options:

DEFAULT_PROVIDER=ollama
DEFAULT_PROVIDER=gemini
DEFAULT_PROVIDER=openai

Technologies

Frontend

  • Flutter
  • Dart
  • Material 3

Backend

  • FastAPI
  • Python
  • HTTPX
  • Pydantic

Future AI

  • Ollama
  • Gemini
  • OpenAI
  • CUDA
  • Tensor Engine
  • C++

Roadmap

Phase 1

  • Flutter Desktop
  • FastAPI Backend
  • Provider Router

Phase 2

  • Beautiful UI
  • Markdown
  • Streaming

Phase 3

  • Image Upload
  • PDF Analysis
  • Voice Support

Phase 4

  • Local AI
  • CUDA
  • C++ Engine

Phase 5

  • Enterprise Features
  • Authentication
  • Cloud Sync

Contributing

Contributions are welcome.

Please read the CONTRIBUTING.md guide before submitting issues or pull requests.


License

This project is licensed under the MIT License.

See the LICENSE file for details.


Author

Abdullahi Bundi

Software Engineer β€’ AI Developer β€’ Open Source Contributor

GitHub

https://github.com/bundlab


Made with ❀️ using Flutter, FastAPI, and Open Source Technologies.

======= # BremaAI

Frontend: Flutter Backend: FastAPI Issues Stars License

A 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

Features

  • 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

Architecture

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.


Preview

Place screenshots in assets/screenshots/ and they will render here. Example image placeholders:

App main screen

Conversation and code view

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.

Quick start

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)

  1. Create a virtual environment and install dependencies

    python -m venv .venv source .venv/bin/activate pip install -r backend/requirements.txt

  2. Start the FastAPI server (example)

    uvicorn backend.main:app --reload --host 0.0.0.0 --port 8000

Run the frontend (Flutter)

  1. Fetch dependencies

    flutter pub get

  2. 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.

Development

  • 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

Configuration

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.


Troubleshooting

  • 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.

Contributing

Contributions are welcome. Suggested workflow:

  1. Fork the repository
  2. Create a branch: feature/<name> or fix/<issue>
  3. Commit with a clear message
  4. Open a pull request describing the changes

Please include tests for any non-trivial backend logic and follow existing code style conventions.


License

Add or update a LICENSE file in the repository root to make the project license explicit (e.g., MIT, Apache-2.0).


Support & Contact

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

About

πŸš€ A modular, cross-platform AI assistant built with Flutter, FastAPI, and C++, supporting local and cloud AI providers with a scalable multimodal architecture.

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages