AI-powered profile picture NFTs on Polygon - Simple. Free. Unlimited. Forever.
nicepfp.art is a Web3 application that uses machine learning to generate unique doodle profile pictures and mint them as NFTs on the Polygon blockchain. Built with AI creativity and blockchain technology, it makes personalized NFT profile pictures accessible to everyone.
- AI Face Generation - Uses ML5.js and SketchRNN to generate unique face doodles
- Free NFT Minting - No minting fees, only gas costs on Polygon
- Unlimited Creations - Generate as many unique faces as you want
- Web3 Integration - Connect wallet and mint directly to blockchain
- IPFS Storage - Decentralized storage for permanence
- Farcaster Frames - Social integration for Farcaster users
- NFT Gallery - Showcase of all minted profile pictures
- Node.js 20+
- pnpm 10+
- Docker & Docker Compose
- PostgreSQL 15
- Redis
- Clone the repository:
git clone https://github.com/andreivcodes/nicepfp.art.git
cd nicepfp.art- Install dependencies:
pnpm install- Set up environment variables:
# Create .env files for each service based on the requirements below- Start infrastructure services:
docker compose -f docker-compose.yml -f docker-compose.dev.yml up -d postgres redis browserless- Run database migrations:
pnpm db:migrate:latest- Start development:
pnpm devVisit http://localhost:3000 to see the application.
nicepfp.art is built as a microservices monorepo using Turborepo:
apps/
├── web/ # Next.js frontend with Web3 integration
├── generate_image/ # Image generation service (Puppeteer + IPFS)
└── mint/ # NFT minting service (blockchain interactions)
- Web App: Next.js 14 with App Router, React 18, TypeScript, Tailwind CSS
- Generate Service: Express.js microservice for AI image generation and IPFS uploads
- Mint Service: Express.js microservice for NFT minting on Polygon
- Database: PostgreSQL with Prisma ORM
- Cache: Redis for session management
- Browser: Browserless Chrome for headless rendering
- Frontend: Next.js, React, TypeScript, Tailwind CSS, shadcn/ui
- Blockchain: Wagmi, Viem, Ethers.js, Polygon network
- AI/ML: ML5.js, p5.js, SketchRNN model
- Backend: Express.js, Prisma, PostgreSQL, Redis
- Infrastructure: Docker, Turborepo, IPFS
- Web3: Smart contracts on Polygon, IPFS for storage
# Development
yarn dev # Run all services
yarn dev --filter=@nicepfp/web # Run specific service
# Database
yarn prisma:generate # Generate Prisma client
yarn prisma:studio # Open database GUI
# Code Quality
yarn lint # Run ESLint
yarn format # Format with Prettier
# Building
yarn build # Build all servicesdocker-compose.dev.yml publishes these host ports for local development:
- Web app:
http://localhost:3000 - Browserless:
ws://localhost:3001 - PostgreSQL:
localhost:5432 - Redis:
localhost:6379
docker compose -f docker-compose.yml -f docker-compose.dev.yml up
docker compose -f docker-compose.yml -f docker-compose.dev.yml up web
docker compose -f docker-compose.yml -f docker-compose.dev.yml up -d postgres redis browserlessEach service requires specific environment variables:
DATABASE_URL=postgresql://user:password@localhost:5432/nicepfp
REDIS_URL=redis://localhost:6379
NEXT_PUBLIC_HOST=http://localhost:3000
DATABASE_URL=postgresql://user:password@localhost:5432/nicepfp
REDIS_URL=redis://localhost:6379
BROWSERLESS_URL=ws://localhost:3001
BROWSERLESS_TOKEN=your_token
PRIVATE_KEY=your_ethereum_private_key
WEB_URL=http://localhost:3000
DATABASE_URL=postgresql://user:password@localhost:5432/nicepfp
REDIS_URL=redis://localhost:6379
PRIVATE_KEY=your_ethereum_private_key
- Generate: AI creates unique face doodles using ML5.js
- Preview: Keep generating until you find the perfect one
- Connect: Link your Web3 wallet (MetaMask, etc.)
- Mint: Click mint to create your NFT (free + gas)
- Own: NFT is yours on Polygon blockchain forever
- Network: Polygon Mainnet
- Contract:
0xf8C0f5B3e082343520bDe88d17Fa09E0aeAbEc34 - Standard: ERC-721 NFT
- Features: Signature verification, one mint per address for Farcaster
This project is open source and available under the MIT License.