Skip to content
SineraDocs

Run the portal locally

Run the ATP Developer Portal on your machine, with live testnet data or sample records, and configure it with environment variables.

You can run your own copy of the Developer Portal for development. It is a Next.js application. The hosted portal is at atp.sinera.io.

Implementation candidate

Requirements

  • Node.js 22
  • pnpm

Run it

pnpm install
pnpm dev            # http://localhost:3000

By default the portal reads the BSC Testnet deployment over RPC. To run on example records with no network:

ATP_LEDGER=sample pnpm dev

The portal shows a "Sample data" badge in that mode.

Configure it

Copy .env.example to .env.local and adjust.

VariableMeaningDefault
ATP_LEDGERchain reads the network. sample uses example recordschain
ATP_BSC_TESTNET_RPC_URLJSON-RPC endpoint for BSC Testnet, used server side onlyA public endpoint
ATP_SEND_NETWORKSComma-separated network ids where the portal may ask a wallet to send, for example bsc-testnet. Read per page request, so a restart applies itUnset: sending is off everywhere
ATP_API_UNITS_PER_MINUTERequest budget per client per minute60
ATP_API_BURST_UNITSBudget a client may spend at once40
ATP_API_MAX_IN_FLIGHTRequests allowed to run at the same time8
ATP_TRUSTED_PROXY_HOPSNumber of reverse proxies in front of the app. Set it when you run behind a proxy or CDN0
NEXT_PUBLIC_PRIVY_APP_IDSign-in application id for Sinera accountsUnset
NEXT_PUBLIC_SINERA_API_BASE_URLBase URL of the Sinera APIUnset
NEXT_PUBLIC_ATP_EXPLORER_URLAddress of the public ATP Explorer. When set, Lookup links to the explorer. Read at build timeUnset
NODE_USE_ENV_PROXY, NODE_EXTRA_CA_CERTSNeeded only when the server reaches the internet through an HTTPS proxyUnset

The three ATP_API_* limits apply per server process, and a request costs 1 to 8 units. With ATP_TRUSTED_PROXY_HOPS at 0, the client address header is ignored, because anyone can write it. The app then cannot tell clients apart.

Sending and signing

With ATP_SEND_NETWORKS unset, the portal still prepares and simulates transactions and lets you export them. See Create an Atom. The portal never asks for, accepts or stores a private key or seed phrase, and its server never signs or broadcasts a transaction.

Sinera account sign-in

Account sign-in is enabled only when both NEXT_PUBLIC_PRIVY_APP_ID and NEXT_PUBLIC_SINERA_API_BASE_URL are set. Without them the portal works with wallets only and says that account sign-in is not configured. For account sign-in to work, the portal's web origin must also be allowed by the Sinera API and by the sign-in provider. To get access for a deployment, contact info@sinera.io.

Networks

The header switch selects the network for every page. BSC Testnet is deployed. BSC Mainnet and Solana are listed as not deployed until a deployment is recorded, and nothing can be created on a network that is not deployed.

Checks

pnpm typecheck
pnpm lint
pnpm build