# a-praveen2006/psira architecture

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

- Interactive diagram: https://gitdiagram.com/a-praveen2006/psira
- Repository: https://github.com/a-praveen2006/psira

## Overview

1. **Overall shape**
   PsiRa is a single-module Android app (`app/`) built with Kotlin, XML layouts, and AndroidX/Material UI. The architecture is organized around many feature-specific Activities plus a set of shared managers, services, adapters, models, and crypto helpers in `com.project1.psira`.

2. **App bootstrap and shell**
   `PsiRaApplication` is the process-level entry point, while `SplashActivity` and `MainActivity` likely gate initial routing into the rest of the app. `BaseActivity` appears to provide shared UI/theme behavior across screens. `PsiraConfig` and `PsiRaDialogs` centralize runtime configuration and common dialog UI.

3. **Primary user-facing domains**
   The app is split into distinct feature screens: chat (`ChatsActivity`, `ChatActivity`, `DirectChatActivity`), calls (`CallActivity`, `CallHistoryActivity`), secure storage (`VaultActivity`, `SecureNotesActivity`, `NoteEditorActivity`), settings/login (`SettingsActivity`, `LoginActivity`), and operational/stealth features (`NexusDashboardActivity`, `NexusLinkActivity`, `DisguiseActivity`, `StealthDetailActivity`, `LearningActivity`). This is a multi-feature client rather than a narrow single-purpose app.

4. **Messaging subsystem**
   Messaging is centered on `Message`, `User`, `Group`, and `Report` models, with `MessageAdapter`, `DirectChatAdapter`, `SpectreChatAdapter`, `BluetoothChatAdapter`, `GroupAdapter`, and `DeviceAdapter` binding those models to list UIs. The UI layer is split by transport/use case: general chat, direct chat, group chat, Bluetooth chat, and device selection/discovery.

5. **Transport and connectivity layer**
   Communication is not limited to one backend. The repo contains a WebRTC client (`WebRTCClient`) for real-time communication, Firebase messaging support (`PsiraMessagingService`, `google-services.json`), Bluetooth support, and Wi‑Fi Direct chat (`WifiDirectChatActivity`). There is also a relay/client layer (`PocketBaseRelayClient`, `DeadDropRelayManager`), suggesting the app can route data through more than one network path.

6. **Calling subsystem**
   Voice/call handling is separated into `CallManager`, `CallService`, `CallActivity`, and `AudioPlayer`. This indicates calls are treated as a long-lived background capability with a service boundary, while the activity handles the visible call UI and history screen records past sessions.

7. **Crypto and key management boundary**
   Security is a first-class subsystem. `AESEncryption`, `PsiraCipher`, `ECDHKeyManager`, and `AliasManager` imply layered encryption and key exchange, with aliases likely used to hide real identities or map user handles. This crypto layer sits underneath messaging, notes, and possibly relay/call flows, rather than being embedded in the UI.

8. **Secure local data and vault**
   `VaultActivity` and `VaultAuthHelper` indicate a protected local storage area guarded by a separate authentication step. `SecureNotesActivity`, `Note`, `NoteAdapter`, and `NoteEditorActivity` provide an encrypted notes workflow. The presence of biometric auth in the README suggests the vault is a privileged boundary for locally sensitive content.

9. **Stealth / disguise / cloaking features**
   `StealthManager`, `DisguiseActivity`, `StealthDetailActivity`, and the “cloak” layouts/icons (`activity_cloak_*`, `ic_cloak_*`) show a secondary product layer focused on disguising the app’s function. `LauncherClock`, `AnalogClockView`, and `RadarPulseView` suggest alternate launcher personas or decoy UIs, making stealth a separate subsystem from core messaging.

10. **Background execution and network maintenance**
    `SpectreNodeService`, `OverwatchC2Receiver`, and `TrafficPaddingWorker` indicate background processing outside the visible UI. These components likely keep node state, receive control/event broadcasts, and generate padding traffic to obscure usage patterns. Architecturally, this is the app’s always-on operational layer.

