Inspiration The inspiration came from the critical need for communication in "no-network" zones, such as deep underground mines or disaster-struck areas where cellular infrastructure is destroyed. We wanted to create a tool that ensures no one is truly isolated, regardless of their access to a service provider.

What it does Sampark creates a decentralized, offline mesh network using local hardware. It allows users to: Send and receive global and private text messages without an internet connection. Share images and files directly between devices. Automatically discover nearby peers to expand the communication range. How we built it The app is built using Kotlin for Android, leveraging the Google Nearby Connections API with a P2P_CLUSTER strategy to handle device discovery and socket management. We implemented custom message forwarding logic to ensure data reaches its destination even if the target isn't directly connected to the sender.

Challenges we ran into Message Echoes: Managing unique message IDs to prevent infinite loops within the mesh network. State Management: Handling real-time UI updates for unread counts and chat history while maintaining low battery consumption. Permissions: Navigating complex requirements for Bluetooth, Wi-Fi, and Location across different Android versions. Accomplishments that we're proud of Successfully implementing a mesh-based command system that allows for remote message editing and deletion across the entire offline network. Developing a reliable peer discovery system that requires zero manual configuration from the user. What we learned We gained deep insights into asynchronous programming and peer-to-peer networking protocols. We also learned the importance of "Loop Protection" in decentralized systems and how to optimize data payloads for fast transmission over low-bandwidth local signals.

What's next for Sampark The next phase of development involves: Multi-hop Routing: Optimizing the pathing algorithm to support even larger distances between nodes. Encryption: Adding end-to-end encryption for private chats to ensure data remains secure while passing through intermediate peers. Low-Energy Mode: Fine-tuning the discovery process to significantly extend battery life for long-term emergency use.

Built With

Share this project:

Updates