Nov 27, 2026 • 12 min read
Oleg Romanov
Founder, CEO & Tech Lead
Short answer: You can build a production-grade React Native private chat on Firebase in roughly 6-10 weeks for £25k-£60k. The secure version needs Firebase Auth, a Firestore data model keyed by conversation, strict security rules, and Cloud Functions for every sensitive action. Client-side checks alone are not security. Firebase is a strong fit up to a few hundred thousand monthly active users, after which cost and query limits start to matter.
I'm Oleg Romanov, and I've shipped 40+ products at Time2Launch, several of them messengers. Most chat tutorials get a demo working in an afternoon and stop there. This article covers what comes after: the parts that decide whether your private chat is actually private, and whether it survives its first 10,000 users.
For one-to-one messaging, Firebase gives you realtime sync, offline persistence, authentication, push delivery and serverless logic in one SDK family. For a team of two to four engineers, that removes about 3-4 weeks of backend work compared with building WebSockets, a database and a push pipeline yourself.
The trade-offs are real, so here is how the main options compare:
| Option | Build time (MVP) | Realtime | Cost at 50k MAU (approx.) | Best for |
|---|---|---|---|---|
| Firebase (Firestore + Functions) | 6-10 weeks | Built in | £150-£600/month | Startups, 1:1 chat, fast launch |
| Custom Node.js + WebSocket + Postgres | 12-18 weeks | You build it | £300-£900/month infra | Complex routing, strict data residency |
| Managed chat SDK (Stream, Sendbird) | 3-5 weeks | Built in | £400-£2,000+/month | Teams that want features fast, accept vendor lock-in |
| Supabase Realtime | 7-11 weeks | Built in | £100-£500/month | Teams that prefer SQL and Postgres RLS |
These costs depend heavily on message volume and read patterns, so treat them as planning ranges, not quotes. If you're deciding between building and buying, I'd choose a managed SDK when chat is a side feature, and Firebase or custom when chat is the product.
A secure private chat on React Native with Firebase has six components:
In React Native, use the @react-native-firebase packages rather than the web JS SDK. They wrap the native iOS and Android SDKs, which gives you better offline persistence, background handling and push reliability.
Your data model determines your security rules and your bill. Here is the structure I recommend for one-to-one chat:
users/{uid}
conversations/{conversationId}
participants: [uidA, uidB]
lastMessage: { text, senderId, createdAt }
unread: { uidA: 0, uidB: 2 }
conversations/{conversationId}/messages/{messageId}
senderId, text, createdAt, type, status
blocks/{uid}/blocked/{otherUid}
For private one-to-one chats, generate the ID by sorting the two UIDs and joining them (for example uidA_uidB). This guarantees exactly one conversation per pair, prevents duplicates from race conditions, and makes security rules simple, because the rule can check that the requesting UID is part of the document ID.
Putting messages in a subcollection lets you paginate with limit(30) and startAfter, and listen only to the active conversation. Never store messages in an array on the conversation document. Firestore documents cap at 1 MiB, and every update rewrites and re-bills the whole thing.
The inbox screen needs last message, unread count and the other user's name. Storing lastMessage and unread on the conversation document means the inbox is one query, not N+1. A Cloud Function updates these on every new message.
The most common flaw I see in audits is an app that hides other people's chats in the UI but lets any authenticated user query them. The rules are your real perimeter. A baseline for private conversations:
match /conversations/{cid} {
allow read: if request.auth != null
&& request.auth.uid in resource.data.participants;
allow create: if false; // created by Cloud Function only
match /messages/{mid} {
allow read: if request.auth.uid in
get(/databases/$(database)/documents/conversations/$(cid)).data.participants;
allow create: if request.auth.uid in
get(/databases/$(database)/documents/conversations/$(cid)).data.participants
&& request.resource.data.senderId == request.auth.uid
&& request.resource.data.text.size() <= 4000;
allow update, delete: if false;
}
}
Three details matter here:
senderId to request.auth.uid. Otherwise a user can send messages as someone else.Note that each get() in a rule counts as a billed document read. At scale, copying the participants list into custom claims or the message document itself can cut that overhead.
Security rules are good at access control and weak at business logic. Anything involving more than one document, another user's state, or a policy decision belongs in a Cloud Function (callable or Firestore-triggered):
onCreate trigger on messages, never from the sending device.Also enable Firebase App Check (Play Integrity on Android, App Attest on iOS). It cuts off scripted abuse from clients that are not your real app, which is the cheapest security improvement available.
We applied exactly this approach on Heelings: React Native Chat App Development with 35% Higher User Engagement. Heelings is a chat app for people who need someone to talk to, which means user safety is not optional. We built it in React Native with Firebase, and every sensitive action is verified on the server, not just in the app. Admins can remove harmful messages and ban users, and the app reached 99.5% crash-free sessions in production on both the App Store and Google Play.
The lesson I took from it: moderation tooling and server-side enforcement are not features you add after launch. We budgeted roughly 20% of the project for them from the start, and that is the ratio I'd recommend for any app where strangers talk to each other.
"In every chat app we've shipped, about 20% of the build goes on server-side enforcement and moderation, and it's the 20% that decides whether the app survives its first 1,000 real users." — Oleg Romanov, Founder, CEO & Tech Lead, Time2Launch
Use FlatList with inverted, a stable keyExtractor, and getItemLayout where possible. For long histories, FlashList from Shopify noticeably improves scroll performance on mid-range Android devices. Libraries such as react-native-gifted-chat get you to a working UI in a day, but expect to customise heavily once design requirements arrive.
Write the message to local state immediately with a sending status, then let Firestore's offline persistence queue the write. Use the server timestamp (serverTimestamp()) for ordering so clock drift between devices doesn't scramble conversations. Track sent, delivered and read states through lightweight updates, and batch read receipts rather than writing one per message.
Every active snapshot listener is a billing and battery decision:
where('createdAt', '>', lastSeen) for incremental sync instead of reloading history.Use @react-native-firebase/messaging with data-plus-notification payloads. On iOS you need an APNs key uploaded to Firebase; on Android 13+ you must request the POST_NOTIFICATIONS permission at runtime. Budget 3-5 days for push alone: token refresh, deep linking into the right conversation, and badge counts are where bugs hide. Don't put message text in the push payload if the conversation is sensitive, since it will show on lock screens.
Be precise about what "secure" means. Firebase encrypts data in transit (TLS) and at rest by default. That is not end-to-end encryption: Google infrastructure and your admins can technically read message content.
For most consumer, marketplace and support chats, that's acceptable and necessary, since moderation requires readable content. If you need true E2EE, you'd add the Signal protocol or libsodium on the client, which typically adds 4-8 weeks, makes server-side moderation and search much harder, and complicates multi-device sync. Decide this before you design the data model, not after.
Other compliance items for UK and EU products:
europe-west2 (London) at project creation. You cannot change it later.Realistic numbers for a team of 2-4 engineers plus design and QA:
| Scope | Timeline | Build cost (UK agency) | Includes |
|---|---|---|---|
| Basic 1:1 chat MVP | 5-7 weeks | £20k-£35k | Auth, text messages, inbox, push, basic rules |
| Production-ready secure chat | 8-12 weeks | £40k-£75k | Above plus media, block/report, moderation admin, App Check, tests |
| Advanced (E2EE, voice/video, multi-device) | 16-24 weeks | £90k-£180k+ | Custom crypto, WebRTC, advanced search and sync |
Running costs on Firebase are driven by reads. A typical active user generates 300-1,500 Firestore reads per day depending on how disciplined your listeners are. At Firestore's pay-as-you-go rates (about $0.03 to $0.06 per 100k reads depending on region), 50,000 monthly users usually land in the low hundreds of pounds a month. An undisciplined client with always-on listeners can multiply that by 5-10x, which is why I review listener design before any scale-up.
I'd steer you away from Firebase when:
For everything else, especially a startup trying to validate a chat product in a quarter, it's usually the fastest path to something safe and real. If you'd like experienced engineers on it, our React Native mobile app development team has built this pattern repeatedly.
Yes, if you rely on security rules and server-side Cloud Functions rather than client checks. Data is encrypted in transit and at rest, but it is not end-to-end encrypted, so Google and your admins can technically access content.
A basic one-to-one MVP takes 5-7 weeks. A production-ready version with media, block and report features, moderation tools and push notifications typically takes 8-12 weeks.
For around 50,000 monthly active users, expect roughly £150-£600 per month, mostly Firestore reads. Costs rise sharply if the app keeps unnecessary real-time listeners open.
For most new apps, Firestore. It offers richer queries, better scaling and finer-grained security rules. Realtime Database can be cheaper for very high-frequency, simple data, but it is harder to model for inbox and pagination needs.
Yes, using libsodium or the Signal protocol on the client, with Firebase only transporting ciphertext. Expect 4-8 extra weeks and trade-offs: server-side moderation, search and multi-device sync all become harder.
If users can message strangers, yes. Apple's App Store guideline 1.2 requires reporting, blocking and removal of abusive users for apps with user-generated content.
More from the Time2Launch blog.

In-house, freelance or dedicated team? Real UK cost ranges, timelines and trade-offs from a founder who has shipped 40+ mobile projects.
Oleg Romanov
Dec 3, 2026 • 11 min read

How to choose a mobile app development company in London: realistic costs, timelines, red flags and the questions that separate shippers from sellers.
Oleg Romanov
Dec 2, 2026 • 13 min read

Flutter, React Native or native? A founder's decision guide with real cost ranges, timelines and trade-offs from 40+ shipped apps.
Oleg Romanov
Dec 2, 2026 • 9 min read

Your request will be my top priority once it reaches my inbox. I will make sure that the best team that fits your task will contact you as quickly as possible.
Oleg Romanov
Founder at Time2Launch
hq@time2launch.uk
Call
+44 7496 000 511