Skip to content

About

NFT marketplace (Solidity + Next.js/TypeScript) where every listing shows its full on-chain provenance — mint, listing, and sale history — directly on the card.

Resources

Stars

2 stars

Watchers

0 watching

Forks

Repository files navigation

Ledger — NFT Marketplace

A premium, original NFT marketplace frontend built with Next.js 16 (App Router), React, TypeScript, and Tailwind CSS. Styled in a light "Clean Vault" theme — cool white surfaces, deep blue and violet accents. Fully offline: no external image CDNs, no Google Fonts CDN, no analytics. Every image is a locally generated inline SVG.

Design system

  • Palette: cool white background #F7F9FC, white surfaces, blue accent #2563EB, violet accent #7C3AED, muted emerald #059669 for positive states, ink #1E293B for text.
  • Type: system font stack (no web fonts downloaded) for body/display, system monospace for hashes, prices, and token IDs.
  • Signature element: ProvenanceStrip — a monospace timeline of mint/list/sale events shown on every NFT card and detail page.
  • Styling: Tailwind CSS v4 utility classes throughout (no CSS Modules). Theme tokens are defined once in app/globals.css via @theme and used as bg-page, text-ink-muted, border-border-strong, etc.

Getting started

npm install
npm run dev

Open http://localhost:3000.

Pages (kept intentionally to five)

  • / — Home (hero, featured collections, trending NFTs, live auctions, top creators, categories, roadmap, newsletter)
  • /explore — Everything else lives here as tabs: Items (filters, sort, pagination), Collections, Creators (ranked by volume), Activity (marketplace-wide feed). Supports ?tab=, ?collection=, ?creator=, ?category=, and ?q= query params so cards elsewhere can deep-link into a filtered view.
  • /nft/[id] — NFT detail: buy / bid / cancel wired to the marketplace contract, provenance timeline, attributes, and details tabs.
  • /profile — Wallet-gated: Owned / Created / Favorites / Settings as tabs (?tab=).
  • /help — FAQ and support topics.

There's no separate Login/Register page — connecting a wallet is the account, via the Wallet modal available from the navbar on every page.

Multi-network testing

The app can switch between multiple test networks, each with its own deployed contract address, all configured in one place: constants/networks.ts.

export const NETWORKS: NetworkConfig[] = [
  { chainId: 11155111, name: "Sepolia", marketplaceAddress: "0x15D1AE...", /* ... */ },
  { chainId: 80002, name: "Polygon Amoy", marketplaceAddress: "", /* ... */ },
  { chainId: 97, name: "BSC Testnet", marketplaceAddress: "", /* ... */ },
];
  • Sepolia already has your real deployed address wired in.
  • Polygon Amoy and BSC Testnet are scaffolded but empty (marketplaceAddress: "") — deploy contracts/Marketplace.sol there and paste the address in to activate that network too. Add as many more networks as you want the same way; nothing else in the code needs to change.
  • The network switcher in the navbar lets you request a network change from inside the connected wallet (MetaMask etc.) — if the network isn't added to the wallet yet, it prompts to add it automatically (wallet_addEthereumChain), then switches.
  • services/marketplaceContract.ts always resolves the marketplace address for whichever network the wallet is currently on — Buy / Bid / Cancel / Mint automatically talk to the right deployment. If the current network has no address configured yet, the UI shows a "not deployed on this network" notice instead of silently failing.

Connecting the real contract

Already connected on Sepolia. The deployed contract address and its real ABI (services/marketplaceAbi.json) are wired into services/marketplaceContract.ts. As soon as a browser wallet is connected (via the wallet modal) and set to Sepolia, Buy / Bid / Cancel / Mint on any page send real transactions to that contract instead of simulating them.

Read-only helpers (getListing, getAuction, getRoyalty, getOwnerOf, getTokenURI, getListingFeeEth, getPlatformFeeBps) are also available in services/marketplaceContract.ts for pulling live on-chain state — the pages still render from constants/mockData.ts by default, so wire a page to these if you want it to show real listings instead of mock data.

Project structure

app/                 Routes (App Router) — home, explore, nft/[id], profile, help
components/
  ui/                Button, Modal, Tabs, Dropdown, Toast, Skeleton, Pagination, EmptyState, Accordion, Badge, Tag
  nft/               NFTCard, CollectionCard, CreatorCard, AuctionCard, ProvenanceStrip
  layout/            Navbar, Footer
  wallet/            WalletButton, WalletModal
  search/            SearchBar, Filters
  home/              Hero, LiveTicker, FeaturesSection, StatsSection
context/             WalletContext, ToastContext, FavoritesContext
hooks/               useCountdown
services/            marketplaceContract.ts (contract ABI + calls), walletService.ts
lib/                 formatting utilities, local SVG placeholder image generator
constants/           deterministic mock data generators
types/               shared TypeScript interfaces
contracts/           Marketplace.sol (reference copy of your uploaded contract)

Fully offline / local

  • Images: every avatar, banner, and NFT image is a deterministic inline SVG data URI generated in lib/placeholder.ts — no picsum.photos, no image CDN, nothing fetched at runtime.
  • Fonts: system font stacks only — no Google Fonts or any other font CDN.
  • Styling: Tailwind CSS compiles to a static stylesheet at build time; nothing is loaded from a CDN at runtime.
  • Wallet: if no browser wallet extension is present, services/walletService.ts falls back to a local demo session so the whole app is browsable with zero wallet and zero network. Connecting a real wallet to a real network is, unavoidably, an online action — that's inherent to any Web3 app, not something this frontend adds on top.

Notes

  • This environment could not run npm install (no network access), so please run a local build/lint pass after installing — happy to fix anything that surfaces.

About

NFT marketplace (Solidity + Next.js/TypeScript) where every listing shows its full on-chain provenance — mint, listing, and sale history — directly on the card.

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages