How a-praveen2006/psira works
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: ChatsActivity.kt Chats · MainActivity.kt Main · BaseActivity.kt Base activity · StealthManager.kt Stealth manager
Components 34
App Shell
Process bootstrap and shared activity/theme infrastructure
- PsiRa app · Android application entry point
app/src/main/java/com/project1/psira/PsiRaApplication.kt - Splash · Initial routing screen
app/src/main/java/com/project1/psira/SplashActivity.kt - Main · Primary host screen
app/src/main/java/com/project1/psira/MainActivity.kt - Base activity · Shared activity behavior and theme handling
app/src/main/java/com/project1/psira/BaseActivity.kt - Dialogs · Shared dialog and prompt utilities
app/src/main/java/com/project1/psira/PsiRaDialogs.kt - Config · App-wide configuration values
app/src/main/java/com/project1/psira/PsiraConfig.kt - Login · Authentication entry screen
app/src/main/java/com/project1/psira/LoginActivity.kt
Messaging
Chat, group, and transport-facing messaging surfaces
- Chats · Conversation list and chat launcher
app/src/main/java/com/project1/psira/ChatsActivity.kt - Chat · General chat conversation screen
app/src/main/java/com/project1/psira/ChatActivity.kt - Direct chat · Peer-to-peer direct chat screen
app/src/main/java/com/project1/psira/DirectChatActivity.kt - Groups · Group conversation and roster screen
app/src/main/java/com/project1/psira/GroupsActivity.kt - Wi-Fi Direct · Wi-Fi Direct chat surface
app/src/main/java/com/project1/psira/WifiDirectChatActivity.kt
Calling
Call UI and long-lived call management
- Call · In-call user interface
app/src/main/java/com/project1/psira/CallActivity.kt - Call history · Stored call sessions and records
app/src/main/java/com/project1/psira/CallHistoryActivity.kt - Call manager · Coordinates call state and lifecycle
app/src/main/java/com/project1/psira/CallManager.kt - Call service · Long-lived service for call execution
app/src/main/java/com/project1/psira/CallService.kt
Secure Data
Vault and encrypted notes workflow
- Vault · Protected local storage surface
app/src/main/java/com/project1/psira/VaultActivity.kt - Vault auth · Additional vault access gate
app/src/main/java/com/project1/psira/VaultAuthHelper.kt - Secure notes · Encrypted notes list and editor entry
app/src/main/java/com/project1/psira/SecureNotesActivity.kt - Note editor · Edit and persist secure notes
app/src/main/java/com/project1/psira/NoteEditorActivity.kt
Stealth
Disguise, cloaking, and operational surfaces
- Stealth manager · Controls disguise and cloaking behavior
app/src/main/java/com/project1/psira/StealthManager.kt - Disguise · Alternate app persona screen
app/src/main/java/com/project1/psira/DisguiseActivity.kt - Stealth detail · Detailed stealth configuration view
app/src/main/java/com/project1/psira/StealthDetailActivity.kt - Nexus dashboard · Operational dashboard for nexus features
app/src/main/java/com/project1/psira/NexusDashboardActivity.kt - Nexus link · Connection and linkage surface
app/src/main/java/com/project1/psira/NexusLinkActivity.kt - Learning · Guidance or onboarding surface
app/src/main/java/com/project1/psira/LearningActivity.kt
Infra
Crypto, relay, background services, and external messaging
- AES · Symmetric encryption helper
app/src/main/java/com/project1/psira/AESEncryption.kt - Cipher · Higher-level cipher wrapper
app/src/main/java/com/project1/psira/PsiraCipher.kt - ECDH keys · Key agreement and key management
app/src/main/java/com/project1/psira/ECDHKeyManager.kt - Alias manager · Maps or obscures user identities
app/src/main/java/com/project1/psira/AliasManager.kt - Relay client · PocketBase-based relay client
app/src/main/java/com/project1/psira/PocketBaseRelayClient.kt - Dead drop · Relay orchestration and fallback paths
app/src/main/java/com/project1/psira/DeadDropRelayManager.kt - WebRTC · Real-time communication client
app/src/main/java/com/project1/psira/WebRTCClient.kt - Messaging svc · Firebase messaging entry service
app/src/main/java/com/project1/psira/PsiraMessagingService.kt
Connections 37
- 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