Beaver Social is a Web3 Social Network Layer built on the Sui Blockchain. It's designed as a headless logic layer that provides developers with the tools to create customized social network UI clients.
The platform consists of several modular components that work together to deliver a complete social networking experience with blockchain integration, enabling developers to focus on creating unique user experiences while leveraging our robust social infrastructure.
- Blockchain Authentication: Secure Web3 authentication using wallet connections
- Social Graph: Complete social network functionality (profiles, follows, posts, likes, etc.)
- On-chain Verification: Critical data secured and verified by the Sui blockchain
- Developer-Friendly: Multiple integration options from SDKs to direct API access
- Customizable: Build your own UI while leveraging our social backend
- Modular: Use only the components you need for your specific use case
- Scalable: Infrastructure designed to handle millions of users and interactions
The platform follows a layered architecture pattern with the following levels:
- Level 0: API Layer - The fundamental server API that can be consumed directly or through the Client SDK
- Level 1: Beaver Client SDK - A TypeScript SDK that provides a simplified interface to the API
- Level 2: Beaver React SDK - A React-specific SDK built on top of the Client SDK
- Level 3: UI Clients - Custom applications built using the provided SDKs
┌───────────────────────────────────────────────────────────────┐
│ Level 3: UI Clients │
│ (Mobile App, Web App, or Custom Applications) │
└───────────────┬───────────────────────────────────────────────┘
│
┌───────────────▼───────────────────────────────────────────────┐
│ Level 2: Beaver React SDK │
│ (React-specific components and hooks) │
└───────────────┬───────────────────────────────────────────────┘
│
┌───────────────▼───────────────────────────────────────────────┐
│ Level 1: Beaver Client SDK │
│ (TypeScript SDK with modular features) │
└───────────────┬───────────────────────────────────────────────┘
│
┌───────────────▼───────────────────────────────────────────────┐
│ Level 0: API Layer │
│ (Server API with endpoints for social network functionality) │
└───────────────┬───────────────────────────────────────────────┘
│
┌───────────────▼───────────────────────────────────────────────┐
│ Sui Blockchain Integration │
│ (Move Smart Contracts) │
└───────────────────────────────────────────────────────────────┘
Smart contracts written in the Move programming language that interact with the Sui Blockchain.
The API backend service that powers the platform.
A TypeScript SDK for interacting with the Beaver Social API.
A React wrapper around the Beaver Client SDK.
A sample application that consume the Beaver React SDK to provide a complete social media experience.
To get the project running locally, follow these steps:
-
Clone the repository:
git clone https://github.com/beaver-social/beaver-social.git cd beaver-social -
Install dependencies:
This project uses Bun as a package manager.
bun install
-
Run the development server:
The main application is in the
packages/serverdirectory.cd packages/server bun run devThis will start the development server. You can now view the application in your browser.
You have multiple options for integrating Beaver Social:
- React SDK: The fastest way to build a React-based social application
- Client SDK: For any JavaScript-based application
- Direct API Integration: For custom implementations in any language
Install the SDK:
npm install @beaver-social/react @tanstack/react-queryWrap your application with the BeaverProvider:
// src/App.tsx
import React from "react";
import { BeaverProvider } from "@beaver-social/react";
import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
const queryClient = new QueryClient();
function App() {
return (
<QueryClientProvider client={queryClient}>
<BeaverProvider
config={{
network: "testnet",
apiBaseUrl: "https://beaversocial.xyz/api/v1",
debug: true,
appId: "your-app-id", // Get your AppID from the developer portal
}}
>
<YourApp />
</BeaverProvider>
</QueryClientProvider>
);
}For more detailed usage, please refer to the official documentation.