How marshalx/atproto works
Main Components
a. Core Packages (represented as major modules):
• atproto_client: Main XRPC client implementation
• atproto_core: Core functionality (NSID, URI, CID handling)
• atproto_crypto: Cryptographic operations
• atproto_firehose: Data streaming capabilities
• atproto_identity: Identity resolution
• atproto_lexicon: Protocol lexicon parsing
• atproto_server: Server-side utilities
b. External Integration Points:
• Bluesky API
• AT Protocol Network
• PLC Directory
• DID Web
• Client Applications
Architecture Layers
Top to Bottom:
Client Interface Layer
• Sync Client
• Async Client
• High-level API methods
• Raw API methods
Service Layer
• XRPC Communication
• Authentication
• Session Management
• Data Streaming
Core Processing Layer
• Lexicon Processing
• Model Generation
• Identity Resolution
• Cryptographic Operations
Data Model Layer
• Generated Models
• Record Types
• Response Types
• Common Types
Key Relationships
Client Applications
• ↓
High-level Client Interface
• ↓
XRPC Client (Sync/Async)
• ↙ ↓ ↘
Identity Repo Firehose
• ↓ ↓ ↓
Core Services (Crypto, URI, CID)
• ↓
AT Protocol Network
Implementation Details
• Modular architecture with clear separation of concerns
• Both sync and async client implementations
• Automatic code generation from lexicons
• Multiple abstraction levels (high-level vs low-level API)
• External service integration points