This repository hosts the primary codebase for the Minsta app.
Tooling:
Author:
This repository hosts the primary codebase for the Minsta App, originally created and developed by @microchipgnu.
All new Minsta instances should be derived from this repository.
Deploying.Your.Own.Photo.Minting.NFT.Minting.AI.Connection.App.-.with.Nate.Geier.mp4
- You need to have a NEAR Contract where you add a proxy contract as a minter.
- The proxy contract enables non-minter users to mint images on Minsta.
- The Near Contract will be where the NFT images will be minted
- The proxy contract will be the minter
- The user wallet address will be the owner of the NFT.
- Login on Mintbase and access Contracts Page
- Click on New Contract
- Choose Store Name (this will be the contract address to add on your minsta instance, this need to be added on the
process.env.NEXT_PUBLIC_NFT_CONTRACT_ADDRESS
environment variable) and Store Symbol - Proceed to transaction.
- Succeeded
- Go to Contract Settings
- Under Contract Settings go to Minters
- add
0.drop.proxy.mintbase.near
(this is the contract address that need to be added onprocess.env.NEXT_PUBLIC_PROXY_MINTER_CONTRACT_ADDRESS
), and click Add Minters. - Proceed to transaction.
- Succeeded
To start with this project:
-
Clone the repository.
-
If you don't have
pnpm
installed, run:npm install -g pnpm
-
Then, install the required dependencies:
pnpm install
ENV Variable | Type | Description | Mandatory |
---|---|---|---|
NEXT_PUBLIC_APP_TITLE | string | sets the Title of your deployed application | YES |
NEXT_PUBLIC_NFT_CONTRACT_ADDRESS | string | this is the Mintbase NFT contract where you want to showcase the user mints, you can deploy mainnet one here or on testnet | YES |
NEXT_PUBLIC_NETWORK | string | sets Wallet login to the desired near network. "testnet" | "mainnet" | YES |
NEXT_PUBLIC_PROXY_MINTER_CONTRACT_ADDRESS | string | Can use 0.drop.proxy.mintbase.near as a default. This is the contract address that will do proxy minting so any user on near could mint it. It should be added as a minter on your contract (same as NEXT_PUBLIC_NFT_CONTRACT_ADDRESS) |
YES |
ENV Variable | Type | Description | Mandatory |
---|---|---|---|
REPLICATE_API_TOKEN | string | API token adds replicate functionality that analyzes the image taken by the user and add title + description using AI | NO |
NEXT_PUBLIC_LEGACY_PROXY_ADDRESSES | string | contract address of a second proxy address in case first fail | NO |
NEXT_PUBLIC_MINTBASE_WALLET_URL | string | "https://testnet.wallet.mintbase.xyz" or "https://wallet.mintbase.xyz" | NO |
NEXT_PUBLIC_SHOW_REWARDS | boolean | this is to opt for rewards modal and show users | NO |
NEXT_PUBLIC_MINTING_CLOSED | boolean | this is to close the dapp for new mints | NO |
ENV Variable | Type | What it does? | Mandatory |
---|---|---|---|
NEXT_PUBLIC_META_DESCRIPTION | string | OG Meta description | NO |
NEXT_PUBLIC_META_TITLE | string | OG Meta Title | NO |
NEXT_PUBLIC_TWITTER | string | The message to be shared on twitter share. | NO |
you need to pass hex colors as strings.
- COLOR_PRIMARY
- COLOR_SECONDARY
- COLOR_MAIN_BACKGROUND
- COLOR_GRADONE
- COLOR_GRADTWO
- COLOR_CARDONE
- COLOR_CARDTWO
- COLOR_LINKCOLOR
- COLOR_ICON
- COLOR_CAMERA
- COLOR_MODAL_TEXT
- COLOR_LEADERBOARD_TEXT
- COLOR_HEADER_TEXT
- COLOR_MAIN_TEXT
- COLOR_FREE_USE_TEXT
- COLOR_PRIMARY_BTN_TEXT
- COLOR_SECONDARY_BTN_TEXT
- NEXT_PUBLIC_TEXT_PRIZE_1ST_VAL
- NEXT_PUBLIC_TEXT_PRIZE_2ND_VAL
- NEXT_PUBLIC_TEXT_PRIZE_3RD_VAL
- NEXT_PUBLIC_TEXT_PRIZE_1ST_TITLE
- NEXT_PUBLIC_TEXT_PRIZE_2ND_TITLE
- NEXT_PUBLIC_TEXT_PRIZE_3RD_TITLE
- NEXT_PUBLIC_TEXT_ABOUT_1ST
- NEXT_PUBLIC_TEXT_ABOUT_2ND
- NEXT_PUBLIC_TEXT_ABOUT_3RD
Refer to the .env.example file for the environment variables used in this project.
If you don't set up a .env
file or environment variables with your provider, the project will retrieve values from the following files:
- For CSS generation during build:
generate-css.js
- For configuration variables:
src/constants.ts
- For fallback metadata and text values:
src/fallback.ts
To run the project locally, use:
pnpm dev
If you're running your project locally, follow these steps to update your environment variables:
- Save your changes in the
.env
file. - Run
pnpm dev
again to apply the updated environment variables. - Reload the page to reflect the changes.
If you have deployed your project on Vercel, follow these steps to update your environment variables:
- Log in to your Vercel account.
- Navigate to the project settings for your deployed app.
- Update the environment variables in the Vercel dashboard.
- Trigger a redeployment of your app to apply the changes.
By following these steps, you can ensure that your project uses the updated environment variables.