The Backend is responsible for collecting (aggregators) and organizing (indexer) data from various sources, known as homeservers.

Pubky App backend architecture showing aggregators collecting data from homeservers, indexers normalizing data, and web servers providing API access

Imagine you’re trying to find a specific document in a large library. The backend is like a librarian who searches through the shelves, finds the right documents, and prepares them for you to use. This ensures that the data is accurate, up-to-date, and in a format that’s easy to work with.

Main components

  • Aggregators execute a data retrieval protocol to obtain data from data storage, initiating a process that retrieves and collects data from various sources.
  • Indexers receive aggregated data from the Aggregators and initiate a rigorous data normalization process, transforming and converting the data into a standardized format to ensure consistency and accuracy.
  • Web servers provide the requested data to Pubky client

Production Implementation

Pubky Nexus is the production-grade implementation of this backend architecture, powering Pubky App’s social features with real-time aggregation, high-performance indexing, and a comprehensive REST API.