GithubHelp home page GithubHelp logo

wynxc / candy-machine-responsive-ui Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ozonelabs-io/candy-machine-responsive-ui

0.0 0.0 0.0 1.67 MB

About Solana Candy Machine V2 with a plug and play feature and easy to customize responsive UI.

License: MIT License

Shell 0.54% TypeScript 92.01% CSS 5.26% HTML 2.18%

candy-machine-responsive-ui's Introduction

Candy-Machine-Responsive-UI

About Solana Candy Machine V2 with a plug and play feature and easy to customize responsive UI.

Introduction

plug and play Candy Machine Responsive UI which can be easily customise and will be ready in 5 minutes.

All Candy Machine V2 functionalities are implemented, auto detected and maintained up-to-date :

  • public mint (with countdown when date in future)
  • civic support (gatekeeper)
  • whitelist
  • presale true/false
  • end date / end number (endSettings)
  • spl-token to mint
  • Dynamic Style to show no. of remaining and minted nfts
  • Fully responsive

Candy Machine Preview Image Candy Machine Preview Image Candy Machine Preview Image Candy Machine Preview Image Candy Machine Preview Image

Supported Wallets

Supported Wallets

You can customise the supported wallet in app.tsx of this repo.

To setup the candy machine please checout the metaplex-docs here

Getting Set Up

Prerequisites

REQUIRE NODEJS VERSION <= 16 (version 17 not supported).

  • Download a Code Editor such as Visual Studio Code.

  • Ensure you have both nodejs and yarn installed. nodejs recommended version is 16.

  • Follow the instructions here to install the Solana Command Line Toolkit.

  • Follow the instructions here to install the Metaplex Command Line Utility.

    • Installing the Command Line Package is currently an advanced task that will be simplified eventually.

Installation

1. Fork the project & clone it. Example:

git clone https://github.com/Ozone-Labs/Candy-Machine-Responsive-UI.git

2. Define your environment variables (.env file)

update the following variables in the .env file:

REACT_APP_CANDY_MACHINE_ID=candy_machine_publickey

set candy_machine_publickey 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 upload the nfts to candy machine and make the candy machine.

REACT_APP_SOLANA_NETWORK=devnet

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

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

Provide your solana rpc host if you have custom one. or use https://api.devnet.solana.com for devnet and https://api.mainnet-beta.solana.com for mainnet

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

REACT_APP_SPL_TOKEN_TO_MINT_NAME=

Spl-token name to display next the price.

REACT_APP_SPL_TOKEN_TO_MINT_DECIMALS=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.

More info about it there : https://spl.solana.com/token

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

4. Customize the website UI :

4.1 App.css : update 5 main CSS variables with your custom colors :
:root {
  --main-background-color: #343A50;
  --card-background-color: #804980;
  --countdown-background-color: #433765;
  --main-text-color:#F7F6F4;
  --title-text-color:#3CBA8B;
}

adn other colors like the minting left box Next to that, make sure to update background image by overwriting your own background PNG file in src/img folder.

4.2 public folder :
  • Update existing demo cool cats images ( logo.png) with your owns images in project public folder. Make sure to name them identically to give its manifest logo and in the wallet connecting logo.
  • Add your custom website title in index.html : <title>Mint Page</title>
4.3 Home.tsx :

Scroll down down to line 380 (return <main> [...]) and start to update all titles/menu/text/images/text... as wished in the whole React HTML block.

That's it ! Enjoy your beautiful candy machine :)

src/home.tsx

Change some const like the connect button color and othe colors.

Available Commands Recap :

yarn start

Runs the app in the development mode.
Open http://localhost:3000 to view it in the browser.

The page will reload if you make edits.
You will also see any lint errors in the console.

yarn build

Builds the app for production to the build folder.
It correctly bundles React in production mode and optimizes the build for the best performance.

The build is minified and the filenames include the hashes.
Your app is ready to be deployed!

Need Help ?

You can ask for help in my discord :- Web3developer#3984

To thank me with a small SOL tip :]

2evbLeui5AyMwPW1bhpA9oXB8fdB19WbB2V32Qs6CKuP

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.