Deploying a Mint Page
Overview
In this guide, we'll fork the mint page starter app and deploy it using Render.
Prerequisites:
- Render account
- Drop configured in Hub
Follow along as Mackenzie deploys a mint page here:
Details
Fork the starter app repository
Fork the repository https://github.com/holaplex/hub-starter-mint and give it a unique name
Customize the mint page
In the file
tailwind.config.js
, configure the following color options:cta
(call to action) - primary color for buttonsbackdrop
- background colorcontrast
- background color of sale boxes
Replace the image file:
public/img/logo.png
. The logo has a fixed size - this can be adjusted atsrc/app/Home.tsx
.Commit changes and push to the fork.
Create Render Blueprint Instance
Log in to dashboard.render.com
Create a new Blueprint Instance
a. Connect the newly forked repository to Render (GitHub -> Configure account, grant Render access to the repository)
b. Enter Blueprint Name and select the repository branch to deploy
Set configuration variables
GOOGLE_CLIENT_ID
&GOOGLE_CLIENT_SECRET
a. Go to the Google Developer Console.
b. Create a new project or select an existing one.
c. Navigate to the "Credentials" page.
d. Click on "Create Credentials" and select "OAuth client ID."
e. Choose "Web application" as the application type.
f. We will return to enter the "Authorized JavaScript origins" and the "Authorized redirect URIs" shortly below.
g. Click "Create" to generate your
GOOGLE_CLIENT_ID
andGOOGLE_CLIENT_SECRET
.TWITTER_CLIENT_ID
&TWITTER_CLIENT_SECRET
a. Go to the Twitter Developer Portal.
b. Create a new standalone app or select an existing one.
c. Set up "User authentication" and select "Request email from users". The starter mint page uses email address for user identities.
c. Enter the "Consumer Keys" (API Key and Secret) to your Render configuration.
HOLAPLEX_AUTH_TOKEN
a. Log into the Hub
b. Create a new Organization or select an existing one.
c. On the "Credentials" tab, click "Generate token"
HOLAPLEX_PROJECT_ID
a. On the Hub, create a new Project or select an existing one.
b. The UUID in the URL is the Project ID, e.g. the Project ID corresponding to the Hub URL
https://hub.holaplex.com/projects/dc2471ec-6b34-4ca0-8c78-9906a59316fc/drops
isdc2471ec-6b34-4ca0-8c78-9906a59316fc
HOLAPLEX_DROP_ID
a. On the Hub, create a new Drop or select an existing one.
b. The UUID in the URL is the Drop ID, e.g. the Drop ID corresponding to the Hub URL
https://hub.holaplex.com/projects/dc2471ec-6b34-4ca0-8c78-9906a59316fc/drops/394ed9dd-b764-4e0f-a9b1-bb362fd56fb9/holders
is394ed9dd-b764-4e0f-a9b1-bb362fd56fb9
NEXTAUTH_URL
- Render will produce this URL, leave it blank for now.Click Apply to create the database and web service
Finish configuration
On the web service page, copy the deploy URL (e.g. https://mint-page.onrender.com)
Set
NEXTAUTH_URL
- on the "Environment" tab, add an environment variable namedNEXTAUTH_URL
and paste the deploy URL as value. Save Changes.On the Google Developer Console, navigate to Credentials -> Client ID for Web application. Add a URI to "Authorized JavaScript origins" and paste the same link. Also add a URI to "Authorized redirect URIs", paste the same link and append
/api/auth/callback/google
, e.g.https://mint-page.onrender.com/api/auth/callback/google
On the Twitter Developer Portal under "User uathentication settings", enter the callback URI, e.g.
https://mint-page.onrender.com/api/auth/callback/twitter
Set up the database
In Render, navigate to web app's "Shell" tab.
Run
npm run db
View your mint page
Your mint page is now deployed and ready to use! The URL is available in Render, e.g. https://mint-page.onrender.com