Tagline: Register AI models, monetize usage, and mint AI‑generated content as NFTs — all on Solana.
MintCraft is a decentralized marketplace where AI generates content (art, music, text, code) that's instantly minted as NFTs on Solana, with built‑in ownership tracking and monetization. Users can also register their own AI models and earn from usage fees.
- Model Registry — Creators register AI models on‑chain with metadata, pricing, and payout addresses.
- Usage Metering — Every model invocation emits a verifiable usage record; fees are split to model owners.
- Instant Minting — Generated outputs can be minted standard NFTs with proper attribution.
- Marketplace — Browse models, preview capabilities, invoke with inputs, and purchase outputs.
- Attribution & Provenance — On‑chain links from NFT → prompt → model version → signer to verify origin.
- Programmable Fees — Usage fees, platform fees, and royalty settings configurable per model.
- Creator Earnings — Automatic distribution to the model owner wallet(s).
- Blockchain: Solana • Rust • Anchor
- Web: Next.js • TypeScript • Tailwind CSS
- Backend: Express • tRPC
- Data: Prisma • PostgreSQL
- Storage: IPFS (gateway/pinning of choice)
- Tooling: codama (Solana codegen) • zod (runtime schemas)
https://vimeo.com/1108440671?share=copy
+-------------------+ +-------------------+
| Next.js Client | tRPC (HTTP) | Express API |
| Tailwind + TS +---------------->+ tRPC Router |
+---------+---------+ +-----+-------------+
| |
| | Prisma
| v
| +-------------+
| | PostgreSQL |
| +------+------+
| |
| Solana Web3 / Anchor |
v |
+-------+--------+ |
| Anchor Prog |<-------------------------+
| (Model/NFT) |
+-------+--------+
|
| Asset CIDs
v
+-----+-----+
| IPFS |
+-----------+
High‑level flow
- Creator registers a Model on‑chain with price, payout address, and metadata (includes IPFS CID for docs/cards).
- User invokes a model via the API; backend computes price, takes payment (on‑chain), and records a Usage.
- Output artifact is uploaded to IPFS; user can Mint it as an NFT with attribution to the model & prompt.
- Royalties/fees settle to creator and platform wallets.
- Usage Fee: Set per model (e.g., lamports per prompt ).
- Platform Fee: Percentage of usage fee routed to
treasuryfromGlobalState. - Creator Royalty: Set on minted NFTs via metadata; secondary sales route royalties using standard marketplaces.
- Node.js >= 18, pnpm or npm
- Rust toolchain, Solana CLI, Anchor CLI
- PostgreSQL >= 14
- An IPFS node or pinning service account
# Clone
git clone https://github.com/yourname/mintcraft
cd mintcraft
# Install (pnpm recommended)
pnpm install
# Anchor deps
anchor --version # ensure installed
solana --version # ensure installed1) Start local validator (optional)
solana-test-validator --reset2) Build & deploy program For every individual programs
cd programs/programName
anchor build
anchor deploy # writes program ID to target/idl and Anchor.toml3) Database
# In project root
pnpm prisma generate
pnpm prisma migrate dev4) Server (Express + tRPC)
cd server
pnpm dev5) App (Next.js)
cd ../app
pnpm devOpen http://localhost:3000.
PRs welcome! Please open an issue to discuss substantial changes.