Skip to content

Latest commit

ย 

History

65 Commits

Folders and files

NameName
Last commit message
Last commit date
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

kabootar logo

Kabootar

Flag of India

Proudly Made in India

Chat that works with no internet, no servers, no SIM.

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.


CI Build APK mesh engine: 32 invariants
Flutter Platform License: MIT PRs welcome Made in India


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.

Screenshots

Chats, with delivery receipts that travelled back through the mesh. Chats. Receipts travel back the same way the message went. The mesh: peers in range, messages carried for others, and live routing events. Mesh. Peers in range, what you are carrying for other people, and routing as it happens. Scanning for nearby phones over Bluetooth and Wi-Fi. People. Whoever is running Kabootar within range. Channels and private groups, joined with a code. Channels. Private groups, joined with a code you share in person.

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.

What it is

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

โœจ Features

  • ๐Ÿ“ก 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.

๐Ÿ“จ How your message travels

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" โœ“โœ“
Loading

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.

๐Ÿงฑ Architecture

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;
Loading
  • lib/core/mesh โ€” the engine, envelope, config, ports. Zero framework imports.
  • lib/data โ€” SQLite persistence + identity; the seen set is persisted.
  • lib/transport โ€” MeshTransport interface + 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.

๐Ÿš€ Try it

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 device

iOS 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 โœ“

๐Ÿงญ Honest constraints

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.

๐Ÿ—บ Roadmap

  • 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

๐Ÿ‡ฎ๐Ÿ‡ณ Made in India

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.

๐Ÿค Contributing

Contributions are welcome. Good first steps:

By participating you agree to the Code of Conduct. Security issues: see SECURITY.md.

โญ Star this project

If Kabootar is useful or interesting, a star genuinely helps others find it.

GitHub stars

Once the project gathers a few stars, a growth chart will render here via star-history.com.

๐Ÿ“„ License

MIT ยฉ royalpinto007

About

๐Ÿ“ก Offline mesh messenger โ€” chat with no internet, no servers, no SIM. Messages hop phone-to-phone over Bluetooth & Wi-Fi (delay-tolerant network, epidemic routing, end-to-end acks). Flutter, Android & iOS. Made in India ๐Ÿ‡ฎ๐Ÿ‡ณ

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

2 stars

Watchers

0 watching

Forks

Releases

Contributors

Languages