Skip to content

haloboy777/openchat

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OpenChat icon

OpenChat

One app. Every model.

A fast, lightweight chat client for OpenRouter on Android and iOS — talk to Claude, GPT, Gemini, Llama, and 400+ other models from a single, clean interface.

Flutter Dart Platform Storage


Why

Most AI chat apps lock you into one provider. OpenRouter already routes to every major model behind one API key — OpenChat is the missing mobile front-end: no accounts, no middleman servers, no telemetry. Your key and your conversations never leave your device.

Features

  • 🔀 Every model on OpenRouter — switch models mid-conversation from the app bar
  • Real streaming — tokens render as they arrive, with Markdown and code blocks
  • 💬 Sessions that persist — chat history lives in a local SQLite database
  • ✏️ Edit & regenerate — rewrite any of your messages and rerun the conversation from there
  • 🎛️ Provider filtering — hide the providers you never use from the model picker
  • 💰 Usage & balance — live account balance and daily/weekly/monthly spend straight from OpenRouter, plus on-device token and per-model stats
  • 🔐 Secure by default — API key stored in Android's encrypted keystore, everything else stays on-device
  • 🌗 Light / dark / system theme, with a custom system prompt option

Getting started

  1. Grab an API key from openrouter.ai/keys

  2. Build and install:

    flutter pub get
    flutter run --release
  3. Open Settings, paste your key, pick a model, chat.

Release builds

Release signing reads android/key.properties (gitignored). Create your own keystore:

keytool -genkeypair -v -keystore android/app/upload-keystore.jks \
  -alias openchat -keyalg RSA -keysize 2048 -validity 10000
# android/key.properties
storePassword=<password>
keyPassword=<password>
keyAlias=openchat
storeFile=upload-keystore.jks

Then flutter build apk --release. Without key.properties the build falls back to debug signing so it still runs.

For iOS, open ios/Runner.xcworkspace in Xcode, set your team under Signing & Capabilities, and run on your device.

Architecture

lib/
├── main.dart                  # App root, theming, routes
├── models/                    # ChatMessage, ChatSession, OpenRouterModel, usage stats
├── providers/
│   └── chat_provider.dart     # Single ChangeNotifier: sessions, streaming, usage
├── services/
│   ├── api_service.dart       # OpenRouter REST + SSE streaming client
│   ├── database_service.dart  # SQLite (sessions, messages, usage records)
│   └── storage_service.dart   # Secure key storage + preferences
├── screens/                   # Chat, Settings, Usage, Provider filter
└── widgets/                   # Message bubbles, model selector, session drawer

Plain Flutter + provider — no codegen, no DI framework, no backend. The whole app is ~2.5k lines of Dart.

Privacy

OpenChat talks to exactly one host: openrouter.ai. There is no analytics SDK, no crash reporter, and no server component. Delete the app and everything is gone.


Built with Flutter · Powered by OpenRouter

About

One app, every model — a lightweight Android & iOS chat client for OpenRouter

Topics

Resources

Stars

2 stars

Watchers

0 watching

Forks

Packages

 
 
 

Contributors

Languages