A demonstration application for the PubKey Protocol, the social layer on Solana.
The protocol allows users to link verified accounts from multiple identity providers to their profile on Solana.
This demo is a working implementation of PubKey Protocol (currently) on Solana Devnet. It allows users to:
- Create a Profile using a Solana wallet
- Link accounts from multiple identity providers (Discord, GitHub, Google, X/Twitter)
- Connect additional Solana wallets
- Set an avatar, display name, and bio
- Node.js (v20 or later)
- pnpm (v9 or later)
- Docker and Docker Compose (for local development with Postgres)
- Solana CLI tools
- Run
pnpm anchor localnetin the PubKey Protocol repo.
git clone https://github.com/pubkeyapp/pubkey-protocol-demo.git
cd pubkey-protocol-demopnpm installCopy the example environment file and update it with your settings:
cp .env.example .envRequired environment variables:
COOKIE_SECRET: Generate a random secret usingopenssl rand -hex 32DATABASE_URL: Postgres connection string (default:postgresql://pubkey-protocol-demo:pubkey-protocol-demo@localhost:5432/pubkey-protocol-demo?schema=public)DOMAIN: Server domain (uselocalhostfor local development)PORT: Server port (default: 3000)SOLANA_FEE_PAYER_AUTHORITY: Fee payer authority keypair (generate usingsolana-keygen)SOLANA_FEE_PAYER_COMMUNITY: Fee payer community keypair (generate usingsolana-keygen)SOLANA_RPC_ENDPOINT: Solana blockchain RPC endpoint (usehttp://localhost:8899for local development)
pnpm dev:servicesThis will start a Postgres database using Docker Compose.
pnpm setupMake sure you are running the PubKey Protocol localnet.
pnpm devThe application will be available at http://localhost:5173.
To build the application for production:
pnpm buildTo start the production server:
pnpm startYou can build and run the application using Docker:
# Build the Docker image
pnpm docker:build
# Run the Docker container
pnpm docker:runFor local development with Solana, you can run a test validator:
pnpm validatorapp/: Main application codeapi/: API endpointsfeatures/: Feature-specific components and logiclib/: Utility functions and shared codepubkey/: PubKey protocol integrationui/: UI components
prisma/: Database schema and migrations
See LICENSE file for details.