A decentralized social publishing protocol built on Sui blockchain, powered by Walrus permanent storage and Tatum enterprise-grade RPC infrastructure.
BlobCast is a decentralized social publishing protocol that enables users to publish content permanently, verifiably, and censorship-resistant on the Sui blockchain.
Unlike traditional social media platforms that store content on centralized servers, BlobCast uses a hybrid architecture:
- Walrus for storing content (text, images, video) in a decentralized and permanent manner
- Sui blockchain for verifying content ownership and authenticity
- Tatum RPC as an enterprise-grade gateway to the Sui network
- PostgreSQL + Redis for fast feed performance and indexing
Every post you create belongs to you forever β stored on Walrus, verified on Sui, and cannot be deleted by anyone.
Walrus is a decentralized blob storage built on top of Sui. BlobCast chose Walrus for the following reasons:
| Reason | Explanation |
|---|---|
| Permanence | Content is encoded with Reed-Solomon erasure coding (120-shard distribution), ensuring data is stored permanently and fault-tolerantly |
| Censorship Resistance | No single entity can delete or censor stored content |
| Cost Efficiency | Blob storage costs are significantly lower compared to storing data directly on-chain in Sui |
| Sui Native | Walrus integrates natively with the Sui ecosystem β blob IDs and hashes can be referenced directly in Move smart contracts |
| Content Integrity | Every blob has a verifiable SHA-256 hash to ensure content has not been tampered with |
BlobCast stores all heavy content to Walrus:
- π Post content β post text serialized to a JSON blob
- πΌοΈ Media images β images attached to posts
- π¬ Videos β video content from posts
- π€ Avatar & Profile Banner β user profile photos and banners
- π¬ Comments β each comment has its own Walrus blob ID
- ποΈ Thread Archives β archives of long discussion threads
Each entity above generates a Walrus Blob ID which is then stored as a reference in the Sui smart contract and PostgreSQL database.
Example post blob structure:
{
"author": "0x91ab3f...",
"content": "Hello decentralized world!",
"media": [
{ "type": "image", "blob": "walrus://8x7as..." }
],
"timestamp": 1748500000
}Tatum provides enterprise-grade RPC infrastructure for accessing the Sui blockchain. BlobCast chose Tatum for the following reasons:
| Reason | Explanation |
|---|---|
| High Availability | Tatum runs dedicated Sui nodes with high uptime, avoiding rate-limiting from public endpoints |
| Performance | Lower latency compared to public Sui RPC for production workloads |
| Reliability | If Tatum goes down, the server automatically falls back to Sui public gateways β no single point of failure |
| Testnet & Mainnet | Support for both networks with a single API key, simplifying development and deployment |
| API Key Auth | Secure authenticated access to prevent abuse |
Tatum is used as an RPC gateway for:
- Blockchain Indexer β reading checkpoints and events from Sui
- Wallet Authentication β verifying transaction signatures
- On-chain Registration β writing blob references and ownership to Sui smart contracts
ββββββββββββββββββββββββββββββββββββ
β Frontend (Next.js) β
β Feed Β· Posts Β· Profiles β
β Wallet Connect Β· Search β
ββββββββββββββββ¬ββββββββββββββββββββ
β REST API
βΌ
ββββββββββββββββββββββββββββββββββββ
β Backend API (Express) β
β Auth Β· Posts Β· Users Β· Feed β
βββββββββ¬βββββββββββββ¬ββββββββββββββ
β β
βΌ βΌ
ββββββββββββββ ββββββββββββββββββββ
β Walrus β β Tatum Sui RPC β
β Blob Store β β (Testnet/Main) β
ββββββββββββββ ββββββββββββββββββββ
β β
βΌ βΌ
ββββββββββββββββββββββββββββββββββ
β Sui Blockchain β
β Ownership Β· Hash Β· Events β
ββββββββββββββββββββββββββββββββββ
β
βΌ
ββββββββββββββββββββββββββββββββββββ
β BlobCast Indexer Daemon β
β Listens to Sui Events via Tatum β
ββββββββββββ¬ββββββββββββββββββββββββ
β
ββββββββ΄βββββββ
βΌ βΌ
ββββββββββ ββββββββββββ
β Prisma β β Redis β
β ORM β β Cache β
ββββββββββ ββββββββββββ
β
βΌ
βββββββββββββββ
β Supabase β
β (PostgreSQL)β
βββββββββββββββ
| Technology | Version | Purpose |
|---|---|---|
| Next.js | 16 | Frontend framework (App Router) |
| React | 19 | UI rendering |
| Tailwind CSS | 4 | Styling |
| Framer Motion | 12 | Animations & transitions |
@mysten/dapp-kit |
1.0 | Sui wallet integration |
@mysten/sui |
2.17 | Sui SDK (transactions, objects) |
| TanStack Query | 5 | Server state & data fetching |
| Zustand | β | Client state management |
| Recharts | 3 | Analytics charts |
| Radix UI | β | Accessible UI components |
| Lucide React | β | Icon library |
| Technology | Version | Purpose |
|---|---|---|
| Node.js | 20 | Runtime |
| Express | 4 | REST API framework |
| Prisma | 7 | ORM & database migrations |
| PostgreSQL | β | Primary database (via Supabase) |
| Redis (ioredis) | 5 | Feed caching & trending engine |
| TypeScript | 5 | Type safety |
| Technology | Purpose |
|---|---|
| Sui | Ownership verification, smart contracts |
| Walrus | Decentralized blob storage |
| Tatum | Enterprise Sui RPC gateway |
| Move | Smart contract language |
| Layer | Platform |
|---|---|
| Frontend | Vercel |
| Backend API | Fly.io |
| Database | Supabase (PostgreSQL) |
| Cache | Upstash (Redis) |
| Storage | Walrus (Decentralized) |
| RPC | Tatum Infrastructure |
BlobCast/
βββ π client/ # Frontend Next.js App
β βββ src/
β β βββ app/ # Next.js App Router pages
β β β βββ page.tsx # Landing / Home page
β β β βββ layout.tsx # Root layout
β β β βββ feed/ # Social feed
β β β βββ posts/[id]/ # Post detail page
β β β βββ profile/ # User profiles
β β β βββ explore/ # Explore & trending
β β β βββ search/ # Semantic search
β β β βββ bookmarks/ # Saved posts
β β β βββ messages/ # Direct messages
β β β βββ wallet/ # Wallet dashboard
β β β βββ login/ # Login page
β β β βββ register/ # Registration
β β βββ components/ # Reusable UI components
β β βββ hooks/ # Custom React hooks
β β βββ lib/ # Client-side utilities
β βββ prisma/ # Client-side Prisma schema
β βββ .env # Client environment variables
β βββ package.json
β
βββ π server/ # Backend Express API
β βββ src/
β β βββ server.ts # Entry point
β β βββ app.ts # Express app setup
β β βββ indexer.ts # π΄ Sui blockchain indexer daemon
β β βββ controllers/
β β β βββ authController.ts # Wallet authentication
β β β βββ postController.ts # Posts CRUD & interactions
β β β βββ userController.ts # User profiles
β β βββ routes/
β β β βββ authRoutes.ts # POST /auth/*
β β β βββ postRoutes.ts # GET/POST /posts/*
β β β βββ userRoutes.ts # GET/PUT /users/*
β β βββ lib/
β β β βββ tatum.ts # π΅ Tatum RPC client
β β β βββ redis.ts # Redis / in-memory cache
β β β βββ db.ts # Prisma client singleton
β β β βββ auth.ts # JWT utilities
β β βββ middleware/ # Express middlewares
β β βββ utils/ # Helper utilities
β β βββ types/ # TypeScript type definitions
β βββ prisma/ # Prisma schema & migrations
β βββ .env.example # π Environment template
β βββ package.json
β
βββ π move/ # Sui Move Smart Contracts
β βββ Move.toml # Package configuration
β βββ sources/
β βββ profile.move # User identity & avatars
β βββ post.move # Post ownership & Walrus refs
β βββ interaction.move # Likes, reposts, follows
β βββ tipping.move # SUI creator tipping
β βββ events.move # On-chain event definitions
β
βββ π docs/ # Technical documentation
βββ architecture_diagram.md # System architecture & mermaid diagrams
βββ database_schema.md # PostgreSQL schema & Redis cache design
βββ smart_contracts.md # Sui Move contract modules API reference
βββ api_documentation.md # Express gateway endpoints & payloads
βββ deployment_guide.md # End-to-end production deployment guide
βββ docs_old/ # Deprecated legacy documentation
BlobCast is accompanied by standard-setting production documentation compiled by Web3 Solutions Architects. Read the specialized manuals to understand specific layers in detail:
- πΊοΈ System Architecture Diagram β Architectural diagrams, lifecycle sequence workflows (Post Creation, E2E Encrypted DMs), and failover fail-soft high-availability guides.
- ποΈ Database Schema Design β Complete Entity-Relationship (ER) model diagram, Prisma PostgreSQL database tables, and key-value Redis caching schemas.
- π Sui Move Smart Contracts β Full specification of the smart contracts residing in
/move, including module breakdowns, structs, core entry function APIs, and event telemetries. - π Backend Gateway API β Comprehensive REST API documentation, passwordless cryptographic challenge-response authentication login guides, request-response payload specs, and simulator gateways.
- π End-to-End Deployment Guide β Step-by-step production runbooks to publish Move contracts to Sui Testnet/Mainnet, deploy the Express indexer service to Railway/Fly.io, and launch the Next.js client on Vercel.
1. User submits a post (text + media)
β
βΌ
2. Frontend uploads media β Walrus
β Receives walrus_blob_id + blob_hash
β
βΌ
3. Backend POST /posts
β Saves walrus_blob_id, blob_hash to Supabase
β
βΌ
4. Smart Contract (Move) called via Sui SDK
β Registers post ownership on-chain
β Emits PostCreated event
β
βΌ
5. BlobCast Indexer (via Tatum RPC) detects event
β Syncs to PostgreSQL
β Updates Redis trending cache
β Emits real-time feed update
BlobCast's contracts on Sui are designed to be lightweight β storing only minimal references:
| Module | Function |
|---|---|
profile.move |
User identity, username, avatar blob ID |
post.move |
Post ownership, Walrus blob reference, timestamps |
interaction.move |
Like, repost, follow |
tipping.move |
Direct SUI transfer to creator |
events.move |
Event definitions for the indexer |
Heavy content (text, images, video) is never stored on-chain β everything lives on Walrus.
- Node.js 20+
- pnpm / npm
- Sui CLI (for deploying smart contracts)
- Tatum account for API key
- Supabase project (PostgreSQL)
- Redis (local or Upstash)
git clone https://github.com/yuriya-dev/BlobCast.git
cd BlobCastcd server
# Copy and fill in environment variables
cp .env.example .env
# Install dependencies
npm install
# Run database migrations
npx prisma migrate dev
# (Optional) Seed initial data
npm run seed
# Start development server
npm run devBackend will run at http://localhost:8080
cd client
# Install dependencies
npm install
# Start development server
npm run devFrontend will run at http://localhost:3000
cd move
# Deploy to Sui Testnet
sui client publish --gas-budget 100000000# =========================================================================
# BlobCast β Server Environment Configurations Example
# =========================================================================
# --- 1. Server Settings ---
# Port that the Express API server will listen on
PORT=8080
# Node runtime mode: 'development' or 'production' (development shows stack traces)
NODE_ENV=development
# --- 2. Supabase Database Connection (PostgreSQL) ---
# Format: postgresql://[user]:[password]@[host]:[port]/[database]?schema=public
DATABASE_URL="postgresql://postgres:[password]@[host].supabase.co:5432/postgres?schema=public"
# --- 3. Redis Cache Configuration ---
# Connection string for Upstash or local Redis instance
REDIS_URL="redis://localhost:6379"
# --- 4. Tatum Sui RPC Infrastructure gateways ---
# Custom Tatum gateway endpoints for Sui Testnet and Mainnet
# If left blank, the Tatum client automatically falls back to Sui public gateways
TATUM_SUI_TESTNET_RPC="https://sui-testnet.node.tatum.io"
TATUM_SUI_MAINNET_RPC="https://sui-mainnet.node.tatum.io"
TATUM_API_KEY="ISI_DENGAN_TATUM_API_KEY_ANDA"
SPONSOR_PRIVATE_KEY="suikey1..."
# --- 5. Gemini AI Moderation ---
# Get a key from https://aistudio.google.com/apikey
GEMINI_API_KEY=""
# Optional model override (default: gemini-2.0-flash)
# GEMINI_MODEL="gemini-2.0-flash"π‘ Tip: If
REDIS_URLis left empty, the server uses a built-in in-memory cache simulator β ideal for development without Redis. IfTATUM_API_KEYis left empty, the indexer automatically falls back to public Sui RPC endpoints.
# =========================================================================
# BlobCast β Frontend Client Environment Configurations Example
# =========================================================================
# --- 1. API Backend Url ---
# URL of the Express API backend server
NEXT_PUBLIC_API_URL="http://localhost:8080/api"
# --- 2. Sui Blockchain Configuration ---
# Deployed Move contract package ID on Sui Testnet/Mainnet
NEXT_PUBLIC_BLOBCAST_PACKAGE_ID=""
# --- 3. Active Sui network: 'testnet' or 'mainnet' ---
NEXT_PUBLIC_SUI_NETWORK="testnet"
# --- 4. Walrus Gateway Configuration ---
# Public Walrus publisher and aggregator endpoints
NEXT_PUBLIC_WALRUS_PUBLISHER_URL="https://publisher.walrus-testnet.walrus.space"
NEXT_PUBLIC_WALRUS_AGGREGATOR_URL="https://aggregator.walrus-testnet.walrus.space"| Method | Endpoint | Description |
|---|---|---|
POST |
/auth/login |
Login with wallet signature |
POST |
/auth/logout |
Logout & invalidate session |
| Method | Endpoint | Description |
|---|---|---|
GET |
/posts |
Fetch all posts (paginated) |
GET |
/posts/:id |
Fetch single post by ID |
POST |
/posts |
Create new post (auth required) |
POST |
/posts/:id/like |
Toggle like on post |
POST |
/posts/:id/repost |
Toggle repost |
POST |
/posts/:id/comments |
Add comment (Walrus blob) |
GET |
/posts/notifications |
Fetch latest indexer notifications |
| Method | Endpoint | Description |
|---|---|---|
GET |
/users/:id |
Fetch user profile |
PUT |
/users/:id |
Update profile |
GET |
/users/:id/posts |
Fetch user's posts |
POST |
/users/:id/follow |
Follow/unfollow user |
GET |
/users/:id/followers |
Fetch followers list |
- π Wallet-native Authentication β Login with only a Sui wallet, no password required
- π Permanent Posts β Every post is stored permanently on Walrus
- β On-chain Authorship β Content ownership verified on the Sui blockchain
- π‘ Real-time Indexer β Daemon that listens to Sui events via Tatum RPC
- π₯ Trending Engine β Redis-powered trending hashtags and post scoring
- π Social Interactions β Like, repost, comment, follow
- π° SUI Tipping β Tip creators directly with SUI coin
- π Bookmarks β Save favorite posts
- π Search β Search posts, hashtags, and users
- π‘οΈ AI Moderation β Flagged content is hidden in the UI; blobs remain immutable
MIT License β see the LICENSE file for details.
BlobCast β Own your posts forever.