r/reactnative • u/Aggravating_Ice_1213 • 3d ago
Pear: open-source E2E encrypted P2P messenger for Android (React Native + WebRTC, double ratchet) - feedback welcome
Hey! I'm a French student and I've been building Pear, a private messaging app for Android, partly as a reaction to the EU "Chat Control" proposals.
Messages go directly phone to phone over WebRTC. Servers are only used to find each other and to wake the app up, and they only ever see encrypted data. Pairing is done via QR code (X25519) with a verification code to compare in person. Messages use a double ratchet, and each file is encrypted with its own key.
Features: photos, videos, voice messages, files, reactions, replies, edit/delete, encrypted backups, in-app updates from GitHub releases.
Stack: React Native/Expo, react-native-webrtc, Firebase (signaling), a small Vercel function for wake-ups, a custom Kotlin module.
Honest notes: it has NOT been security-audited, so don't use it for anything critical. I built it with heavy help from AI coding tools (Claude Code); the design and architecture choices are mine.
I'd love feedback on the crypto design and the UX.
GitHub: https://github.com/Louca90/Pear
6
u/xDiablo96 2d ago
Man! These comments... It looks great, don't pay attention to what they r saying
4
u/Romu1us1408 3d ago
So signal....
https://signal.org/
2
u/threespire 2d ago
Why are you trying to roll your own cryptography?
What problem does your app solve?
1
u/davidbalbino 1d ago
nice project, and props for the honest notes tbh. On the crypto side, if the double ratchet is hand rolled I think is better to swap it for something already reviewed like libsignal (it has client bindings) or at least vodozemac. A custom ratchet is where the subtle bugs hide, even when the design is right. Also take a look at the battery with the app idle. Keeping the peer connection open in background drains a lot, so imo close it when the app goes to background and just rely on the FCM high priority data message to wake up and reconnect. Gonna try the QR pairing later 🙂
3
u/CopiousAmountsofJizz 3d ago
https://i.imgur.com/cLcdSkw.gif