- βΉοΈ Introduction
- β‘ Features
- π§± Architecture
- πΎ Installation Guide
- π Environment Variables
- π§° Development Scripts
- π©Ί Troubleshooting
- ποΈ Building Guide
- β Testing & Quality
- πͺ Screenshots
- π Credits
- Β© License
- π Star History
- π Contributors
React Native Chat App is a real-time chat application built using React Native and Expo, powered by Firebase (Web v9) for authentication and real-time messaging.
Note
See screenshots below for a preview.
| Feature | Description |
|---|---|
| Signup and Login | Firebase Email/Password sign-in method. Allow users to sign up using their email address and password |
| Send Text Message | Essential for casual messaging |
| Send Picture | You can send pictures without losing quality |
| Send Video | Capture or pick videos and play them inline inside the chat |
| Group Chat | You can send your messages to multiple people at the same time |
| Delete Chat | Hold and select chats to delete them |
| Delete Account | Delete your account from settings |
| Real Time Chat | Chats update instantly with new messages |
| Local Notifications | New inbound chat messages can trigger local notifications while the app is running |
| Users List | Registered users sorted alphabetically |
| Note to Self | Create personal notes by messaging yourself |
The app uses Expo and Firebase with a screen-first React Native structure:
src/App.jswires the root providers and navigation containers.src/contexts/AuthenticatedUserContext.jsis the single source of truth for Firebase auth state.src/contexts/UnreadMessagesContext.jsmanages the unread badge count persisted in AsyncStorage.src/screens/contains feature screens such asChats,Chat,Users,Group,Settings, and account/help flows.src/components/contains reusable presentation components such asContactRow,Cell,ChatHeader, andChatMenu.src/components/MessageVideo.jsrenders inline video messages for Gifted Chat usingexpo-video.src/services/chatService.jscentralizes chat mutations like direct-chat creation, group-chat creation, and soft delete.src/services/notificationService.jsconfigures notification permissions/channels and schedules local chat notifications.src/utils/chat.jscentralizes shared chat/user formatting helpers such as initials, display names, previews, and participant shaping.
- Authentication state is subscribed once through context instead of duplicating
onAuthStateChangedlisteners. - Shared chat/user formatting logic lives in
src/utils/chat.jsto keep screens thin and consistent. - High-risk Firestore writes are routed through
src/services/chatService.jsso delete/create flows are easier to reason about and test. - Chat, users, and group selection lists now use
FlatListfor better rendering behavior on large datasets.
To clone and run this application, you'll need Git, Node.js 20+, and npm.
# Clone this repository
git clone https://github.com/Ctere1/react-native-chat
cd react-native-chat
# Install dependencies
npm install
# Run quality checks
npm test
npm run lint
# Start the Expo development server
npm startTip
This project now targets Expo SDK 54, so use the current Expo Go app or another SDK 54-compatible development client.
Warning
You must create a .env file before the app can connect to Firebase.
Create a .env file in the project root and provide the Expo public Firebase values used by app.config.js:
EXPO_PUBLIC_API_KEY=
EXPO_PUBLIC_AUTH_DOMAIN=
EXPO_PUBLIC_PROJECT_ID=
EXPO_PUBLIC_STORAGE_BUCKET=
EXPO_PUBLIC_MESSAGING_SENDER_ID=
EXPO_PUBLIC_APP_ID=
EXPO_PUBLIC_MEASUREMENT_ID=
EXPO_PUBLIC_EAS_PROJECT_ID=These values are read from app.config.js and exposed under expo.extra.
npm start # Start Expo
npm run android # Native Android dev run (does not create a release APK)
npm run build:android:local # Build a local Android release APK
npm run build:android:local:clean # Clean and rebuild the local Android release APK
npm run build:android:eas:preview # Build an Android APK on EAS using the preview profile
npm run build:android:eas:production # Build the production Android artifact on EAS
npm run ios # Native iOS run
npm run web # Expo web
npm test # Jest unit/component tests
npm run lint # ESLint
npm run format # Prettier- If Expo Go reports a version mismatch, make sure the installed Expo Go app matches SDK 54.
- If native dependencies look out of sync after pulling changes, run
npm installagain and restart Metro withnpm start. - On Android,
expo-notificationspush functionality is not available in Expo Go. This app now skips unsupported notification setup there and should be tested with a development build for full notification behavior. - Chat and unread queries are now intentionally sorted client-side so the app does not require a Firestore composite index for
userEmails + lastUpdatedjust to run locally. - Metro may warn about
just-group-by/just-map-valuesexport resolution throughreact-native-emoji-modal. The currently published package version still emits those warnings, so they are non-blocking upstream dependency warnings rather than app-code errors. - If a
SafeAreaViewdeprecation warning still appears, it is coming from thereact-native-popup-menudependency rather than the app's own screens. - For a local Android release APK build, make sure Android NDK
27.1.12297006is installed. This project's working local release build currently depends on that NDK line together with the repository's Gradle wrapper.
This repository now supports two documented Android release flows:
- a local release APK build from the checked-out native Android project
- an EAS Android build using the profiles in
eas.json
Use this when you want a release APK directly on your machine.
npm run build:android:localFor a full clean rebuild:
npm run build:android:local:cleanNotes:
- This is the correct local APK flow.
npm run androidis still a native development run command, not a release build command. - The generated APK is written to:
android/app/build/outputs/apk/release/app-release.apk
- The current working local Android release setup expects:
- Android NDK
27.1.12297006 - the repository Gradle wrapper (now aligned to Gradle
8.13) - New Architecture to remain enabled because the current
react-native-reanimatedsetup depends on it
- Android NDK
Use this when you want Expo/EAS to produce the Android artifact for you.
-
Set up environment variables
Create a
.envfile with your Firebase config. For EAS builds, make sure the same values are configured in your EAS environment as well. -
Build the preview Android APK on EAS
npm run build:android:eas:preview
This uses the
previewprofile ineas.json, which is configured to produce an Android APK. -
Build the production Android artifact on EAS
npm run build:android:eas:production
This uses the
productionprofile ineas.json.
Note
.env values are used by Expo CLI locally, but remote EAS builds should also have the same variables configured in EAS so the bundle step can read the expected Firebase config.
The repository now includes a small automated quality baseline:
npm testruns Jest with the Expo preset.npm run lintchecks the React Native codebase with ESLint.npx expo-doctorvalidates Expo package compatibility and native-module expectations.
Current tests cover:
- Shared chat formatting and helper logic in
src/utils/chat.js - A basic rendered interaction path for
src/components/ContactRow.js
Before opening a PR, run:
npm test
npm run lint
npx expo-doctor| Login | Signup |
|---|---|
![]() |
![]() |
| Chats | Users | Group Chat | Delete Chats |
|---|---|---|---|
![]() |
![]() |
![]() |
![]() |
| Settings | Profile | Help | Account |
|---|---|---|---|
![]() |
![]() |
![]() |
![]() |
| Emoji Panel | Note to Self | Main Chat Screen | Chat Info |
|---|---|---|---|
![]() |
![]() |
![]() |
![]() |
| Message Indicator |
|---|
![]() |
This software uses the following packages:














