# Architecture

Relation Protocol is a open and decentralized social graph protocol, any developer can deploy contracts and build their own Dapp based on the Semantic SBTs specification. When using Dapp, users generate a large amount of behavioral data on blockchain, and the RDF data is standardized and machine-readable . Users have control and governance over their data and can control the scope of data sharing. At this point, everyone has jointly constructed a blockchain-native social graph data layer.

### Components

Relation Protocol consists of 4 parts:

<figure><img src="https://2101283974-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FYeYon1a8IZta2Zm96hF1%2Fuploads%2Fgit-blob-0803110a6e9687c64a357f9646af51747162ea06%2Fimage.png?alt=media" alt=""><figcaption><p>Figure 3-1 Relation Protocol</p></figcaption></figure>

**Schema Standard**

Schema Standard is the standard for social data storage in the Relation Protocol, which defines all social data formats built on the Relation protocol. Schema Standard defines the Base Schema of Relation Protocol, and all RDFs built on the Relation Protocol must conform to the data definition of the Base Schema. The Base Schema consists of several TTL files stored on Arweave and is managed and updated by the Relation DAO.

[Base Schema](schema-standard/schema-list)

**Contract Open Standard**

Contract Open Standard is the smart contract standard defined by the Relation Protocol, which includes the following two conventions:

* The contract needs to conform to the data format and interface specifications defined in the Open Standard API.
* The RDF data constructed by the contract needs to conform to the Schema Standard.

**Open Standard API**

Open Standard API is the API specification of the Relation Protocol. Developers can access the Relation Protocol by implementing the Open Standard API, which is the basis of the Contract Open Standard.

**Graph Indexer**

The Graph Indexer is the parser standard for indexing SBT data in the Relation Protocol, and anyone can deploy data monitoring services based on the Graph Indexer standard. Its main function is to assemble SBT data in Ethereum and Arweave and build a Social Graph that can be used by social applications in a graph database.

### Deployment

The contracts in the Relation protocol are deployed on the Ethereum network or L2. Social applications built on the Relation Protocol can deploy Semantic SBT contracts for specific scenarios or call contracts that have already been designed and deployed.

The Schema in the Relation Protocol consists of several TTL files stored on Arweave, which are used to constrain the RDF data specification of Semantic SBT contracts.

Privacy-based Semantic SBTs have unique schemas and storage methods, and the RDF data of privacy SBTs needs to be encrypted or decrypted using a privacy protocol (such as the [Lit Protocol](https://developer.litprotocol.com/)) before storage, and users manage and control the accessibility of RDF data.

<figure><img src="https://2101283974-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FYeYon1a8IZta2Zm96hF1%2Fuploads%2Fgit-blob-85cda2a6a0cecd819e9da9b00728354bb36847b4%2FHow-the-Relation-Protocol-works.png?alt=media" alt=""><figcaption><p>Figure 3-2 How the Relation Protocol works</p></figcaption></figure>
