Congratulations! You have successfully created Odyssey and generated your config.json file. This page teaches you to deploy Odyssey on your own mint website.
Overall Steps
Setting up the backend
Implementing the /api/get-mint-txn API endpoint in the backend
Implementing the mint function on the frontend
🔧 Setting up the backend
We suggest using Node.js to set up the backend and run Odyssey on a private, secure server.
Option 1: Local Deployment
To set up the backend locally:
Step 1: Ensure Node.js is installed on your machine
Step 2: In your terminal:
# Clone the Odyssey UI repogitclonehttps://github.com/Archetype-Co/odyssey_UI.git# Navigate to the backend folder (or set up your own backend)cdodyssey_UI/backend# Install dependenciesnpminstall# Run the backend servernpmstart
Step 3: This will start your backend at http://localhost:5000 (or whichever port you define).
Create a repository on GitHub and push your code onto GitHub.
Step 2: Import Your GitHub repository into your selected provider.
⚠️ Remember: Vercel has storage limitations. If your assets are large (over 1GB total), consider Option 2 instead.
Continue following from Set up your .env file in the below section.
Option 3: Infrastructure Cloud Providers (AWS, Google Cloud, Azure)
If you're using cloud services like AWS EC2, Google Cloud, or Render, follow these general steps:
Step 1: Launch a server (e.g., EC2 instance with Ubuntu)
Step 2: SSH into your server
Step 3: Install Node.js and Git
Step 4: Clone your backend repo, install dependencies, and run it as a service using something like PM2.
Continue following from Set up your .env file in the below section.
📖Set up your .env file
In your frontend project (usually inside the src/ root), create a .env file and add:
For REACT_APP_API_BASE_URL, please input in the backend server URL where your backend is hosted as shown above.
If you're using external cloud solutions (AWS / Google Cloud etc.), replace the API URL with your actual domain or public IP.
🛠️ Implement the /api/get-mint-txn API endpoint in the backend
Note: The examples shown below are referencing functions in our test mintpage https://github.com/Archetype-Co/odyssey_UI
Odyssey has a default API endpoint setup that you could utilise for the frontend mint button to interact with. This endpoint should live in your Node.js backend and be accessible by your frontend.
Here is an example:
💻 Implement the mint function on the frontend
To enable users to mint NFTs directly from your frontend, you'll need to set up a mint button that interacts with the /api/get-mint-txn API endpoint and allows the user to sign the transaction with their Aptos wallet.
Implement the handleMint Function
The handleMint function is responsible for:
Requesting a prebuilt transaction payload from your backend
Using the connected wallet to sign and submit the transaction
Optionally, waiting for on-chain confirmation
Here is an example:
Add a Mint Button Component
Include a button in your UI that triggers the function.
Below is an example using a simple button from a UI library (e.g., Ant Design)