Skip to main content
Sovran displays rich user profiles with social metadata from the Nostr network and Sovran’s reputation API.

Profile Metadata (NIP-01)

Profiles are stored as kind 0 events with JSON content:

Standard Fields

Profile Screen

The main profile UI is in app/(user-flow)/profile.tsx:
The profile header displays:
  • Banner image: Full-width background (150px height)
  • Overlapping avatar: 90px circle with 4px border
  • Display name: From display_name or name
  • NIP-05: Verified identifier with checkmark
  • Follow button: For non-own profiles

Profile Stats Grid

Displays a 2x2 grid of key metrics:

Reputation System

Sovran uses the Sovran API to fetch reputation scores:

useNostrProfile Hook

Reputation Score Calculation

The API computes reputation based on:
  • Follower count: Number of followers
  • Follower quality: Weighted by follower reputation
  • Network position: Centrality in follow graph
  • Content engagement: Likes, replies, reposts
  • Account age: Older accounts score higher
The exact algorithm is proprietary but follows standard social graph analysis.

Top Followers

Displays the 6 most influential followers:

Helper Functions

Follow/Unfollow

Following is implemented via NIP-02 contact lists (kind 3):

Building Updated Contact Tags

Optimistic Updates

Follow/unfollow uses optimistic UI updates:

Profile Info Section

Displays copyable/clickable profile fields:

QR Code Sharing

Profiles can be shared via QR code:
The share screen displays:
  • QR code: Encoded npub or nprofile
  • Lightning address: If available
  • Profile card: Name, picture, NIP-05
  • Share button: Export to system share sheet

User Feed

Profiles include a feed of recent notes (kind 1 events):
The feed includes:
  • Text notes: Standard short-form posts
  • Replies: Threaded conversations
  • Reposts: Quoted or boosted notes
  • Reactions: Likes and custom emoji reactions
Video posts are used to populate the Stories feature.

Best Practices

Identity & Keys

NIP-06 key derivation for profile signing

Contacts

Contact lists and follow management

Direct Messages

Send DMs from profile screen

Lightning Address

Claim Lightning addresses for your profile