|
1 |
| -# Getting Started with Create React App |
| 1 | +# Candy Machine V2 - BOOTSTRAP - Template |
2 | 2 |
|
3 |
| -This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app). |
| 3 | +by [Halaprix](https://twitter.com/halaprix).<br/>Live preview [here](https://vol2.shapes.ltd/)<br/> |
| 4 | +1click deploy:<br/><br/> |
| 5 | +[](https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2Fhalaprix%2Fshapes-mint-page-cm-v2&env=REACT_APP_CANDY_MACHINE_ID,REACT_APP_SOLANA_NETWORK,REACT_APP_SOLANA_RPC_HOST&envDescription=REACT_APP_CANDY_MACHINE_ID%20is%20the%20ID%20of%20your%20Candy%20Machine.%20REACT_APP_SOLANA_NETWORK%20is%20the%20network%20you%20deployed%20your%20CM%20%60devnet%60%20or%20%60mainnet-beta%60%20%20REACT_APP_SOLANA_RPC_HOST%20is%20the%20URL%20of%20the%20RPC%20you%20want%20to%20use%20eg%20%60https%3A%2F%2Fssc-dao.genesysgo.net%2F%20%60&project-name=candy-machine-v2-mint-web&repo-name=candy-machine-v2-mint-web&demo-title=Shapes%20V2&demo-description=Shapes%20VOL2%20mint%20website%20created%20using%20this%20repo.&demo-url=https%3A%2F%2Fvol2.shapes.ltd%2F) |
4 | 6 |
|
5 |
| -## Available Scripts |
| 7 | + |
6 | 8 |
|
7 |
| -In the project directory, you can run: |
| 9 | +# Installation |
8 | 10 |
|
9 |
| -### `npm start` |
| 11 | +0. Prerequisities: |
10 | 12 |
|
11 |
| -Runs the app in the development mode.\ |
12 |
| -Open [http://localhost:3000](http://localhost:3000) to view it in the browser. |
| 13 | + - [node.js](https://nodejs.org/en/download/) |
| 14 | + - **yarn** - `npm add -g yarn` (run as root / su eg. `sudo npm add -g yarn`) |
13 | 15 |
|
14 |
| -The page will reload if you make edits.\ |
15 |
| -You will also see any lint errors in the console. |
| 16 | +1. Clone the repository: |
16 | 17 |
|
17 |
| -### `npm test` |
| 18 | + `git clone https://github.com/halaprix/shapes-mint-page-cm-v2` |
18 | 19 |
|
19 |
| -Launches the test runner in the interactive watch mode.\ |
20 |
| -See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information. |
| 20 | + ` cd shapes-mint-page-cm-v2` |
21 | 21 |
|
22 |
| -### `npm run build` |
| 22 | +2. use yarn to install all dependencies: |
23 | 23 |
|
24 |
| -Builds the app for production to the `build` folder.\ |
25 |
| -It correctly bundles React in production mode and optimizes the build for the best performance. |
| 24 | + `yarn install` |
26 | 25 |
|
27 |
| -The build is minified and the filenames include the hashes.\ |
28 |
| -Your app is ready to be deployed! |
| 26 | +3. Fill `.env-example` with your Candy Machine details (can be found in `.json` file in `.cache` directory, after CM upload). Rename the file to `.env`. |
29 | 27 |
|
30 |
| -See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information. |
| 28 | +4. Run yarn start to start the developement server. |
31 | 29 |
|
32 |
| -### `npm run eject` |
| 30 | + `yarn start` |
33 | 31 |
|
34 |
| -**Note: this is a one-way operation. Once you `eject`, you can’t go back!** |
| 32 | +5. If you are using traditional hosting, run `yarn build` and uplaod contents of the `build` folder to your hostings `public_html` |
| 33 | +6. (Optional) - If deploying to Vercel, use the ENV VARIABLES from `.env` file here or use one click prefilled deploy:<br/>[](https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2Fhalaprix%2Fshapes-mint-page-cm-v2&env=REACT_APP_CANDY_MACHINE_ID,REACT_APP_SOLANA_NETWORK,REACT_APP_SOLANA_RPC_HOST&envDescription=REACT_APP_CANDY_MACHINE_ID%20is%20the%20ID%20of%20your%20Candy%20Machine.%20REACT_APP_SOLANA_NETWORK%20is%20the%20network%20you%20deployed%20your%20CM%20%60devnet%60%20or%20%60mainnet-beta%60%20%20REACT_APP_SOLANA_RPC_HOST%20is%20the%20URL%20of%20the%20RPC%20you%20want%20to%20use%20eg%20%60https%3A%2F%2Fssc-dao.genesysgo.net%2F%20%60&project-name=candy-machine-v2-mint-web&repo-name=candy-machine-v2-mint-web&demo-title=Shapes%20V2&demo-description=Shapes%20VOL2%20mint%20website%20created%20using%20this%20repo.&demo-url=https%3A%2F%2Fvol2.shapes.ltd%2F) |
| 34 | + <br/>  |
35 | 35 |
|
36 |
| -If you aren’t satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project. |
| 36 | +--- |
37 | 37 |
|
38 |
| -Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you’re on your own. |
| 38 | +### Example configuration |
39 | 39 |
|
40 |
| -You don’t have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn’t feel obligated to use this feature. However we understand that this tool wouldn’t be useful if you couldn’t customize it when you are ready for it. |
| 40 | +Devnet: |
41 | 41 |
|
42 |
| -## Learn More |
| 42 | +``` |
| 43 | +- REACT_APP_SOLANA_NETWORK=devnet |
| 44 | +- REACT_APP_SOLANA_RPC_HOST=https://psytrbhymqlkfrhudd.dev.genesysgo.net:8899/ |
| 45 | +``` |
43 | 46 |
|
44 |
| -You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started). |
| 47 | +Mainnet-beta: |
45 | 48 |
|
46 |
| -To learn React, check out the [React documentation](https://reactjs.org/). |
| 49 | +``` |
| 50 | +- REACT_APP_SOLANA_NETWORK=mainnet-beta |
| 51 | +- REACT_APP_SOLANA_RPC_HOST=https://ssc-dao.genesysgo.net/ |
| 52 | +``` |
| 53 | + |
| 54 | +# Styling |
| 55 | + |
| 56 | +**Favicon, Phantom styling** - `index.html`<br/> |
| 57 | + |
| 58 | +- Use this [generator](https://realfavicongenerator.net/) to generate favicons, metadata and images, to be put to `/public`. |
| 59 | + |
| 60 | +**Buttons** - `/src/MintButton.tsx` and `src/Home.tsx`<br/> |
| 61 | + |
| 62 | +- Change the style of the buttons in `styled` components. `background: linear-gradient(29deg, #34342F 0%, #44C3A1 100%);` is reponsible for the button gradient. |
| 63 | + |
| 64 | +**Images** - `/public`<br/> |
| 65 | + |
| 66 | +- `/public/logo.png` is the top logo |
| 67 | +- `/public/animation.gif` is the middle container image. |
| 68 | + |
| 69 | +**Styles** - `/src/index.css`<br/> |
| 70 | + |
| 71 | +- Change the styles of the website. `background: linear-gradient(29deg, #34342f 0%, #5ff1cb 50%, #44c3a1 100%);` is the background gradient. You can generate the gradient using this [generator](https://cssgradient.io/) |
| 72 | +- change the `Paper` style (the three containers) in `/src/Home.tsx` : |
| 73 | + ``` |
| 74 | + const StyledPaper = styled(Paper)` |
| 75 | + padding: 24px; |
| 76 | + background-color: #34342f; |
| 77 | + border-radius: 6px; |
| 78 | + margin: 10px; |
| 79 | + `; |
| 80 | + ``` |
| 81 | + |
| 82 | +--- |
0 commit comments