11. **UI composition and presentation**
    Most screens are backed by XML layouts and RecyclerView-style adapters. The presence of custom views such as `AnalogClockView` and `RadarPulseView`, plus dedicated item layouts for chat, notes, call records, and bottom sheets, shows a presentation layer built from reusable components rather than a single monolithic screen.

12. **External services and build/runtime boundary**
    Firebase is materially part of the architecture via Google services config and the messaging/auth/storage claims in the README. The project targets Android 14, supports Android 8.0+, and ships with ProGuard rules and a release AAB, so the architecture includes mobile release hardening and obfuscation concerns in addition to feature code.

13. **Tests and validation**
    The repo includes both unit and instrumentation test scaffolding under `app/src/test` and `app/src/androidTest`, which means there is at least a separation between JVM-level logic tests and device-level integration/UI tests, even if the test suite is small.

14. **How data flows through the app**
    A typical flow is: user enters through splash/login, selects a feature surface, UI adapters render local models, transport managers/services move data across a chosen channel, and crypto helpers secure payloads before storage or transmission. Background services/workers keep connectivity and stealth behavior alive when the app is not foregrounded.

Main entry points: [`app/src/main/java/com/project1/psira/ChatsActivity.kt`](https://github.com/a-praveen2006/psira/blob/master/app/src/main/java/com/project1/psira/ChatsActivity.kt) (Chats), [`app/src/main/java/com/project1/psira/MainActivity.kt`](https://github.com/a-praveen2006/psira/blob/master/app/src/main/java/com/project1/psira/MainActivity.kt) (Main), [`app/src/main/java/com/project1/psira/BaseActivity.kt`](https://github.com/a-praveen2006/psira/blob/master/app/src/main/java/com/project1/psira/BaseActivity.kt) (Base activity), [`app/src/main/java/com/project1/psira/StealthManager.kt`](https://github.com/a-praveen2006/psira/blob/master/app/src/main/java/com/project1/psira/StealthManager.kt) (Stealth manager)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app_shell["App Shell"]
  node_psi_app(("PsiRa app"))
  node_splash["Splash<br/>activity<br/>[SplashActivity.kt]"]
  node_main["Main<br/>activity<br/>[MainActivity.kt]"]
  node_base_activity["Base activity<br/>ui base<br/>[BaseActivity.kt]"]
  node_dialogs["Dialogs<br/>ui helpers<br/>[PsiRaDialogs.kt]"]
  node_config["Config<br/>[PsiraConfig.kt]"]
  node_login["Login<br/>activity<br/>[LoginActivity.kt]"]
end

subgraph group_messaging["Messaging"]
  node_chats["Chats<br/>activity<br/>[ChatsActivity.kt]"]
  node_chat["Chat<br/>activity<br/>[ChatActivity.kt]"]
  node_direct_chat["Direct chat<br/>activity"]
  node_groups["Groups<br/>activity<br/>[GroupsActivity.kt]"]
  node_wifi_direct["Wi-Fi Direct<br/>activity"]
end

subgraph group_calls["Calling"]
  node_call_activity["Call<br/>activity<br/>[CallActivity.kt]"]
  node_call_history["Call history<br/>activity"]
  node_call_manager["Call manager<br/>call control<br/>[CallManager.kt]"]
  node_call_service["Call service<br/>background service<br/>[CallService.kt]"]
end

subgraph group_secure_data["Secure Data"]
  node_vault["Vault<br/>activity<br/>[VaultActivity.kt]"]
  node_vault_auth["Vault auth<br/>auth helper<br/>[VaultAuthHelper.kt]"]
  node_secure_notes["Secure notes<br/>activity"]
  node_note_editor["Note editor<br/>activity"]
end

subgraph group_stealth["Stealth"]
  node_stealth_mgr["Stealth manager<br/>stealth control<br/>[StealthManager.kt]"]
  node_disguise["Disguise<br/>activity"]
  node_stealth_detail["Stealth detail<br/>activity"]
  node_nexus_dash["Nexus dashboard<br/>activity"]
  node_nexus_link["Nexus link<br/>activity"]
  node_learning["Learning<br/>activity"]
end

subgraph group_infra["Infra"]
  node_crypto_aes["AES<br/>crypto<br/>[AESEncryption.kt]"]
  node_crypto_cipher["Cipher<br/>crypto<br/>[PsiraCipher.kt]"]
  node_ecdh["ECDH keys<br/>key exchange<br/>[ECDHKeyManager.kt]"]
  node_alias_mgr["Alias manager<br/>identity mapping<br/>[AliasManager.kt]"]
  node_relay["Relay client"]
  node_dead_drop["Dead drop<br/>relay manager"]
  node_web_rtc["WebRTC<br/>realtime transport<br/>[WebRTCClient.kt]"]
  node_messaging_svc["Messaging svc<br/>push service"]
end

node_psi_app -->|"starts"| node_splash
node_splash -->|"routes to"| node_main
node_main -->|"gates"| node_login
node_main -->|"opens"| node_chats
node_main -->|"opens"| node_vault
node_main -->|"opens"| node_nexus_dash
node_base_activity -->|"supports"| node_chats
node_base_activity -->|"supports"| node_chat
node_base_activity -->|"supports"| node_call_activity
node_base_activity -->|"supports"| node_vault
node_dialogs -->|"used by"| node_main
node_dialogs -->|"used by"| node_secure_notes
node_chats -->|"drives"| node_chat
node_chats -->|"drives"| node_direct_chat
node_chats -->|"drives"| node_groups
node_chats -->|"drives"| node_wifi_direct
node_chat -->|"uses"| node_web_rtc
node_direct_chat -->|"uses"| node_web_rtc
node_groups -->|"uses"| node_alias_mgr
node_call_activity -->|"uses"| node_call_manager
node_call_manager -->|"runs in"| node_call_service
node_call_history -->|"reads from"| node_call_manager
node_vault -->|"guards with"| node_vault_auth
node_vault -->|"contains"| node_secure_notes
node_secure_notes -->|"opens"| node_note_editor
node_secure_notes -->|"uses"| node_crypto_cipher
node_note_editor -->|"uses"| node_crypto_aes
node_crypto_cipher -->|"depends on"| node_ecdh
node_crypto_cipher -->|"wraps"| node_crypto_aes
node_dead_drop -->|"orchestrates"| node_relay
node_relay -->|"integrates with"| node_messaging_svc
node_messaging_svc -->|"notifies"| node_chats
node_stealth_mgr -->|"controls"| node_disguise
node_stealth_mgr -->|"controls"| node_stealth_detail
node_stealth_mgr -->|"feeds"| node_nexus_dash
node_stealth_mgr -->|"feeds"| node_learning
node_nexus_dash -->|"opens"| node_nexus_link

click node_psi_app "https://github.com/a-praveen2006/psira/blob/master/app/src/main/java/com/project1/psira/PsiRaApplication.kt"
click node_splash "https://github.com/a-praveen2006/psira/blob/master/app/src/main/java/com/project1/psira/SplashActivity.kt"
click node_main "https://github.com/a-praveen2006/psira/blob/master/app/src/main/java/com/project1/psira/MainActivity.kt"
click node_base_activity "https://github.com/a-praveen2006/psira/blob/master/app/src/main/java/com/project1/psira/BaseActivity.kt"
click node_dialogs "https://github.com/a-praveen2006/psira/blob/master/app/src/main/java/com/project1/psira/PsiRaDialogs.kt"
click node_config "https://github.com/a-praveen2006/psira/blob/master/app/src/main/java/com/project1/psira/PsiraConfig.kt"
click node_login "https://github.com/a-praveen2006/psira/blob/master/app/src/main/java/com/project1/psira/LoginActivity.kt"
click node_chats "https://github.com/a-praveen2006/psira/blob/master/app/src/main/java/com/project1/psira/ChatsActivity.kt"
click node_chat "https://github.com/a-praveen2006/psira/blob/master/app/src/main/java/com/project1/psira/ChatActivity.kt"
click node_direct_chat "https://github.com/a-praveen2006/psira/blob/master/app/src/main/java/com/project1/psira/DirectChatActivity.kt"
click node_groups "https://github.com/a-praveen2006/psira/blob/master/app/src/main/java/com/project1/psira/GroupsActivity.kt"
click node_wifi_direct "https://github.com/a-praveen2006/psira/blob/master/app/src/main/java/com/project1/psira/WifiDirectChatActivity.kt"
click node_call_activity "https://github.com/a-praveen2006/psira/blob/master/app/src/main/java/com/project1/psira/CallActivity.kt"
click node_call_history "https://github.com/a-praveen2006/psira/blob/master/app/src/main/java/com/project1/psira/CallHistoryActivity.kt"
click node_call_manager "https://github.com/a-praveen2006/psira/blob/master/app/src/main/java/com/project1/psira/CallManager.kt"
click node_call_service "https://github.com/a-praveen2006/psira/blob/master/app/src/main/java/com/project1/psira/CallService.kt"
click node_vault "https://github.com/a-praveen2006/psira/blob/master/app/src/main/java/com/project1/psira/VaultActivity.kt"
click node_vault_auth "https://github.com/a-praveen2006/psira/blob/master/app/src/main/java/com/project1/psira/VaultAuthHelper.kt"
click node_secure_notes "https://github.com/a-praveen2006/psira/blob/master/app/src/main/java/com/project1/psira/SecureNotesActivity.kt"
click node_note_editor "https://github.com/a-praveen2006/psira/blob/master/app/src/main/java/com/project1/psira/NoteEditorActivity.kt"
click node_stealth_mgr "https://github.com/a-praveen2006/psira/blob/master/app/src/main/java/com/project1/psira/StealthManager.kt"
click node_disguise "https://github.com/a-praveen2006/psira/blob/master/app/src/main/java/com/project1/psira/DisguiseActivity.kt"
click node_stealth_detail "https://github.com/a-praveen2006/psira/blob/master/app/src/main/java/com/project1/psira/StealthDetailActivity.kt"
click node_nexus_dash "https://github.com/a-praveen2006/psira/blob/master/app/src/main/java/com/project1/psira/NexusDashboardActivity.kt"
click node_nexus_link "https://github.com/a-praveen2006/psira/blob/master/app/src/main/java/com/project1/psira/NexusLinkActivity.kt"
click node_learning "https://github.com/a-praveen2006/psira/blob/master/app/src/main/java/com/project1/psira/LearningActivity.kt"
click node_crypto_aes "https://github.com/a-praveen2006/psira/blob/master/app/src/main/java/com/project1/psira/AESEncryption.kt"
click node_crypto_cipher "https://github.com/a-praveen2006/psira/blob/master/app/src/main/java/com/project1/psira/PsiraCipher.kt"
click node_ecdh "https://github.com/a-praveen2006/psira/blob/master/app/src/main/java/com/project1/psira/ECDHKeyManager.kt"
click node_alias_mgr "https://github.com/a-praveen2006/psira/blob/master/app/src/main/java/com/project1/psira/AliasManager.kt"
click node_relay "https://github.com/a-praveen2006/psira/blob/master/app/src/main/java/com/project1/psira/PocketBaseRelayClient.kt"
click node_dead_drop "https://github.com/a-praveen2006/psira/blob/master/app/src/main/java/com/project1/psira/DeadDropRelayManager.kt"
click node_web_rtc "https://github.com/a-praveen2006/psira/blob/master/app/src/main/java/com/project1/psira/WebRTCClient.kt"
click node_messaging_svc "https://github.com/a-praveen2006/psira/blob/master/app/src/main/java/com/project1/psira/PsiraMessagingService.kt"

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_psi_app,node_splash,node_main,node_base_activity,node_dialogs,node_config,node_login toneBlue
class node_chats,node_chat,node_direct_chat,node_groups,node_wifi_direct toneAmber
class node_call_activity,node_call_history,node_call_manager,node_call_service toneMint
class node_vault,node_vault_auth,node_secure_notes,node_note_editor toneRose
class node_stealth_mgr,node_disguise,node_stealth_detail,node_nexus_dash,node_nexus_link,node_learning toneIndigo
class node_crypto_aes,node_crypto_cipher,node_ecdh,node_alias_mgr,node_relay,node_dead_drop,node_web_rtc,node_messaging_svc toneTeal
```

## Components

### App Shell

Process bootstrap and shared activity/theme infrastructure

- [PsiRa app](https://github.com/a-praveen2006/psira/blob/master/app/src/main/java/com/project1/psira/PsiRaApplication.kt): application · Android application entry point · `app/src/main/java/com/project1/psira/PsiRaApplication.kt`
- [Splash](https://github.com/a-praveen2006/psira/blob/master/app/src/main/java/com/project1/psira/SplashActivity.kt): activity · Initial routing screen · `app/src/main/java/com/project1/psira/SplashActivity.kt`
- [Main](https://github.com/a-praveen2006/psira/blob/master/app/src/main/java/com/project1/psira/MainActivity.kt): activity · Primary host screen · `app/src/main/java/com/project1/psira/MainActivity.kt`
- [Base activity](https://github.com/a-praveen2006/psira/blob/master/app/src/main/java/com/project1/psira/BaseActivity.kt): ui base · Shared activity behavior and theme handling · `app/src/main/java/com/project1/psira/BaseActivity.kt`
- [Dialogs](https://github.com/a-praveen2006/psira/blob/master/app/src/main/java/com/project1/psira/PsiRaDialogs.kt): ui helpers · Shared dialog and prompt utilities · `app/src/main/java/com/project1/psira/PsiRaDialogs.kt`
- [Config](https://github.com/a-praveen2006/psira/blob/master/app/src/main/java/com/project1/psira/PsiraConfig.kt): runtime config · App-wide configuration values · `app/src/main/java/com/project1/psira/PsiraConfig.kt`
- [Login](https://github.com/a-praveen2006/psira/blob/master/app/src/main/java/com/project1/psira/LoginActivity.kt): activity · Authentication entry screen · `app/src/main/java/com/project1/psira/LoginActivity.kt`

### Messaging

Chat, group, and transport-facing messaging surfaces

- [Chats](https://github.com/a-praveen2006/psira/blob/master/app/src/main/java/com/project1/psira/ChatsActivity.kt): activity · Conversation list and chat launcher · `app/src/main/java/com/project1/psira/ChatsActivity.kt`
- [Chat](https://github.com/a-praveen2006/psira/blob/master/app/src/main/java/com/project1/psira/ChatActivity.kt): activity · General chat conversation screen · `app/src/main/java/com/project1/psira/ChatActivity.kt`
- [Direct chat](https://github.com/a-praveen2006/psira/blob/master/app/src/main/java/com/project1/psira/DirectChatActivity.kt): activity · Peer-to-peer direct chat screen · `app/src/main/java/com/project1/psira/DirectChatActivity.kt`
- [Groups](https://github.com/a-praveen2006/psira/blob/master/app/src/main/java/com/project1/psira/GroupsActivity.kt): activity · Group conversation and roster screen · `app/src/main/java/com/project1/psira/GroupsActivity.kt`
- [Wi-Fi Direct](https://github.com/a-praveen2006/psira/blob/master/app/src/main/java/com/project1/psira/WifiDirectChatActivity.kt): activity · Wi-Fi Direct chat surface · `app/src/main/java/com/project1/psira/WifiDirectChatActivity.kt`

### Calling

Call UI and long-lived call management

- [Call](https://github.com/a-praveen2006/psira/blob/master/app/src/main/java/com/project1/psira/CallActivity.kt): activity · In-call user interface · `app/src/main/java/com/project1/psira/CallActivity.kt`
- [Call history](https://github.com/a-praveen2006/psira/blob/master/app/src/main/java/com/project1/psira/CallHistoryActivity.kt): activity · Stored call sessions and records · `app/src/main/java/com/project1/psira/CallHistoryActivity.kt`
- [Call manager](https://github.com/a-praveen2006/psira/blob/master/app/src/main/java/com/project1/psira/CallManager.kt): call control · Coordinates call state and lifecycle · `app/src/main/java/com/project1/psira/CallManager.kt`
- [Call service](https://github.com/a-praveen2006/psira/blob/master/app/src/main/java/com/project1/psira/CallService.kt): background service · Long-lived service for call execution · `app/src/main/java/com/project1/psira/CallService.kt`

### Secure Data

Vault and encrypted notes workflow

- [Vault](https://github.com/a-praveen2006/psira/blob/master/app/src/main/java/com/project1/psira/VaultActivity.kt): activity · Protected local storage surface · `app/src/main/java/com/project1/psira/VaultActivity.kt`
- [Vault auth](https://github.com/a-praveen2006/psira/blob/master/app/src/main/java/com/project1/psira/VaultAuthHelper.kt): auth helper · Additional vault access gate · `app/src/main/java/com/project1/psira/VaultAuthHelper.kt`
- [Secure notes](https://github.com/a-praveen2006/psira/blob/master/app/src/main/java/com/project1/psira/SecureNotesActivity.kt): activity · Encrypted notes list and editor entry · `app/src/main/java/com/project1/psira/SecureNotesActivity.kt`
- [Note editor](https://github.com/a-praveen2006/psira/blob/master/app/src/main/java/com/project1/psira/NoteEditorActivity.kt): activity · Edit and persist secure notes · `app/src/main/java/com/project1/psira/NoteEditorActivity.kt`

### Stealth

Disguise, cloaking, and operational surfaces

- [Stealth manager](https://github.com/a-praveen2006/psira/blob/master/app/src/main/java/com/project1/psira/StealthManager.kt): stealth control · Controls disguise and cloaking behavior · `app/src/main/java/com/project1/psira/StealthManager.kt`
- [Disguise](https://github.com/a-praveen2006/psira/blob/master/app/src/main/java/com/project1/psira/DisguiseActivity.kt): activity · Alternate app persona screen · `app/src/main/java/com/project1/psira/DisguiseActivity.kt`
- [Stealth detail](https://github.com/a-praveen2006/psira/blob/master/app/src/main/java/com/project1/psira/StealthDetailActivity.kt): activity · Detailed stealth configuration view · `app/src/main/java/com/project1/psira/StealthDetailActivity.kt`
- [Nexus dashboard](https://github.com/a-praveen2006/psira/blob/master/app/src/main/java/com/project1/psira/NexusDashboardActivity.kt): activity · Operational dashboard for nexus features · `app/src/main/java/com/project1/psira/NexusDashboardActivity.kt`
- [Nexus link](https://github.com/a-praveen2006/psira/blob/master/app/src/main/java/com/project1/psira/NexusLinkActivity.kt): activity · Connection and linkage surface · `app/src/main/java/com/project1/psira/NexusLinkActivity.kt`
- [Learning](https://github.com/a-praveen2006/psira/blob/master/app/src/main/java/com/project1/psira/LearningActivity.kt): activity · Guidance or onboarding surface · `app/src/main/java/com/project1/psira/LearningActivity.kt`

### Infra

Crypto, relay, background services, and external messaging

- [AES](https://github.com/a-praveen2006/psira/blob/master/app/src/main/java/com/project1/psira/AESEncryption.kt): crypto · Symmetric encryption helper · `app/src/main/java/com/project1/psira/AESEncryption.kt`
- [Cipher](https://github.com/a-praveen2006/psira/blob/master/app/src/main/java/com/project1/psira/PsiraCipher.kt): crypto · Higher-level cipher wrapper · `app/src/main/java/com/project1/psira/PsiraCipher.kt`
- [ECDH keys](https://github.com/a-praveen2006/psira/blob/master/app/src/main/java/com/project1/psira/ECDHKeyManager.kt): key exchange · Key agreement and key management · `app/src/main/java/com/project1/psira/ECDHKeyManager.kt`
- [Alias manager](https://github.com/a-praveen2006/psira/blob/master/app/src/main/java/com/project1/psira/AliasManager.kt): identity mapping · Maps or obscures user identities · `app/src/main/java/com/project1/psira/AliasManager.kt`
- [Relay client](https://github.com/a-praveen2006/psira/blob/master/app/src/main/java/com/project1/psira/PocketBaseRelayClient.kt): relay · PocketBase-based relay client · `app/src/main/java/com/project1/psira/PocketBaseRelayClient.kt`
- [Dead drop](https://github.com/a-praveen2006/psira/blob/master/app/src/main/java/com/project1/psira/DeadDropRelayManager.kt): relay manager · Relay orchestration and fallback paths · `app/src/main/java/com/project1/psira/DeadDropRelayManager.kt`
- [WebRTC](https://github.com/a-praveen2006/psira/blob/master/app/src/main/java/com/project1/psira/WebRTCClient.kt): realtime transport · Real-time communication client · `app/src/main/java/com/project1/psira/WebRTCClient.kt`
- [Messaging svc](https://github.com/a-praveen2006/psira/blob/master/app/src/main/java/com/project1/psira/PsiraMessagingService.kt): push service · Firebase messaging entry service · `app/src/main/java/com/project1/psira/PsiraMessagingService.kt`

## Connections

- PsiRa app → Splash: starts · Process boot leads into initial routing
- Splash → Main: routes to · Splash hands off into the main host
- Main → Login: gates · Main flow can enter authentication
- Main → Chats: opens · Primary navigation reaches messaging
- Main → Vault: opens · Main navigation reaches secure storage
- Main → Nexus dashboard: opens · Main navigation reaches operational surfaces
- Base activity → Chats: supports · Shared behavior used across screens
- Base activity → Chat: supports · Shared behavior used across screens
- Base activity → Call: supports · Shared behavior used across screens
- Base activity → Vault: supports · Shared behavior used across screens
- Dialogs → Main: used by · Centralized dialog UI invoked from screens
- Dialogs → Secure notes: used by · Centralized dialog UI invoked from screens
- Chats → Chat: drives · Conversation list leads into thread view
- Chats → Direct chat: drives · Conversation list can open direct chats
- Chats → Groups: drives · Conversation list can open group flow
- Chats → Wi-Fi Direct: drives · Conversation list can open Wi-Fi Direct transport
- Chat → WebRTC: uses · Chat can rely on real-time transport
- Direct chat → WebRTC: uses · Direct chat can rely on real-time transport
- Groups → Alias manager: uses · Groups may resolve display or hidden identities
- Call → Call manager: uses · Visible call UI is controlled by call logic
- Call manager → Call service: runs in · Call control depends on background service
- Call history → Call manager: reads from · History reflects managed call sessions
- Vault → Vault auth: guards with · Vault access is protected by an auth step
- Vault → Secure notes: contains · Vault surface leads into secure notes
- Secure notes → Note editor: opens · Notes list drives the editor
- Secure notes → Cipher: uses · Notes are secured with app ciphering
- Note editor → AES: uses · Editor persists encrypted content
- Cipher → ECDH keys: depends on · Ciphering is paired with key exchange
- Cipher → AES: wraps · Higher-level cipher layer wraps AES
- Dead drop → Relay client: orchestrates · Dead-drop logic sits above relay client
- Relay client → Messaging svc: integrates with · Relay paths coexist with push messaging
- Messaging svc → Chats: notifies · Incoming events feed the messaging UI
- Stealth manager → Disguise: controls · Stealth manager drives disguise UI
- Stealth manager → Stealth detail: controls · Stealth manager drives detailed settings
- Stealth manager → Nexus dashboard: feeds · Operational dashboard reflects stealth state
- Stealth manager → Learning: feeds · Learning/onboarding can be tied to stealth features
- Nexus dashboard → Nexus link: opens · Dashboard can reach linking flow
