DEV Community

Milan Reyes
Milan Reyes

Posted on

Build a Web3 Mood-to-NFT Generator with React and Thirdweb

Hi Devs πŸ‘‹

Last week, I launched MintYourMood, a React-based PWA that lets users turn their mood into a custom-designed NFT β€” and mint it on the Polygon blockchain. Built with React + Thirdweb, this project was a mix of frontend fun and Web3 logic. Here’s how (and why) I built it.

🎯 The Idea
Everyone shares how they feel online, whether with emojis, selfies, or quotes. I thought:

What if you could turn your mood of the moment into an NFT β€” a little capsule of emotion minted forever?

And that’s how MintYourMood was born.

🧱 The Tech Stack

  • Frontend: React + TailwindCSS
  • PWA: Fully installable (Add to Home Screen)
  • Web3: Thirdweb SDK for wallet connections, NFT minting, storage
  • Storage: IPFS via Thirdweb's upload
  • Design to NFT: html-to-image + IPFS
  • Chain: Polygon (MATIC)

βš™οΈ How It Works

  • User inputs: emoji, name, quote, selfie
  • Visual generation: The app creates a mood card using html-to-image
  • IPFS upload: Both image + metadata get uploaded
  • Minting: Via mintWithMetadata() on a custom ERC-721 contract All done inside the browser. No backend required.

πŸ§ͺ Dev Challenges

  • React hydration and conditional Web3 hooks β€” caused some tricky race conditions.
  • IP geolocation block β€” added basic client-side check to restrict access in high-risk countries.
  • Cookie storage duration logic and syncing across tabs (localStorage + storage events).

🧠 What I Learned

  • Thirdweb is fantastic for Web3 projects β€” wallet connect, contract calls, IPFS β€” all in one.
  • User privacy handling is essential in crypto apps β€” even for something as light as emoji NFTs.
  • Dev-first NFT tools make launching onchain experiences smoother than ever.

πŸ–ΌοΈ Try It Out

πŸ”— https://mintyourmood.com

Give it a spin and mint your current vibe.

Got feedback, ideas, or bugs? I’d love to hear it β€” drop a comment here. πŸ¦‹

Top comments (0)