Skip to content

cardano-foundation/cardano-explorer-app

Repository files navigation

Cardano Explorer App

Tests code style: prettier

A React app with GraphQL client interfacing with Cardano GraphQL.

Environment Variables

See environment for defaults.

  • CARDANO_ERA
  • CARDANO_NETWORK
  • GRAPHQL_API_PROTOCOL
  • GRAPHQL_API_HOST
  • GRAPHQL_API_PORT
  • GRAPHQL_API_PATH
  • POLLING_INTERVAL
  • GA_TRACKING_ID
  • DEBUG

Build

This project uses an offline package cache to enable reproducible builds.

yarn

yarn --offline && yarn static:build

nix

nix-build -A cardano-explorer-app

Deploy

The static bundle can be deployed using a standard web server. A simple Node.js program is available for deploying the build to an AWS S3 bucket.

AWS_ACCESS_KEY_ID=your_access_key_id \
AWS_SECRET_ACCESS_KEY=your_secret_access_key node \
./deploy/example_deployment.js

Development

The environment is configured to access a remote managed deployment of the API, however you can run a local stack using Docker and use a .env to work offline. See .env.example

yarn dev

  • Starts the development version of the app by default at http://localhost:4000
  • Generates graphql typings from the referenced schema in @cardano-graphql/client-ts and documents within the codebase.
  • Any changes to graphql documents will trigger the TypeScript generator.

Storybook

All visual components should be developed in Storybook first.

yarn storybook

Continuous Deployment

The master and develop branches are continuously deployed, with PRs creating merge previews to assist with review:

Mainnet

Netlify Status

Testnet

Netlify Status