Proudly Made in India
Messages hop phone-to-phone over Bluetooth and Wi-Fi and are delivered whenever the other person comes back in range. An offline, serverless mesh messenger built on a delay-tolerant network with epidemic routing, end-to-end encryption, private groups, and image and file sharing.
What it is ยท How it works ยท Architecture ยท Try it ยท Roadmap ยท Contributing
Note
Why this exists. When the network is down or jammed but people are nearby, Kabootar still gets your message through. Dead-zone buildings, basements, exam halls, festivals, protests, stadiums, trains, remote areas, roaming with no plan. Proximity is available even when the internet is not.
Captured from the app running on a physical device, with the status and navigation bars cropped out. Peer counts read zero because only one device was in range for the capture.
Kabootar is a private messenger with no backend at all. Instead of routing through a server, your phone forms a peer-to-peer mesh with other phones nearby. A message you send is flooded to everyone in range, carried onward by each device it reaches, and delivered the moment a chain of carriers connects you to the recipient, even if that is minutes later after you have both walked away.
It feels like a normal chat app, a contact list, saved history, sent/delivered receipts, end-to-end encrypted 1:1 chats and private groups, image and file sharing, but the transport underneath is a store-and-forward mesh rather than the cloud.
| Kabootar | Normal messenger | |
|---|---|---|
| Needs internet / cell data | No | Yes |
| Needs a server or account | No | Yes |
| Works in a signal dead-zone | Yes | No |
| Your data leaves the device | No | Yes |
| Delivers to someone offline-then-back | Yes, via carriers | No |
- ๐ก Truly offline โ Bluetooth + Wi-Fi peer links, zero infrastructure.
- ๐ Store-and-forward โ messages wait and ride other phones until delivered.
- ๐ End-to-end encrypted โ X25519 + Ed25519 + AES-GCM, with signed messages and a safety code to verify a contact. Relays only ever see ciphertext.
- ๐ฅ Private groups โ invite-only, encrypted with a shared group key.
- ๐ผ๏ธ Image & file sharing โ photos are compressed and thumbnailed; any file (up to 8 MB) is chunked and carried across the mesh just like text.
- ๐ Notifications โ local alerts when a message arrives (no push server).
- ๐ Light / dark theme, archive / hide / block, delete-for-everyone, mark-as-unread โ the everyday chat controls.
- โ Delivery receipts โ end-to-end acks, WhatsApp-style ticks you can trust.
- ๐ Self-healing routing โ epidemic flooding with idempotent de-duplication.
- ๐ถ Live mesh view โ watch peers, carried messages, and routing events.
- ๐งช Provably correct core โ 32 routing invariants verified in plain Dart.
- ๐ฎ๐ณ Made in India โ open source, no foreign backend.
Alice sends a message to Bob, who is out of range. A relay carries it and delivers it later, then the receipt makes the return trip the same way.
sequenceDiagram
autonumber
participant A as Alice
participant R as Relay (a stranger's phone)
participant B as Bob (offline, then back)
A->>R: msg "hey Bob" (flood)
Note over R: Bob not in range โ<br/>R carries the message
A--xB: no path yet
Note over A,R: time passes, Alice walks away
R->>B: link comes up โ flush carry
B->>B: deliver + show message
B->>R: ack (delivery receipt)
R->>A: ack carried back
Note over A: message flips to "delivered" โโ
Every phone applies the same six rules to each envelope it sees:
| # | Rule | Why it matters |
|---|---|---|
| 1 | De-dup by message id | Idempotency; stops loops and flood storms |
| 2 | Learn from a hello |
Builds the contact list from whoever is near |
| 3 | Deliver if it is for me | Save, show, and send an ack |
| 4 | Receipt on an ack for me |
Flip my message to delivered |
| 5 | Relay + carry otherwise | Decrement TTL, cache, re-flood; carry onward |
| 6 | Cap everything | TTL + max-age + cache size bound battery and storage |
Why this is interesting (the systems angle)
This is a delay-tolerant network (DTN) using epidemic routing with end-to-end acknowledgements, the same shape as a durable, at-least-once message queue, but running across a swarm of phones instead of a datacenter:
- Idempotency by id โ a message can arrive by many paths but is acted on once.
- At-least-once delivery made exactly-once at the edges via de-dup on the id.
- Persisted de-dup set โ survives restarts, so a reboot cannot re-flood.
- Bounded resources โ TTL, max-age, and cache-size caps keep a carrier honest.
The whole routing brain is framework-free Dart (no Flutter, no radio, no DB),
which is why its behaviour is pinned down by tests that run on a laptop. See
docs/ARCHITECTURE.md.
flowchart TD
UI["UI ยท Flutter Material 3<br/>onboarding ยท chats ยท people ยท mesh"]
SVC["ChatService<br/>the seam: state ยท hello handshake ยท ticks"]
ENG["MeshEngine<br/>DTN routing ยท pure Dart"]
DB[("SQLite<br/>messages ยท contacts ยท seen")]
TX["Transport<br/>Nearby / Multipeer P2P"]
UI --> SVC
SVC --> ENG
SVC --> DB
SVC --> TX
ENG -. ports .-> SVC
TX <-->|"Bluetooth + Wi-Fi"| PEERS(("nearby phones"))
classDef core fill:#4F46E5,stroke:#3730A3,color:#fff;
class ENG core;
lib/core/meshโ the engine, envelope, config, ports. Zero framework imports.lib/dataโ SQLite persistence + identity; theseenset is persisted.lib/transportโMeshTransportinterface +flutter_nearby_connections.lib/services/chat_service.dartโ the single source of truth the UI binds to.lib/uiโ a polished Material 3 messenger, including a live Mesh tab.
Important
The mesh needs two physical phones on the same OS family (AndroidโAndroid or iOSโiOS). Emulators have no real Bluetooth/Wi-Fi radio.
Build & run from source
git clone https://github.com/royalpinto007/Kabootar.git
cd Kabootar
# The Android native shell is committed, so no `flutter create` is needed.
flutter pub get
dart run flutter_launcher_icons # launcher icon
bash tool/patch_nearby_plugin.sh # modernise the 2021-era mesh plugin
bash tool/patch_gradle.sh # core-library desugaring (notifications)
flutter run # on a connected Android deviceiOS needs a one-time flutter create . --platforms=ios --org dev.studchat to
generate its Xcode shell. Full platform notes (permissions, minimum SDKs) are in
docs/PLATFORM_SETUP.md.
Grab a prebuilt APK
Grab a signed-per-ABI APK from
Releases (pick
kabootar-vX.Y.Z-arm64-v8a.apk for most phones). Every push also builds one via
the Build APK workflow
(open the newest run โ Artifacts โ kabootar-apks).
Verify the routing engine without a phone
The store-and-forward core is provable on a laptop with just the Dart SDK:
dart run tool/engine_check.dartโโ Store-and-forward across time (recipient offline, then returns)
โ nobody delivered yet (C never in range)
โ R is carrying the message for later
โ C finally received it after coming back in range
โ A eventually learns it was delivered
...
32 passed, 0 failed โ all mesh-engine invariants hold โ
Designed in up front, so nothing surprises you:
- Cross-platform wall โ one codebase runs on both, but a message cannot hop across the OS boundary (Android and iOS use different peer radios). v1 meshes within an OS family.
- Range and density โ delivery needs a chain of carriers to exist. Sparse crowds mean slow or no delivery. Inherent to any mesh.
- No forward secrecy yet โ encryption uses long-term static keys; a ratcheting scheme is future work. Open channels stay plaintext by design.
- Battery โ continuous advertise + scan is not free; duty-cycling is planned.
- Onboarding, live peer discovery, 1:1 text chat
- Store-and-forward with de-dup, TTL, and end-to-end acks
- Persistent history and contacts; resume undelivered on restart
- Live mesh diagnostics view
- ๐ข Channels (broadcast group rooms, joined by code)
- ๐ End-to-end encryption (X25519 + Ed25519 + AES-GCM) + message signing
- ๐ฅ Private groups with membership (encrypted, invite-only)
- ๐ผ Image sharing (compressed, chunked, carried like text)
- ๐ Arbitrary file sharing over the same chunk path
- ๐ Local notifications, ๐ theme, and full chat management
- ๐ Forward secrecy (a message ratchet on top of the static keys)
- ๐ Battery duty-cycling
- ๐ Online bridge: any node with internet relays onward
Built in India, open source, privacy-first. No servers, no foreign backend, no account: your messages and identity never leave your device. Kabootar is the kind of resilient, self-reliant tech that works in India's dead-zones, trains, and crowds, and it belongs to everyone who runs it.
The app carries a tricolour identity and the Ashoka Chakra, and an in-app "India & Kabootar" screen with the Preamble and the Fundamental Duties (Article 51A) for civic reference, plus friendly facts about how the mesh works.
Note
Kabootar is an independent, citizen-built project. It is not affiliated with or endorsed by any government or political party. National symbols are used respectfully; we deliberately never use the restricted State Emblem (the Lion Capital). See DISCLAIMER.md.
Legal: Privacy Policy ยท Terms of Use ยท Disclaimer. Direct chats and private groups are end-to-end encrypted; open channels are public by design and there is no forward secrecy yet, so use your judgement for highly sensitive information.
Contributions are welcome. Good first steps:
- Read
CONTRIBUTING.mdanddocs/ARCHITECTURE.md - Keep the mesh engine framework-free and add tests for routing changes
- Open an issue or a PR
By participating you agree to the Code of Conduct. Security issues: see SECURITY.md.
If Kabootar is useful or interesting, a star genuinely helps others find it.
Once the project gathers a few stars, a growth chart will render here via star-history.com.
MIT ยฉ royalpinto007



