A React Native chat application that works offline over a local Wi-Fi network using hotspot-based communication. This app allows two devices to chat directly with each other using TCP sockets when one device creates a Wi-Fi hotspot and the other connects to it.
- Server/Client mode selection
- Direct device-to-device communication over TCP
- Real-time messaging
- Connection status indication
- Message history with timestamps
- Clean and intuitive UI
- React Native development environment set up
- Android device with hotspot capability (for server mode)
- Another device to connect as a client
- Clone the repository
- Install dependencies:
npm install
- For iOS, install pods:
cd ios && pod install && cd ..
- Enable Wi-Fi hotspot on your Android device manually
- Launch the app
- Enter a device name
- Select "Server Mode"
- Press "Start Chat"
- The app will start listening for incoming connections
- Connect to the server device's Wi-Fi hotspot
- Launch the app
- Enter a device name
- Select "Client Mode"
- Enter the server's IP address (typically 192.168.43.1 for Android hotspots)
- Press "Start Chat"
- The app will connect to the server
- Uses react-native-tcp-socket for TCP communication
- Server listens on port 8080
- Messages are sent as JSON objects containing:
- Text content
- Sender name
- Timestamp
- Make sure the client device is connected to the server's hotspot
- Verify the correct IP address is being used
- Check that both devices have the app running
- Ensure no firewall is blocking the connection
This app uses direct TCP communication without encryption. Do not use it for sending sensitive information.
MIT