Skip to content
IQCoreTeamPublic

About

iqchan-website

Resources

Stars

2 stars

Watchers

0 watching

Forks

Repository files navigation

BlockChan

A fully decentralized imageboard built on Solana. All posts, threads, and boards are stored permanently on-chain using the IQ Labs SDK. No servers hold your data — just Solana transactions and a read-only gateway cache.

Live: blockchan.sol.site

How It Works

  • Posts are Solana transactions written to on-chain IQDB tables
  • Reads go through an IQ Gateway (HTTP cache layer)
  • Writes go directly to Solana RPC via wallet (Phantom, Backpack, etc.)
  • Frontend is a static Next.js app — can be hosted anywhere or deployed permanently on-chain

The gateway is optional. Anyone can run their own. If all gateways go down, the data is still on Solana and recoverable by spinning up a new gateway.

Prerequisites

  • Node.js 18+
  • npm
  • A Solana wallet browser extension (Phantom, Backpack, Solflare, etc.)

Quick Start

git clone https://github.com/IQCoreTeam/iq-chan.git
cd iq-chan
npm install
cp .env.example .env
npm run dev

Open http://localhost:3000. Connect your wallet and start posting.

Configuration

Variable Required Default Description
NEXT_PUBLIC_RPC_ENDPOINT No https://api.mainnet-beta.solana.com Solana RPC for wallet operations and writes; override with your own endpoint. No automatic RPC failover

Gateway URLs are set in src/lib/config.ts and can be overridden at runtime in your browser console:

localStorage.setItem("blockchan_gateway", "http://localhost:3000");

The default primary gateway is https://gateway.iqlabs.dev. Override it at build time with NEXT_PUBLIC_GATEWAY_URL.

The fallback list is defined by GATEWAY_FALLBACKS in src/lib/config.ts and can be overridden with the blockchan_fallbacks localStorage key (a JSON array of URLs). The frontend tries the configured fallback list when a gateway is unavailable. The restored https://gateway.solanainternet.com is included for Solana reads; the retired Akash ingress has been removed; EVM requests skip it because that deployment is Solana-only. Existing saved fallback lists remain unchanged; use Settings to reset to the defaults or add it manually. This is a read gateway, not a Solana JSON-RPC endpoint.

Deployment

IQ Git Pages (Solana)

Build a static frontend with relative JavaScript/CSS URLs, so IQ Pages can serve it beneath a repository path. The export includes iqpages.json pointing to index.html. Publish only the contents of out/, never this source checkout.

STATIC_EXPORT=1 NEXT_PUBLIC_NETWORK=solana npm run build
cd out
# The following commands spend SOL; review the build and budget first.
iqgit init
iqgit create blockchan --public
iqgit add .
iqgit commit -m "Publish BlockChan"
iqgit push
iqgit pages deploy

Retain the output checkout's .iqgit state for updates. After rebuilding, sync the new export into that checkout without removing .iqgit, then add, commit, and push. Pages follows the repository's latest commit; do not run pages deploy again for an already registered repository. Upload and transaction fees still apply to updates. Historical IQBrowser manifests use the separate workflow below.

On-Chain via Iqoogle (Solana Permanent Web)

Host the entire site on Solana. Served via any IQ Gateway at /site/{manifestSig}.

  1. Clone and install Iqoogle (the IQ app publisher)
  2. Build a static export:
STATIC_EXPORT=1 npm run build
  1. Create out/iqbrowser.json:
{
  "name": "blockchan",
  "version": "2.1.0",
  "description": "On-chain imageboard on Solana",
  "root": "iqchan",
  "runtime": "static",
  "start": ""
}
  1. Publish (needs a funded Solana wallet):
cd out
npx tsx /path/to/Iqoogle/src/iqbrowser/index.ts publish

Arweave (Permanent)

The site lives on Arweave forever, served through any Arweave gateway.

npm i -g arkb
STATIC_EXPORT=1 npm run build
arkb deploy out/ --wallet /path/to/arweave-wallet.json --auto-confirm

Access at https://arweave.net/{manifestId}.

Static Export (Any Host)

STATIC_EXPORT=1 npm run build

Output in out/. Upload to any static host, CDN, or IPFS.

Standard Next.js

npm run build
npm start

Works on Vercel, Railway, or any Node.js host.

Running Your Own Gateway

The frontend needs at least one IQ Gateway for reads. Run your own:

git clone https://github.com/IQCoreTeam/iq-gateway.git
cd iq-gateway
bun install
cp .env.example .env
bun run dev

Then point BlockChan at it:

localStorage.setItem("blockchan_gateway", "http://localhost:3000");

See the gateway repo for Docker, Akash, and production deployment.

Architecture

Browser (Next.js static app)
    |
    ├── Reads → IQ Gateway (cache) → Solana RPC → On-chain data
    |
    └── Writes → Solana RPC (via wallet) → IQ Labs Contract
  • All data lives in IQDB tables on Solana
  • Gateway is a stateless read cache (memory → disk → chain)
  • Multiple gateways can serve the same data independently
  • No backend server — the gateway is replaceable

Stack

  • Next.js 15 / React 19 / TypeScript
  • IQ Labs SDK
  • Solana Wallet Adapter

Links

About

iqchan-website

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages