crusaderincode
candy-machine-ui
TypeScript

Easily customizable Solana Candy Machine V2 with WL support.

Last updated Jul 25, 2024
17
Stars
27
Forks
0
Issues
0
Stars/day
Attention Score
26
Language breakdown
TypeScript 97.0%
CSS 1.9%
HTML 1.1%
Files click to expand
README

Intoduction

candy-machine-ui is a fork of Fulgurus/candy-machine-v2-responsive-ui repo.

Up-to-date with metaplex from v1.1.

Features

  • Auto refresh. Every few seconds ui is updated, This allows you to track the amount of minted NFTs in real time.
  • Auto timers. If the presale option is enabled and the time is set, the minting timer will be different for WL members.
  • WL suport. Everything is already set, just specify the dates of presale.
  • No wallet connection needed to see mint date and price. To achive this, you need to add this data to the constants.
  • Fully mobile adopted. Everything works just out of the box.
  • MUI v5 suport. Instead MUI v4 in the original repo.
Example 1

Example 2

Installation

1. Fork the project & clone it.

git clone https://github.com/GottliebGlob/candy-machine-ui.git

2. Define your environment variables (.env file)

Rename the .env.example file at the root directory to .env and update the following variables in the .env file:

REACTAPPCANDYMACHINEID=PLACEHOLDER
set PLACEHOLDER with the candy machine pubkey you get once you upload & create your candy machine in Metaplex project. You can find back the value from the .cache/temp.json file of your Metaplex project. This file is created when you run the ts-node candy-machine-v2-cli.ts upload ... command.
REACTAPPSOLANA_NETWORK=devnet

This identifies the Solana network you want to connect to. Options are devnet, testnet, and mainnet.

REACTAPPSOLANARPCHOST=https://api.devnet.solana.com

This identifies the RPC server your web app will access the Solana network through.

If you are using a custom SPL Token to MINT, you have two additional environment parameters to set :

REACTAPPSPLTOKENTOMINTNAME=

Spl-token name to display next the price.

REACTAPPSPLTOKENTOMINTDECIMALS=9

Spl-token decimals were defined during its creation with --decimals parameter. If you didn't use that parameter, then by default your SPL Token got 9 decimals.

3. Build the project :

To install dependencies :

yarn install

To test the app locally in the development mode (localhost:3000) :

yarn start

To build the production package (generated in build folder of the project) :

yarn build

More info in the original repo: Fulgurus/candy-machine-v2-responsive-ui

3. Build the project and test. Go to the root project directory and type the commands :

To install dependencies :

yarn install

To test the app locally in the development mode (localhost:3000) :

yarn start

To build the production package (generated in build folder of the project) :

yarn build

Customization

### Data

##### constants.ts - #### Set date and time for public mint :

export const startDate = new Date("19 May 2022 17:00:00 GMT")
- #### Set date and time for presale mint (if there is a WL) :
export const startWlDate = new Date("19 May 2022 16:00:00 GMT")
- #### Set mint price :
export const mintPrice = '0.1 SOL'
  • #### Set supply :
export const supply = 10

Styles

App.css : update this variables with your custom colors :

:root {
 --light-background-color: #2e3d4d;
  --main-background-color: #131a21;
  --dark-background-color: #0a0e11;
  --title-text-color:#00d0c1;
  }
##### index.tsx : the same color but for using with MUI :
palette: {
        primary: {
            light: '#2e3d4d',
            main: '#131a21',
            dark: '#0a0e11',
            contrastText: '#ff00b2'
        },

© 2026 GitRepoTrend · crusaderincode/candy-machine-ui · Updated daily from GitHub