$ show bitwarden/android
This is the official Bitwarden password manager for Android, a production-grade Kotlin application with a modular monorepo structure. It implements a full-featured password manager including vault management (ciphers, folders, collections, sends), autofill (standard and accessibility-based), FIDO2/WebAuthn passkey support, TOTP authenticator, password/username generator, secure credential exchange (CXF), and enterprise features like SSO, Duo, and policy enforcement. The architecture follows an MVVM pattern with Jetpack Compose UI, Dagger/Hilt dependency injection, Room SQLite for local persistence, Retrofit/OkHttp for networking, and the Bitwarden SDK for cryptographic operations. The codebase is organized into multiple Gradle modules: `app` (main app), `authenticator` (standalone TOTP app), `authenticatorbridge` (AIDL-based cross-app communication), `network` (API client), `data` (data sources and repositories), `ui` (reusable Compose components), `core` (platform utilities), `cxf` (credential exchange), and `testharness` (Credential Manager API testing). Key entry points include `MainActivity`, `CredentialProviderActivity`, `AuthCallbackActivity`, and `BitwardenApplication`. Data flows involve syncing vault data from Bitwarden servers to local Room databases, processing autofill requests from other apps via Android's Autofill and Credential Manager frameworks, and securely sharing TOTP secrets between the main app and authenticator app via the encrypted bridge. External dependencies include the Bitwarden SDK, AndroidX libraries (Compose, Navigation, Room, Biometrics, Credentials, etc.), Retrofit, OkHttp, kotlinx.serialization, and optional Firebase for push notifications and crash reporting.
The LLM identified 3 files worth highlighting for reuse:
Abstract base class for parsing credential export files (LastPass, Aegis, 2FAS, Bitwarden formats). Provides a `parseForResult` method that wraps parsing logic with consistent error handling, catching `MissingFieldException`, `SerializationException`, and other exceptions to return a sealed result type. This pattern is reusable for any project that needs to parse multiple file formats with uniform error reporting, and can be extracted with minimal modification by implementing the abstract `parse` method.
A polished, theme-aware Material3 Compose button component that demonstrates a reusable UI component pattern. It provides overloads for `@DrawableRes Int` and `Painter`, supports default parameters for enabled state and external-link behavior, integrates with `BitwardenTheme`, `BitwardenDrawable`, and `BitwardenString`, and includes accessibility semantics via `MutableInteractionSource` and `interactiveBorder`. This component can be extracted into any Compose-based Android project as a building block for a consistent design system.
A TypeScript parser for Android `dumpsys window` output that extracts window bounds, touchable regions, and surface information. It handles multiple window types (e.g., `mBounds`, `mContentFrame`, `mVisibleFrame`) and provides structured geometry data. This parser is self-contained, well-tested (with fixtures), and can be reused in any Android UI automation toolchain that needs to parse `dumpsys` output for element finding or screen analysis.