How to build a solana token launchpad (with metadata)
Source: Dev.to
This blog is relevant for anybody who is just getting started in web3 and is wondering what all this token stuff is about.
Prerequisites
First, install the required dependencies. The example uses Next.js, TypeScript, and Yarn (npm wasn’t working for the author).
# Packages to install
@solana/spl-token
@solana/spl-token-metadata
@solana/wallet-adapter-base
@solana/wallet-adapter-react
@solana/wallet-adapter-react-ui
@solana/wallet-adapter-wallets
@solana/web3.js
Creating a Mint Account
To create a token we first need a mint account. The mint account requires:
- A keypair
- The user’s public key
- Rent value
- Space allocation
programId(which is the Token‑22 program)

Token Creation and Metadata
1. Create a Form
Build a UI form where the user can input the token name, symbol, and other metadata.

2. Calculate Space & Rent
Determine the amount of space and the rent‑exempt balance required for the metadata account.

3. Add Instructions for Metadata & Mint
Create the Solana instructions that set up the token’s metadata and mint the token.

4. Build the Transaction
Add the user’s public key and the recent blockhash to the transaction. Because we only have the mint‑account keypair (not the user’s private key), we partially sign the transaction. The wallet then prompts the user to sign the remaining part.

5. Wrap with Wallet Provider
Finally, wrap the token‑creation function inside your wallet provider component so the UI can trigger the transaction.
Note: The example targets devnet; for production you would switch to the mainnet‑beta cluster.