veta_chat_kit_firebase

Firestore + FirebaseAuth adapter for veta_chat_kit. Realtime threads, presence, and typing indicators.

⚠️ Firestore setup required. From your app directory, run:

dart run veta_firebase_setup
firebase deploy --only firestore:rules

See firebase/SETUP.md for collections, rules, and indexes this adapter expects.

Usage

await Firebase.initializeApp(options: ...);

configureVetaKits(
  chat: firebaseChatStrategy(), // defaults to FirebaseFirestore.instance + FirebaseAuth.instance
);

Override collection roots if you need a different layout:

firebaseChatStrategy(threadsCollection: 'rooms');

What you get

Method Returns
watchThread(threadId) Stream<ChatMessage> — new messages live
send(threadId, text) writes to threads/{id}/messages
watchPresence(threadId) Stream<Set<userId>> of online users
watchTyping(threadId) Stream<Set<userId>> currently typing
setTyping(threadId, bool) toggles your typing flag

The host app must create the parent threads/{threadId} document with a participantIds: [uid, …] field so the security rules can authorize participants.

Libraries

veta_chat_kit_firebase
Firebase adapter for veta_chat_kit — Firestore-backed threads, realtime presence, and typing indicators.