The Stellar Lab is an interactive toolkit for exploring the Stellar network. It helps developers and builders experiment with building, signing, simulating, and submitting transactions, as well as making requests to both RPC and Horizon APIs. With built-in tools for saving and sharing transactions, converting between XDR and JSON, and exploring smart contracts on Stellar, the Stellar Lab is ideal for testing, learning, and exploring on Stellar.
The main
branch is deployed to
https://lab.stellar.org/. On the landing page at the
bottom right, you can reference a commit hash of the web app version you're
viewing.
- Next.js framework (React)
- TypeScript
- Stellar Design System for UI
- Sass for CSS styling
- TanStack (React) Query for API queries
- Zustand for state management
- Playwright for e2e tests
- Yarn Classic (v1)
yarn dev
Testing hardware wallets requires an HTTPS connection to enable U2F. The
recommended way to do this is with ngrok
. Once
downloaded and authenticated, start ngrok, and tell the Lab to start with a
public URL.
./ngrok http 3000
# in a separate terminal
# the subdomain will appear in ngrok's output
yarn start --public randomsubdomain.ngrok.io
yarn build
The app will be built into the build
directory in Next.js' standalone output
format.
To run production build locally this command can be used conveniently:
yarn start
To distribute and deploy the production build you need to copy the
build/static
directory to the build/standalone/public/_next/static
location, and then the files and directories inside the build/standalone
directory are the only files needed for production and can be distributed to
the deployment location.
In the deployment location the following command will run the app:
node server.js
To improve Lab, we use Amplitude and Google Analytics tracking in production.
If you are running your version of Lab (for Quickstart, for example), you can disable the Google Analytics by setting this env
variable:
NEXT_PUBLIC_DISABLE_GOOGLE_ANALYTICS=true
No need to disable Amplitude as it runs only on lab.stellar.org
.