Developers

Running it yourself

Local setup, environment variables, tests, deploying to Vercel.


Run locally#

git clone <repo> everynth && cd everynth
copy .env.example .env.local        # fill in the values below
npm install
npm run dev                          # http://localhost:3000

Without DATABASE_URL the app uses an embedded Postgres (PGlite) in ./data/pg. Same SQL as production; nothing else changes.

Environment variables#

NamePurpose
SESSION_SECRET32+ random chars. Signs session cookies.
MASTER_KEY32 random bytes, base64url. Wraps every content key. Back it up; losing it loses every product.
TREASURY_WALLETReceives the 5% fee.
ADMIN_WALLETSComma-separated wallets allowed on /admin.
NEXT_PUBLIC_RPC_URLRPC used by browsers. Defaults to devnet.
RPC_URLOptional private RPC for server-side verification (e.g. Helius).
DATABASE_URLNeon Postgres. Blank = local PGlite.
BLOB_READ_WRITE_TOKENVercel Blob store for file ciphertext.
GITHUB_APIOptional override of https://api.github.com (used by tests).
Launchpad
VAULT_WALLETThe vault: creator of every coin, signer of every fee round. Falls back to TREASURY_WALLET.
VAULT_SECRETThe vault's secret key (base58 or a JSON byte array). Must match VAULT_WALLET. Back it up; keep SOL on it for gas.
CRON_SECRETBearer token for /api/cron/fees. Vercel sends it on its cron; the GitHub workflow needs it as a repository secret.
NEXT_PUBLIC_PAIR_MINTEVYN's mint. Unset = SOL pairs only, no desk, studio locked.
FEE_ROUND_MIN_LAMPORTSBelow this a launch's pot carries over. Default 5,000,000 (0.005 SOL).
Studio
ANTHROPIC_API_KEYClaude API key for the five agents and the desk. Unset = both answer 503.
NEXT_PUBLIC_AGENT_MIN_EVYNWhole EVYN a wallet must hold. Default 0.5% of supply (5,000,000).
node -e "const {Keypair}=require('@solana/web3.js');const bs58=require('bs58');const k=Keypair.generate();console.log(k.publicKey.toBase58(), bs58.encode(k.secretKey))"   # VAULT_WALLET VAULT_SECRET

Fee rounds every 15 minutes: add FEES_URL (https://<your host>/api/cron/fees) and CRON_SECRET as repository secrets; .github/workflows/fees.yml does the rest. Vercel's Hobby plan only allows a daily cron, which vercel.json keeps as a backstop.

node -e "console.log(require('crypto').randomBytes(32).toString('base64url'))"   # SESSION_SECRET / MASTER_KEY

Tests#

npm test                                   # unit: auth, money, key wrap, encryption, payment verification

# full flow over HTTP with a stub RPC and a stub GitHub (nothing touches mainnet)
$env:RPC_URL="http://127.0.0.1:3199"; $env:GITHUB_API="http://127.0.0.1:3198"
$env:PGLITE_DIR="$env:TEMP\everynth-e2e"; $env:DATABASE_URL=" "
$env:ADMIN_WALLETS=(node scripts/e2e.mjs --admin-wallet)
npm run build; npx next start -p 3100     # terminal 1
node --env-file=.env.local scripts/e2e.mjs   # terminal 2 — every check, launchpad and studio included

The studio and the desk need ANTHROPIC_API_KEY to answer; the end-to-end suite only checks their gates, so it never spends tokens. The launchpad's chain path was run against devnet and then mainnet by hand; the scripts are in the repository's history.

Deploy to Vercel#

  1. npx vercel link, then add the Neon and Blob integrations from the Vercel Marketplace (they set DATABASE_URL and BLOB_READ_WRITE_TOKEN).
  2. Set the remaining variables for Production. Generate a fresh MASTER_KEY for production and store a copy somewhere safe.
  3. npx vercel deploy --prod.
  4. Point NEXT_PUBLIC_RPC_URL at mainnet, and ideally RPC_URL at a private provider; public RPCs rate-limit.

The Hobby plan forbids commercial use; a marketplace taking a fee belongs on Pro.