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:3000Without DATABASE_URL the app uses an embedded Postgres (PGlite) in ./data/pg. Same SQL as production; nothing else changes.
Environment variables#
| Name | Purpose |
|---|---|
SESSION_SECRET | 32+ random chars. Signs session cookies. |
MASTER_KEY | 32 random bytes, base64url. Wraps every content key. Back it up; losing it loses every product. |
TREASURY_WALLET | Receives the 5% fee. |
ADMIN_WALLETS | Comma-separated wallets allowed on /admin. |
NEXT_PUBLIC_RPC_URL | RPC used by browsers. Defaults to devnet. |
RPC_URL | Optional private RPC for server-side verification (e.g. Helius). |
DATABASE_URL | Neon Postgres. Blank = local PGlite. |
BLOB_READ_WRITE_TOKEN | Vercel Blob store for file ciphertext. |
GITHUB_API | Optional override of https://api.github.com (used by tests). |
| Launchpad | |
VAULT_WALLET | The vault: creator of every coin, signer of every fee round. Falls back to TREASURY_WALLET. |
VAULT_SECRET | The vault's secret key (base58 or a JSON byte array). Must match VAULT_WALLET. Back it up; keep SOL on it for gas. |
CRON_SECRET | Bearer token for /api/cron/fees. Vercel sends it on its cron; the GitHub workflow needs it as a repository secret. |
NEXT_PUBLIC_PAIR_MINT | EVYN's mint. Unset = SOL pairs only, no desk, studio locked. |
FEE_ROUND_MIN_LAMPORTS | Below this a launch's pot carries over. Default 5,000,000 (0.005 SOL). |
| Studio | |
ANTHROPIC_API_KEY | Claude API key for the five agents and the desk. Unset = both answer 503. |
NEXT_PUBLIC_AGENT_MIN_EVYN | Whole 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_SECRETFee 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_KEYTests#
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 includedThe 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#
npx vercel link, then add the Neon and Blob integrations from the Vercel Marketplace (they setDATABASE_URLandBLOB_READ_WRITE_TOKEN).- Set the remaining variables for Production. Generate a fresh
MASTER_KEYfor production and store a copy somewhere safe. npx vercel deploy --prod.- Point
NEXT_PUBLIC_RPC_URLat mainnet, and ideallyRPC_URLat a private provider; public RPCs rate-limit.
The Hobby plan forbids commercial use; a marketplace taking a fee belongs on Pro.