Skip to content
anew
10 · Documentation

Operations

Configuration, deploys, launch day, monitoring, and every manual step.

Running Anew means running one Next.js site. The operator deploys no contract, funds no wallet, keeps no database and watches no queue. The work is configuration, deploys, launch day and a look at the rails now and then.

Configuration

Variable Read by Purpose
NEXT_PUBLIC_PRIVY_APP_ID the browser The Privy App ID for wallet sign-in. Public. Without it, wallet sign-in stays off.
ONECLICK_JWT the server only Optional 1Click partner key, sent as a bearer token. Without it, 1Click adds its own app fee to each quote: 20 bps on 2026-09-23, and it has changed before.
ANEW_FEE_RECIPIENT the server only The account that receives Anew's app fee. Empty today.
ANEW_FEE_BPS the server only Anew's fee in basis points. The code caps it at 200 and ignores it while the recipient is empty. Planned value: 50.
NEXT_PUBLIC_ANEW_TOKEN the browser The $ANEW address, set on launch day. Empty means Launching soon.
NEXT_PUBLIC_X_URL, NEXT_PUBLIC_X_HANDLE the browser The X account in the footer.
NEXT_PUBLIC_SITE_URL the browser The site's own URL.

Next.js compiles each NEXT_PUBLIC_* value into the pages at build time, so a change to one takes a new build. The three server-only values stay out of the browser bundle.

Run it on your machine

At the time of writing, Anew runs this way.

cd web
npm install
npm run dev

Put the variables in web/.env.local. For a production build, run npm run build and then npm start.

Deploy on Vercel

cd web
vercel link
vercel env add NEXT_PUBLIC_PRIVY_APP_ID production
vercel env add ONECLICK_JWT production      # optional
vercel --prod

Add the other variables the same way when you need them. A change to any of them on Vercel takes effect with the next deploy.

Launch day (planned)

  1. Create $ANEW on Robinhood Chain.
  2. Set NEXT_PUBLIC_ANEW_TOKEN to the token's address.
  3. Set ANEW_FEE_RECIPIENT and ANEW_FEE_BPS if the fee should go live.
  4. Redeploy.
  5. Check the Stats page (the $ANEW tile and the fee tile) and the Start page (a quote comes back and the recipient line confirms the address).

Monitoring

  • GET /api/rails: direct.ok shows whether the direct rail quotes, fallback.ok whether the fallback price exists, and fee.bps the fee this deployment charges.
  • The Stats page shows the same data, plus the chain's head block and gas price read from the RPC in your browser.
  • The home calculator runs a dry quote for any amount you type.
  • The hosting platform's request logs show errors from the API routes.

The server holds no queue, no balance and no key, so none of those needs watching.

Manual steps

Need Action
Rotate the 1Click partner key replace ONECLICK_JWT, redeploy
Turn Anew's fee on, or change it set ANEW_FEE_RECIPIENT and ANEW_FEE_BPS (at most 200), redeploy
Turn the fee off clear ANEW_FEE_RECIPIENT, redeploy
Publish the token address set NEXT_PUBLIC_ANEW_TOKEN, redeploy
A visitor reports a stuck trip ask for the deposit address in a private message; read the 1Click status and the NEAR Intents explorer; Anew has no order records to search
The direct rail stops quoting nothing to switch, since the site already shows it; post a note on X

Backups

The server keeps nothing that needs a backup. Each visitor backs up their own keys through the backup file, and the only copies of orders sit in visitors' browsers.