Overview
Have you ever wanted to implement a chat in your application? Do you think it's difficult and complex?
Try this, thanks to the magnificent Supabase platform and the Flutter Chat UI package, you can achieve it in just a few minutes and effortlessly.

Flyer Chat is a platform for creating in-app chat experiences using Flutter. This is the documentation of flutter_supabase_chat_core, the Supabase backend for flutter_chat_core and flutter_chat_ui 2.x.
Coming from 1.x (flutter_chat_types)? 2.0 changes both the Dart API and the database schema: read MIGRATION.md.
How it works
Everything lives in a dedicated chats Postgres schema, protected by Row Level Security:
chats.usersholds the chat profiles (names, avatar, last seen). A row is created by a trigger for every Supabase Auth user, so every chat user must be registered with Supabase Authentication (or a third-party auth provider configured in Supabase) andchats.users.idmatchesauth.users.id.chats.roomsholds the conversations:direct(1-to-1) orgroup, with a name, an avatar, custom metadata and a snapshot of the last message.chats.room_memberslinks users to rooms, with a per-roomrole(admin,moderatoror none) and the member's own state: when they last read the room, whether they pinned or muted it.chats.messagesholds the messages, with the same field names asflutter_chat_core'sMessage. It is partitioned by week to stay fast as history grows.
Two views, chats.rooms_l and chats.messages_l, are what the client reads: rooms_l adds the members, the caller's unread count and preferences, and the other member's name for direct rooms.
Writes that touch other people's rows (creating a room with its members, read receipts, reactions, pins) go through SECURITY DEFINER functions that check membership themselves. See Security Rules.
Supabase Realtime keeps the UI live: message changes travel on a private Broadcast channel per room, sent by a database trigger; the rooms list follows Postgres Changes; online status uses Presence. See Realtime.
Supabase Storage holds attachments (chats_assets, one folder per room) and avatars (chats_user_avatar, one folder per user), both private buckets.
On the Flutter side, the package provides:
SupabaseChatCore: rooms, members, users, messages, uploads and presence;SupabaseChatRoomsController: a live, paginated rooms list;SupabaseChatController: aflutter_chat_coreChatControllerfor one room, to pass toflutter_chat_ui'sChat;UserOnlineStateObserverandUserOnlineStatusWidgetfor online status.
Motivation
Ever estimated a simple chat for weeks of work? Didn't want to start because it is always the same boring work for an extended period of time? Was it moved to post MVP because of lack of time and resources? Were you left with a frustrated client, who couldn't understand why the thing that exists in almost every app takes that much time to implement?
We are trying to solve all this by working on a Flyer Chat.
You will say that there are libraries out there that will help create chats, but we are working on a more complete solution - very similar on completely different platforms like React Native and Flutter (we don't always work in just one) with an optional Supabase BaaS, since chat is not only UI. We are making this free and open-source so together we can create a product that works for everyone.