Skip to content

Latest commit

 

History

History
81 lines (67 loc) · 4.59 KB

File metadata and controls

81 lines (67 loc) · 4.59 KB

Mycelium Android — Documentation

Last verified against source: v0.5.12 (versionCode 44)

Index

Document Description
ARCHITECTURE.md Full architecture reference — layer diagram, data flow pipelines, component inventory
DEVELOPMENT.md Developer setup, building, testing, project structure walkthrough
DATA_MODELS.md Core data types — Note, Author, ThreadReply, DirectMessage, relay types, etc.
NAVIGATION.md Navigation patterns — overlay stack system, NavController routes, bottom nav
RELAY_SYSTEM.md Full relay stack — Cybin transport → RelayPool → Multiplexer → StateMachine → Repositories
background-connectivity-architecture.md Design doc: Adaptive / Always On / When Active connection modes
lnurl-proxy-architecture.md Design doc: LNURL proxy server for embedded Lightning wallet

Root-Level Files

File Description
README.md Project overview, features, NIP support, build instructions
AGENTS.md Universal AI agent guidance — architecture, workflow, coding standards, project goals
CLAUDE.md Compressed architecture summary and build commands (read first)
CONTRIBUTING.md Fork/contribution guidelines for external contributors
CHANGELOG.md Release history
LICENSE.md MIT license + Apache 2.0 third-party notices

Quick Orientation

Mycelium is a native Android Nostr client. The codebase has two modules:

  1. app/ — The Android application (social.mycelium.android)
  2. cybin/ — In-repo Nostr protocol library (com.example.cybin), included via Gradle composite build

All application code lives under app/src/main/java/social/mycelium/android/:

├── auth/           # Amber signer management (1 file)
├── cache/          # NIP-11 cache, thread reply cache (2 files + subdirectory)
├── data/           # Data models — Note, Author, Relay, Draft, etc. (17 files)
├── db/             # Room database — entities, DAOs, AppDatabase (13 files)
├── lightning/      # Embedded Phoenix wallet, NWC service, seed management (5 files)
├── network/        # HTTP client, WebSocket client (2 files)
├── relay/          # Relay orchestration layer (7 files)
├── repository/     # Data repositories and managers (49 files)
├── services/       # Event publisher, schedulers, notification channels, etc. (20 files)
├── ui/
│   ├── components/ # Reusable composables — NoteCard, ZapMenu, VideoPlayer, etc. (59 files)
│   ├── icons/      # Custom icon definitions (1 file)
│   ├── navigation/ # NavHost, route definitions, transitions (2 files)
│   ├── performance/# Compose performance utilities (2 files)
│   ├── screens/    # Screen composables — Dashboard, Thread, Profile, etc. (52 files)
│   ├── settings/   # Preference singletons (2 files)
│   └── theme/      # MD3 theme, colors, typography (4 files)
├── utils/          # Utility classes — link sanitizer, markdown, image processing (22 files)
├── viewmodel/      # ViewModels — activity-scoped and screen-scoped (12 files)
├── MainActivity.kt
└── SplashActivity.kt

The Cybin library lives under cybin/cybin/src/main/java/com/example/cybin/:

├── core/           # Event, Filter, TagArrayBuilder, Types, Utils (6 files)
├── crypto/         # KeyPair, EventHasher, NIP-04, NIP-44 encryption (4 files)
├── nip19/          # Bech32 encoding, TLV parsing, entity types (4 files)
├── nip25/          # Reaction events — kind 7 (1 file)
├── nip47/          # Wallet Connect — NWC request/response (1 file)
├── nip55/          # External signer (Amber) integration (6 files)
├── nip57/          # Zap request events — kind 9734 (1 file)
├── relay/          # CybinRelayPool, NostrProtocol, RelayUrl (3 files)
└── signer/         # NostrSigner abstract + internal implementation (2 files)

Where to Start