Examples
Real-world usage patterns extracted from the Snort app (packages/app/src/). Each page shows how the Snort libraries are actually used in production, with code and file references.
@snort/system-react
- React Hooks —
useUserProfile,useRequestBuilder,useRequestBuilderAdvanced,useEventFeed,useReactions,useEventReactions,useCached,SnortContext,useUserSearch
@snort/system
- Event Builder & Publisher —
EventBuilderhooks,EventPublisherfor different login types, NIP-98 auth, NIP-59 gift wraps,EventExtutilities - NostrLink — Factory methods,
fromTag(),tryParseNostrLink(),encode(),UnknownTagfor custom lists - Query System — Zap feeds, timeline filtering, NIP-17 chat,
RangeSync,OutboxModel - NIP Implementations — NIP-10 thread parsing, NIP-11 relay info, NIP-18 quotes, NIP-94 file metadata,
parseZap, DVM jobs - User State — Login session creation, rehydration, mute lists, app data, custom
ToNostrEventTag - Signers — NIP-46 connect flow, custom
EventSignerimplementation,KeyStoragepersistence - Text Parsing — Cached transforms, NIP-94 imeta extraction and construction
@snort/shared
- Shared Utilities —
ExternalStorepatterns, TLV encoding, bech32 helpers,LNURL, work queues,FeedCache
@snort/wallet
- Wallet Integration —
WalletStorelifecycle, LNDHub connection,Zapperfor zaps, capability checks
@snort/worker-relay
- Worker Relay — Initialization,
forYouFeed(),setEventMetadata(),count(), admin operations