Bootstrapped with the Underdog Next JS Gallery
Visit Underdog to learn more.
The VillagesDAO Clean Water Initiative represents a partnership between Aerial IoT, Cryptochicks NFT Community, and LavaDAO. Our goal is to establish wireless connectivity, earning opportunities, and water monitoring for impacted communities around the globe. Our first SORMN has been deployed near Navi Mumbai, and our teams of women leaders are spearheading operations on the ground. Contribute to our cause by purchasing an NFT or simply donating. Follow us on twitter to learn more.
- Get setup on Underdog to get your Underdog keys.
- Get setup on Sphere to get your Sphere keys.
- Get setup on Stripe to get your Stripe keys.
Rename .env.template
to .env
and replace the values with your acquired keys. For your front-end, deployments on Vercel will need variables to start with NEXT_PUBLIC_
in order for your UI to call them. Import this .env
file to your Vercel Environment Variables in Settings.
- Install dependencies
yarn
- Run the development server
yarn dev
You can run the setup script to automatically generate webhooks on both Underdog and Sphere.
yarn run setup
Note: you'll need to have your Underdog API key and Sphere API key, set your network, and set the app URL in your environment variables.
Otherwise, you can use the interface to manually create webhooks.
-
Click Add Webhook
-
Set URL to
${APP_URL}/api/underdog/webhooks
and selectproject.create
-
Click Create Webhook
-
Set URL to
${APP_URL}/api/sphere/webhooks
and selectPayment Successful
Variable | Description | Example |
---|---|---|
APP_URL |
The URL of the app used to redirect after a successful payment on the Sphere checkout page | https://gallery.underdogprotocol.com |
NEXT_PUBLIC_APP_NAME |
The name of the app used in the header | Underdog Gallery |
NEXT_PUBLIC_NETWORK |
Either MAINNET for Solana mainnet-beta or DEVNET for Solana devnet | DEVNET |
UNDERDOG_API_KEY |
Key to authenticate your Underdog requests generated from https://app.underdogprotocol.com/apikeys | 1cc491851db99d.aasdfasdf342423524531242 |
SPHERE_API_KEY |
Key to authenticate your Sphere requests generated from https://spherepay.co/dashboard/developers/api-keys | secret_aasdfasdf342423524531242 |
SPHERE_WEBHOOK_SECRET |
Secret to validate webhook requests sent from Sphere | secret_123dsafdsafadsf |