This project is the primary user interface for Web3 Analytics and allows users to register apps, create analytics queries, and build dashboards. Documentation for Web3 Analytics is available here.
First, use these 4 cloudformation YAML files to set up Dynamodb.
Next, create a .env.local
file in the root directory and configure the below environment variables. You will need to set up and get the correct API keys for the relevant service as well (e.g. AWS SES, AWS Athena, Maxmind, etc).
ATHENA_AWS_ACCESS_KEY_ID
: AWS access key with permission to use AthenaATHENA_AWS_SECRET_ACCESS_KEY
: AWS secret for the above access keyATHENA_AWS_REGION
: region name for AWS AthenaWEB3ANALYTICS_DYNAMODB
: name of dynamodb database used for Web3 Analytics dataNEXT_AUTH_DB
: name of dynamodb database used for Next Auth dataNEXT_AUTH_AWS_ACCESS_KEY
: AWS access key with permission to use dynamodbNEXT_AUTH_AWS_SECRET_KEY
: AWS secret for the above access keyNEXT_AUTH_AWS_REGION
: region name for DynamodbEMAIL_SERVER_USER
: smtp username for AWS SES email userEMAIL_SERVER_PASSWORD
: smtp password for AWS SES email userEMAIL_SERVER_HOST
: hostname for AWS SES smtp serverEMAIL_SERVER_PORT
: port number for AWS SES smtp serverEMAIL_FROM
: email address to send email fromGITHUB_ID
: Github ID used for oAuthGITHUB_SECRET
: Github secret used for oAuthDISCORD_ID
: Discord ID used for oAuthDISCORD_SECRET
: Discord secret used for oAuthNEXTAUTH_SECRET
: as specified in Next Auth documentationNEXTAUTH_URL
: as specified in Next Auth documentationNEXT_PUBLIC_ALCHEMY_ID
: Alchemy ID as found in your Alchemy ConsoleNEXT_PUBLIC_NODE_URL
: Your json RPC Node URLNEXT_PUBLIC_WEB3ANALYTICS
: Address of the deployed Web3 Analytics smart contract to useNEXT_PUBLIC_CHAINS
: JSON array of public chains to allow as documented in wagmi, e.g.: ["hardhat", "goerli"]NEXT_PUBLIC_CURRENCY
: Currency to display for credits, e.g.ETH
orMATIC
MAXMIND_KEY
: Maxmind key required to use the geo lookup service.
To build the project, run:
npm run build
# or
yarn build
Note that the build process downloads the necessary Maxmind geo databases and so MAXMIND_KEY
must be set for the build process to run successfully.
First, run the development server:
npm run dev
# or
yarn dev
Then, open http://localhost:3000 with your browser to use the app.