Overview
ChatApp is a modern, cross-platform mobile chat application built with React Native and Expo. It showcases a seamless messaging experience, allowing users to communicate via text, share images, and send their live location. This project serves as a portfolio piece to demonstrate robust mobile development skills and the power of a unified codebase for both iOS and Android.
The Problem
- Building native mobile applications traditionally required separate codebases for iOS and Android, which was costly and time-consuming.
- A solution was needed that could provide a high-quality native experience with a single codebase.
- A need for a project to demonstrate proficiency in real-time communication and data persistence.
The Solution: ChatApp
ChatApp leverages the power of React Native to create a single codebase for a feature-rich, cross-platform application. It integrates with Google Firebase for real-time data storage and authentication, ensuring a fast and reliable messaging experience. Users can start chatting immediately with anonymous sign-in and stay connected even when offline.
Key Features
- π **Anonymous Authentication**: Users can log in instantly without creating an account.
- π¬ **Real-time Text Messaging**: Seamlessly exchange messages with friends and family.
- πΌοΈ **Image Sharing**: Send images directly from the device's photo library or camera.
- πΊοΈ **Location Sharing**: Share your current location, which is displayed in a map view within the chat.
- βοΈ **Offline Reading**: Access cached messages even without an internet connection.
- π£οΈ **Accessibility**: Designed to be compatible with screen readers for visually impaired users.
Tech Stack
Framework: React Native, Expo
Backend: Google Firebase (Firestore, Authentication, Cloud Storage)
Libraries: React Native Gifted Chat, AsyncStorage, React Navigation
Tools: JavaScript, Git
Development Highlights
- **Unified Codebase**: Leveraged React Native to build for both iOS and Android from a single project.
- **Real-Time Data**: Implemented real-time messaging using Firebase Firestore, ensuring instant message delivery.
- **Data Persistence**: Utilized AsyncStorage for local storage, providing a robust offline experience.
- **Rich Media Integration**: Integrated the device's camera and photo library for sending images, and map views for displaying locations.
Feature Scenarios (BDD-style)
**Feature 1**: Real-time Messaging
- **Scenario 1**: User opens the app and enters a name.
- **Scenario 2**: User types a message and sends it.
- **Scenario 3**: The message appears instantly in the conversation for all participants.
**Feature 2**: Media Sharing
- **Scenario 1**: User clicks an "add" button to access more options.
- **Scenario 2**: User chooses to share an image from their library.
- **Scenario 3**: The selected image is uploaded to Firebase Storage and displayed in the chat.
**Feature 3**: Offline Access
- **Scenario 1**: User loses internet connection while in a chat.
- **Scenario 2**: User can still view all previously loaded messages.
- **Scenario 3**: User can compose new messages, which will be sent once the connection is restored.
Impact & Results
- π― Successfully demonstrates the ability to build a fully functional, cross-platform mobile application.
- π Proves the efficiency of using a single codebase for multiple platforms.
- π Highlights proficiency in integrating powerful cloud services for real-time communication.
Conclusion
ChatApp is more than just a messaging application; it's a testament to the power and flexibility of React Native. By addressing core challenges in mobile development and incorporating key features like rich media sharing and offline access, the app provides a seamless and modern user experience.
Future improvements could include user profiles, group chats, and read receipts.