A beautiful, feature-rich peer-to-peer chat application built with React Native and Expo. Connect with nearby devices using Bluetooth and WiFi Direct for seamless local communication without internet dependency.
- Bluetooth Low Energy - Connect to nearby devices via Bluetooth
- WiFi Direct - High-speed local network connections
- Auto-discovery - Automatically find and connect to available devices
- Signal strength monitoring - Real-time connection quality indicators
- Real-time messaging - Instant message delivery with status indicators
- Message status tracking - Sending, sent, delivered, and read receipts
- Direct & Group chats - One-on-one conversations and group discussions
- Unread message counters - Never miss important messages
- Message history - Persistent chat history across sessions
- iOS-inspired interface - Clean, modern design following Apple's design principles
- Smooth animations - Delightful micro-interactions and transitions
- Custom splash screen - Branded 3-second animated splash screen
- Dark/Light mode ready - Adaptive interface design
- Responsive layout - Optimized for all screen sizes
- Local-only communication - No data sent to external servers
- Encrypted connections - Secure peer-to-peer communication
- No internet required - Works completely offline
- Privacy-first approach - Your conversations stay on your devices
| Chats | Discover | Contacts | Settings |
|---|---|---|---|
![]() |
![]() |
![]() |
![]() |
- Node.js 18+
- npm or yarn
- Expo CLI (
npm install -g @expo/cli) - iOS Simulator (for iOS development)
- Android Studio (for Android development)
-
Clone the repository
git clone https://github.com/yourusername/p2p-chat.git cd p2p-chat -
Install dependencies
npm install
-
Start the development server
npm run dev
-
Run on your device
- iOS: Press
ito open iOS Simulator - Android: Press
ato open Android Emulator - Web: Press
wto open in web browser - Physical device: Scan QR code with Expo Go app
- iOS: Press
p2p-chat/
โโโ app/ # App routes (Expo Router)
โ โโโ (tabs)/ # Tab-based navigation
โ โ โโโ index.tsx # Chats tab
โ โ โโโ contacts.tsx # Contacts tab
โ โ โโโ discover.tsx # Device discovery tab
โ โ โโโ settings.tsx # Settings tab
โ โโโ chat/[id].tsx # Individual chat screen
โ โโโ _layout.tsx # Root layout
โโโ components/ # Reusable UI components
โ โโโ ChatListItem.tsx # Chat room list item
โ โโโ ContactListItem.tsx # Contact list item
โ โโโ DeviceListItem.tsx # Device discovery item
โ โโโ MessageBubble.tsx # Chat message bubble
โ โโโ SplashScreen.tsx # Custom splash screen
โโโ services/ # Business logic
โ โโโ ChatService.ts # Chat management
โ โโโ ConnectionService.ts # P2P connections
โโโ types/ # TypeScript definitions
โ โโโ chat.ts # Chat-related types
โ โโโ env.d.ts # Environment variables
โโโ hooks/ # Custom React hooks
โโโ useFrameworkReady.ts
Create a .env file in the root directory:
EXPO_PUBLIC_API_URL=https://your-api-url.com
EXPO_PUBLIC_STUN_SERVER=stun:stun.l.google.com:19302Update app.json for your specific needs:
{
"expo": {
"name": "Your P2P Chat",
"slug": "your-p2p-chat",
"version": "1.0.0",
"orientation": "portrait",
"icon": "./assets/images/icon.png",
"scheme": "yourapp"
}
}npm run dev- Start development servernpm run build:web- Build for web deploymentnpm run lint- Run ESLint
- React Native - Cross-platform mobile development
- Expo Router - File-based navigation
- TypeScript - Type-safe development
- React Native Reanimated - Smooth animations
- Lucide React Native - Beautiful icons
- Expo Google Fonts - Custom typography
- Service Layer - Separation of business logic from UI
- Observer Pattern - Real-time updates using listeners
- Singleton Pattern - Shared service instances
- Component Composition - Reusable UI components
npm run build:web-
Create a development build
expo install expo-dev-client expo run:ios expo run:android
-
Build for app stores
eas build --platform all
-
Submit to stores
eas submit --platform all
- File Sharing - Send images, documents, and media
- Voice Messages - Record and send audio messages
- Message Encryption - End-to-end encryption for all messages
- Group Management - Create and manage group chats
- Message Search - Find messages across all conversations
- Custom Themes - Personalize the app appearance
- Message Reactions - React to messages with emojis
- Typing Indicators - See when someone is typing
- Message Forwarding - Forward messages between chats
- Backup & Restore - Export and import chat history
- Native Modules - Implement actual Bluetooth/WiFi Direct APIs
- WebRTC Integration - Real peer-to-peer communication
- Push Notifications - Background message notifications
- Performance Optimization - Optimize for large message histories
- Offline Support - Enhanced offline capabilities
- Cross-platform Sync - Sync across multiple devices
We welcome contributions! Please see our Contributing Guide for details.
- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing-feature - Make your changes
- Run tests:
npm test - Commit your changes:
git commit -m 'Add amazing feature' - Push to the branch:
git push origin feature/amazing-feature - Open a Pull Request
- Use TypeScript for all new code
- Follow the existing code style
- Add tests for new features
- Update documentation as needed
This project is licensed under the MIT License - see the LICENSE file for details.
- Expo Team - For the amazing development platform
- React Native Community - For the robust ecosystem
- Lucide Icons - For the beautiful icon set
- Pexels - For the stunning stock photos
- Documentation: Wiki
- Issues: GitHub Issues
- Discussions: GitHub Discussions
- Email: support@yourapp.com
Made with โค๏ธ by the P2P Chat Team
โญ Star us on GitHub โข ๐ฆ Follow on Twitter โข ๐ Visit our website




