Off Chat is an offline-first, peer-to-peer decentralized communication platform built with Flutter. It utilizes Bluetooth Low Energy (BLE) to enable instant device discovery, relative location tracking (Radar), and secure messaging without any reliance on internet, cellular connectivity, or central infrastructure.
📱 User Experience Journey
Explore the premium "Aurelian Noir" interface through the application's key lifecycle steps.
Entry
The Arrival
Users are greeted by the minimalist splash screen, establishing the high-end digital concierge aesthetic immediately.
Step 01
Node Identification
The onboarding process begins by explaining the decentralized nature of the network. Every device acts as a secure Node.
Step 02
Offline Security
Communication occurs directly between devices. No servers, no logs, no internet required.
The Hub
Node Discovery
The main interface scans for nearby active pulses. Discovered users appear with their custom aliases and proximity status.
Spatial Tracking
The Radar
A custom-built visualization engine combines GPS and compass data to paint relative peer positions in real-time.
Communication
Secure Messaging
Direct peer-to-peer GATT communication with automated chunking and reassembly protocols for text and media.
Management
Identity & Settings
Manage your Node's appearance, toggle spatial visibility, and configure notification alerts.
🛰 The Off-Chat BLE Protocol
Zero-read Identification Protocol
To overcome BLE advertisement limits (31 bytes) and iOS background restrictions, Off Chat splits data transmission between the primary packet and the scan response:
1. Primary Advertisement Packet (5 Bytes)
Packs critical identity data tightly at the byte-level:
Bytes 0-3: Stable Device ID (32-bit big-endian unsigned integer).
Byte 4: Combined byte consisting of:
Bits 7-2 (6 bits): Version Tag (first 6 bits of Profile Hash) for instant change detection.
Bit 1 (1 bit): Platform Flag (1 for iOS, 0 for Android).
Bit 0 (1 bit): Online Status Flag (1 if Internet Bridge, 0 if offline).
2. Scan Response Packet (12 Bytes)
Dispatched only when requested by active scanners to conserve battery:
Bytes 0-2 (24 bits): Latitude compressed to a 24-bit fixed-point integer.
Bytes 3-5 (24 bits): Longitude compressed to a 24-bit fixed-point integer.
Bytes 6-11 (6 bytes): Full Profile Hash for cryptographically verifying user identity.
✈️ Throttled Heartbeat (Energy Conservation)
Continuous scanning and advertising is resource-heavy. Off Chat utilizes Adaptive Throttling:
Motion State
Resets and updates advertising instantly when a change of 111 meters or physical sensor movement is detected to maintain spatial accuracy.
Stationary State
If the user is sitting still, the advertiser sleeps and restarts advertising only every 300 seconds (5 minutes) to maintain node connection tables.
🧠 Architectural Knowledge Graph
Interactive visualization of the project's codebase and conceptual relationships generated via Graphify.
Simulates BLE radio signals and distances between multiple Android emulators, allowing offline local verification of the Directed Beam routing and GATT sync logics.
In-App Developer Terminal
A hidden, color-coded, real-time diagnostic console accessible via triple-tap on the home screen "OFFCHAT" logo title, displaying the last 200 system events.
CI/CD Release Automation
GitHub Actions automatically builds release APKs and App Bundles on every push to the master branch, deploying directly to targeted releases.
Off Chat: Decentralizovaný Digitální Concierge
Bakalářská práce | ČVUT FEL, Praha
Off Chat je offline peer-to-peer decentralizovaná komunikační platforma postavená na Flutteru. Využívá Bluetooth Low Energy (BLE) pro okamžité objevování zařízení, sledování relativní polohy (Radar) a bezpečnou výměnu zpráv bez jakékoli závislosti na internetu, mobilním signálu či centrální infrastruktuře.
📱 Uživatelská Cesta
Prohlédněte si prémiové rozhraní "Aurelian Noir" skrze klíčové kroky životního cyklu aplikace.
Vstup
První Dojem
Uživatelé jsou přivítáni minimalistickou úvodní obrazovkou, která okamžitě definuje estetiku digitálního concierge.
Krok 01
Identifikace Uzlu
Proces nastavení začíná vysvětlením decentralizované povahy sítě. Každé zařízení funguje jako zabezpečený uzel.
Krok 02
Offline Bezpečnost
Komunikace probíhá přímo mezi zařízeními. Žádné servery, žádné záznamy, žádný internet.
Centrum
Objevování Uzlů
Hlavní rozhraní skenuje aktivní pulzy v okolí. Objevení uživatelé se zobrazí s vlastními přezdívkami a stavem blízkosti.
Prostorové Sledování
Radar
Vlastní vizualizační engine kombinuje GPS a kompas pro vykreslení relativní polohy ostatních v reálném čase.
Komunikace
Zabezpečené Zprávy
Přímá peer-to-peer komunikace přes GATT s automatickým dělením a skládáním textu a médií.
Správa
Identita a Nastavení
Spravujte vzhled svého uzlu, přepínejte prostorovou viditelnost a konfigurujte upozornění.
🛰 Protokol Off-Chat BLE
Zero-read Identifikační Protokol
K překonání limitů BLE reklamy (31 bajtů) a omezení iOS na pozadí Off Chat rozděluje přenos dat mezi primární paket a skenovací odpověď:
1. Primární inzerční paket (5 bajtů)
Zabaluje klíčová identifikační data na bitové úrovni:
Bajty 0-3: Stable Device ID (32bitový big-endian unsigned integer).
Bajt 4: Kombinovaný bajt obsahující:
Bity 7-2 (6 bitů): Version Tag (prvních 6 bitů hashe profilu) pro okamžitou detekci změn bez navazování GATT spojení.
Bit 1 (1 bit): Příznak platformy (1 pro iOS, 0 pro Android).
Bit 0 (1 bit): Příznak online stavu (1 pro Internet Bridge, 0 pro offline).
2. Paket odpovědi na skenování (12 bajtů)
Vysílán pouze na vyžádání skenerem, což šetří energii baterie:
Bajty 0-2 (24 bitů): Zeměpisná šířka (Latitude) komprimovaná do 24bitového integeru s pevnou řádovou čárkou.
Bajty 3-5 (24 bitů): Zeměpisná délka (Longitude) komprimovaná do 24bitového integeru s pevnou řádovou čárkou.
Bajty 6-11 (6 bajtů): Full Profile Hash pro kryptografické ověření identity uzlu.
✈️ Throttled Heartbeat (Energetická optimalizace)
Neustálé vysílání a skenování je energeticky náročné. Off Chat využívá Adaptivní Throttling:
Stav v pohybu
Okamžitě restartuje a aktualizuje inzerci při změně polohy o více než 111 metrů nebo při detekci pohybu ze senzorů pro udržení přesnosti polohy.
Stacionární stav
Pokud uživatel sedí v klidu, inzerce se uspí a restartuje se pouze každých 300 sekund (5 minut) pro údržbu tabulek spojení.
🧠 Architektonický Graf Znalostí
Interaktivní vizualizace kódové základny a konceptuálních vztahů projektu generovaná pomocí Graphify.