# tanushriwarhade/offlinep2p architecture

> Architecture diagram of the GitHub repository tanushriwarhade/offlinep2p, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-26). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/tanushriwarhade/offlinep2p
- Repository: https://github.com/tanushriwarhade/offlinep2p

## Overview

OfflineP2P is an Android app for offline Bluetooth messaging, with persistent chat, a simulated-call screen, and a foreground service. The documented user journey is device discovery, peer messaging, and viewing persisted chat; the README also lists simulated calls and runtime permissions. The supplied repository tree contains no Android source files, so component paths and capabilities below come from the README, while implementation-level calls and wiring cannot be verified. Dashed edges mark only documented or plausible relationships whose exact runtime connection is unavailable.

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_discovery["Discovery and Bluetooth"]
  node_main["Device discovery"]
  node_device_adapter["Device list"]
  node_bt_manager["RFCOMM manager"]
  node_bt_service["Bluetooth service"]
end

subgraph group_messaging["Chat and Storage"]
  node_chat["Chat screen"]
  node_message_adapter["Chat bubbles"]
  node_message["Message model"]
  node_database[("Chat database")]
end

subgraph group_calls["Calls and Service"]
  node_call["Call simulation"]
end

node_user(("App user"))
node_peer(("Bluetooth peer"))
node_android_os(("Android system"))

node_user -.->|"discovers devices"| node_main
node_main -.->|"lists devices"| node_device_adapter
node_main -.->|"uses RFCOMM"| node_bt_manager
node_bt_manager -.->|"exchanges messages"| node_peer
node_bt_service -.->|"manages Bluetooth"| node_bt_manager
node_user -.->|"opens chat"| node_chat
node_chat -.->|"renders bubbles"| node_message_adapter
node_chat -.->|"persists messages"| node_database
node_message_adapter -.->|"renders messages"| node_message
node_user -.->|"starts simulation"| node_call
node_bt_service -.->|"shows notification"| node_android_os

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_main,node_device_adapter,node_bt_manager,node_bt_service,node_user toneBlue
class node_chat,node_message_adapter,node_message,node_database toneAmber
class node_call toneMint
class node_peer,node_android_os toneIndigo
```

## Components

### Discovery and Bluetooth

- **Device discovery**
- **Device list**
- **RFCOMM manager**
- **Bluetooth service**

### Chat and Storage

- **Chat screen**
- **Chat bubbles**
- **Message model**
- **Chat database**

### Calls and Service

- **Call simulation**

### Other components

- **App user**
- **Bluetooth peer**
- **Android system**

## Connections

- App user → Device discovery: discovers devices
- Device discovery → Device list: lists devices
- Device discovery → RFCOMM manager: uses RFCOMM
- RFCOMM manager → Bluetooth peer: exchanges messages
- Bluetooth service → RFCOMM manager: manages Bluetooth
- App user → Chat screen: opens chat
- Chat screen → Chat bubbles: renders bubbles
- Chat screen → Chat database: persists messages (evidence: `README.md`)
- Chat bubbles → Message model: renders messages
- App user → Call simulation: starts simulation
- Bluetooth service → Android system: shows notification (evidence: `README.md`)
