Frontend Setup Guide
Download and configure the open-source SUI Token Creator frontend to integrate with your API key.
What You'll Build
A professional, production-ready Next.js frontend that allows users to create native SUI tokens using your API key. The frontend includes wallet integration, IPFS image upload, and automatic fee handling.
Prerequisites
Installation Steps
Clone the Repository
Download the frontend code from GitHub:
git clone https://github.com/Criptomaniaapp/sui-tokencreator.git
cd sui-tokencreatorInstall Dependencies
Install all required packages:
npm installConfigure Environment Variables
Create your environment configuration file:
cp .env.example .envThen edit .env with your configuration:
# API Configuration
API_ENDPOINT=https://apikey.suilab.fun/api/publish/token
API_KEY=YOUR_API_KEY_HERE
# Developer Configuration
DEV_WALLET=0xYOUR_WALLET_ADDRESS_HERE
DEV_FEE=3
PLATFORM_FEE=2
NETWORK_FEE=0.05
# SUI Network
NEXT_PUBLIC_SUI_NETWORK=mainnet
# Pinata Cloud
PINATA_API_KEY=YOUR_PINATA_API_KEY
PINATA_SECRET_API_KEY=YOUR_PINATA_SECRET_KEY
NEXT_PUBLIC_GATEWAY_URL=https://gateway.pinata.cloud/ipfs/Run Development Server
Start the local development server:
npm run devOpen http://localhost:3000 in your browser.
Configuration Details
API Configuration
API_ENDPOINTThe SUILab API endpoint: https://apikey.suilab.fun/api/publish/token
API_KEYYour API key obtained from the request form
Developer Configuration
DEV_WALLETYour SUI wallet address where you'll receive developer fees
DEV_FEEYour fee in SUI per token creation (e.g., 3 = 3 SUI). This is YOUR revenue.
Pinata Cloud Setup
Pinata is used for IPFS image storage. Follow these steps:
- 1.Create account at pinata.cloud
- 2.Navigate to API Keys in dashboard
- 3.Create new key with
pinFileToIPFSpermission - 4.Copy API Key and Secret to your
.envfile
Deploy to Production
Deploy to Vercel (Recommended)
Vercel is the easiest way to deploy Next.js applications:
Option 1: Via Dashboard
- 1.Push your code to GitHub
- 2.Go to vercel.com and import your repository
- 3.Add all environment variables from your
.envfile - 4.Click Deploy and wait 2-3 minutes
Option 2: Via CLI
npm install -g vercel
vercel login
vercelPost-Deployment Checklist
- ✓ Test wallet connection
- ✓ Test image upload to IPFS
- ✓ Create a test token with small amount
- ✓ Verify fees display correctly
- ✓ Confirm developer fee arrives in your wallet
Understanding the Fee Structure
When users create tokens through your frontend, they pay three types of fees: