Streaming AI Chat App
AI chat that streams replies live — with visible reasoning, tool calls and a multi-provider model catalog
A Flutter AI-conversations app where every reply streams over a live WebSocket connection, with the model's reasoning steps and tool calls (web search, automatic model routing) visible as they happen. Sign-in is a passwordless magic link — the app is usable as a guest before that — and users pick from a searchable, multi-provider model catalog with free and premium tiers.
The repository is private. The WebSocket streaming pipeline with live reasoning and tool-call traces, the guest-first auth flow and the model catalog are broken down below.
About this project
A Flutter chat app built around a real-time generation pipeline: sending a message kicks off a job on the backend, and the client opens a WebSocket connection scoped to that job ID to receive incremental updates — assistant text, reasoning ("thinking") text and tool-call results all stream in as separate event types rather than one flat text blob. The chat UI reflects that structure directly: a collapsible "steps" panel shows the model's reasoning and any tools it invoked (web search, automatic engine/model routing) with per-step timing, while the final answer renders as markdown with inline citations built from the search results.
Sign-in is a passwordless magic-link flow: enter an email, the app polls the backend for up to 5 minutes while the user clicks the link from their inbox, and a token exchange completes the session — there is no password at all. Crucially, the app doesn't gate chat behind that flow: a guest session (its own short-lived token) is created automatically on first launch so a new user can start chatting immediately, with magic-link sign-in only required to save history or unlock premium models.
The settings screen exposes a searchable, multi-provider model catalog with free and premium tiers — each model filterable by provider, searchable, and favoritable. Free and premium models sit in the same list; selecting a premium one opens an in-app subscription paywall.
Under the hood: Clean Architecture layering (data/domain/presentation per feature) with get_it + injectable for dependency injection, BLoC/Cubit state management throughout, Dio for REST, freezed/json_serializable for models, and flutter_secure_storage for the auth tokens. bloc_test + mocktail tests cover the auth polling state machine, chat streaming reducers and model-catalog logic.
Key features
- Streaming chat over a per-message WebSocket job, with the model's reasoning steps and tool calls (web search, automatic engine routing) visible live, not just the final answer
- Passwordless magic-link sign-in with a background poll-for-verification flow, and a guest session so chat works before any sign-in at all
- Multi-provider AI model catalog with search, provider filtering and per-model favoriting
- Full message lifecycle: edit a previous message and regenerate from there, stop generation mid-stream, like/dislike feedback per reply, and resumable chat history
- In-app subscription paywall for premium models, gated per model
- Clean Architecture (data/domain/presentation) with get_it + injectable dependency injection keeping provider and networking code isolated
More in AI & Automation

AI Student Summarizer
An AI-agent prototype that turns a student's attendance, notes and grades into one narrative teacher-facing summary
A TypeScript backend prototype built around one idea: give a teacher a single narrative overview of a student — strengths, gaps, and next steps — generated by an OpenAI agent that decides which of six data tools to call (student info, attendance, notes, grades, assessment results, attendance register) rather than being handed one flat prompt.
~/sherazi.dev$./say-hello
Say hello.
Questions about a case study, one of the packages, AI tooling or Flutter in general are always welcome.
// or browse the packages on pub.dev(opens in a new tab)