Skip to content

Gaurav0203Shetty/Gen_Art_Market

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Generative Art Marketplace

A full-stack + data science project that lets users generate unique artworks via a GAN model and mint them as NFTs on IPFS, all through a Next.js frontend with Web3 wallet integration.

Features

  • Generative AI: FastAPI microservice runs a GAN to produce 512×512 images from random seeds.
  • Web3 Minting: Users connect their MetaMask wallet, generate art, and mint metadata to IPFS with a stubbed blockchain transaction.
  • Persistent Storage: Minted tokens are saved in MongoDB Atlas via Mongoose.
  • Caching: Redis cache speeds up repeated art generation for the same seed.
  • Modern UI: Next.js + TailwindCSS + shadcn/ui components + Framer Motion animations + Sonner toasts.

Architecture

  • Next.js (frontend) handles UI, wallet connect, and fetches /generate & /mint.

  • Express (backend) proxies to the GAN service, manages caching, IPFS upload, and database persistence.

  • FastAPI microservice loads a GAN model to generate images.

  • Redis caches generated images by seed for 1 hour.

  • MongoDB Atlas stores minted NFT records.

  • IPFS (via ipfs-core) stores metadata JSON.

Tech Stack

Frontend: Next.js, React, Tailwind

UI Components: shadcn/ui, Framer Motion

Toasts: Sonner

Backend API: Node.js, Express, TS

ML Service: Python, FastAPI, PyTorch

Caching: Redis (ioredis)

Storage: MongoDB Atlas, ipfs-core

Dev Tools: pnpm, Docker (optional)

Pre-requisites

  • Node.js ≥16, pnpm

  • Python 3.10+ and pip

  • Redis server (local or cloud)

  • MongoDB Atlas free cluster

  • MetaMask extension in your browser

Run Locally

1. Clone & Install:

git clone https://github.com/yourusername/gen-art-marketplace.git
cd gen-art-marketplace
# install root (workspaces)
pnpm install

2. Configure Environment:

Create a .env in backend/ with:

PORT=4000
MONGODB_URI=your_atlas_connection_string

3. Start GAN Service:

cd gan-service
python3 -m venv .venv
source .venv/bin/activate
pip install --upgrade pip
pip install -r requirements.txt
uvicorn main:app --host 0.0.0.0 --port 8000 --reload

4. Start Redis (if not running):

# macOS (Homebrew)
brew install redis
brew services start redis

5. Run backend API:

cd ../backend
pnpm dev

6. Run frontend:

cd ../frontend
pnpm dev

Open http://localhost:3000 in your browser.

Testing and Usage

  • Click Connect Wallet (MetaMask pop‑up).

  • Click Generate Art to fetch GAN‑generated image.

  • Click Mint to IPFS to upload metadata and get a stub transaction.

  • Check your Atlas DB for the new NFT record.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors