Skip to content

pubkeyapp/pubkey-protocol

Repository files navigation

PubKey Protocol (PPL)

This is a work in progress.

PubKey Protocol is the social layer on Solana. It allows users to create and manage a profiles and verify their Social or Solana identities. The identities are verified by the communities in the network.

For more information join our Discord or reach out to @PubKeyApp on X.

Glossary

The following terms are used throughout the documentation and code:

Community

A Community is an account that represents a team or project that creates Profiles and verifies their Identities.

Profile

A Profile is an account that represents a user and their verified Identities.

Identity

An Identity is a Social or Solana identity that is verified by one or more Communities.

IdentityProvider

An IdentityProvider represents the origin of an Identity.

IdentityProviderId

An IdentityProviderId is the unique remote identifier for an IdentityProvider.

Pointer

A Pointer is an account that maps an Identity to a Profile based on the IdentityProvider and IdentityProviderId.

Identity Providers

The following identity providers are supported or in active development:

  • Discord
  • Github
  • Google
  • Solana
  • Twitter
  • X

The following identity providers are planned or need investigation:

  • Farcaster
  • Telegram

Architecture

The following diagram shows the relationships between the different entities in PubKey Protocol:

erDiagram
    Community ||--o{ Profile : "Creates"
    Community ||--o{ Identity : "Verifies"
    Profile ||--o{ Identity : "Has verified"
    Pointer ||--o{ Profile : "Points to"
    Pointer |o--|| Identity : "Points from"

    Community {
        string slug
        IdentityProvider[] providers
    }

    Identity {
        string IdentityProvider
        string IdentityProviderId
        string name
        Community[] communties
    }

    Pointer {
        string IdentityProvider
        string IdentityProviderId
    }

    Profile {
        string username
        string[] authorities
        Identity[] identities
    }
Loading

Getting Started

Prerequisites

Tip

If you don't have PNPM installed, you can install it using corepack:

corepack enable
corepack prepare pnpm@latest --activate

Installation

  1. Clone the repository:
git clone https://github.com/pubkeyapp/pubkey-protocol
cd pubkey-protocol
pnpm install

Development

Start web app

pnpm dev:web

Build

Build web app

pnpm build:web

Build the Anchor program

pnpm build:anchor

Lint

Lint all projects

pnpm lint

Test

Test all projects

pnpm test

To iterate on the anchor program using a local validator, this is the recommended workflow:

Open this in one terminal:

pnpm anchor localnet

And this in another:

pnpm anchor test --skip-deploy --skip-local-validator

License

MIT