Skip to content

moonshotcommons/auction-gallery-project

Repository files navigation

Nouns Auction Gallery

A React application showcasing NounsDAO real-time auctions and historical data, fully meeting the project requirements.

🎯 Project Goals

Implementing the core functionality required by the project:

Mission: Display today's live auction countdown AND render a gallery of 5 past Nouns with their winning bid history.

✨ Core Features

πŸ”₯ Live Auction Display

  • Real-time Countdown: Precise display of remaining auction time
  • Dynamic Bid Updates: Simulated real-time bid stream
  • Auction Status Monitoring: Automatic detection of auction end
  • Urgency Indicators: Red warning for final 5 minutes

πŸ–ΌοΈ Historical Auction Gallery

  • 5 Recent Auctions: Display of most recently completed Noun auctions
  • Winning Bid History: Complete bidding records for each Noun
  • Participant Statistics: Bid counts, participant numbers, and other data
  • Transaction Price Display: Final transaction amounts and winners

🎨 Noun Image System

  • Seed-driven Generation: SVG image generation based on 5 traits
  • Pixel Art Style: Maintains Nouns' unique visual style
  • Responsive Sizing: Supports small/medium/large three sizes
  • Trait Information Display: Shows background, body, accessory, and other traits

πŸ› οΈ Tech Stack

  • React 18 + TypeScript - Modern frontend framework
  • Vite - Fast build tool
  • Tailwind CSS - Utility-first CSS framework
  • Apollo Client - GraphQL data management (architecture support)
  • Date-fns - Date manipulation library

πŸš€ Quick Start

Install Dependencies

npm install
# or
yarn install
# or
pnpm install

Start Development Server

npm run dev
# or
yarn dev
# or
pnpm dev

Build for Production

npm run build
# or
yarn build
# or
pnpm build

πŸ“ Project Structure

src/
β”œβ”€β”€ components/          # React components
β”‚   β”œβ”€β”€ NounImage.tsx       # Noun image component
β”‚   β”œβ”€β”€ AuctionCountdown.tsx # Auction countdown
β”‚   β”œβ”€β”€ CurrentAuction.tsx   # Current auction display
β”‚   β”œβ”€β”€ HistoricalGallery.tsx # Historical gallery
β”‚   β”œβ”€β”€ AuctionCard.tsx     # Auction card
β”‚   β”œβ”€β”€ BidHistory.tsx      # Bid history
β”‚   └── LoadingSpinner.tsx  # Loading states
β”œβ”€β”€ hooks/               # Custom hooks
β”‚   └── useAuctionData.ts   # Auction data hooks
β”œβ”€β”€ lib/                 # Utility libraries
β”‚   β”œβ”€β”€ constants.ts        # Constants configuration
β”‚   β”œβ”€β”€ graphql.ts         # GraphQL queries
β”‚   └── utils.ts           # Utility functions
β”œβ”€β”€ types/               # Type definitions
β”‚   └── index.ts           # Core types
└── App.tsx              # Main application component

🎨 Design Features

Visual Design

  • Nouns Brand Colors: Using official yellow, red, blue, green
  • Gradient Background: Cool/Warm dual-color gradient background
  • Card-based Layout: Modern card design
  • Pixel Art Support: Dedicated CSS classes for pixel art rendering

Interactive Experience

  • Real-time Updates: Simulated WebSocket real-time data updates
  • Animation Effects: Card hover, loading animations, etc.
  • Responsive Design: Perfect adaptation for mobile and desktop
  • Loading States: Graceful skeleton loading effects

πŸ“Š Data Simulation

Since this is a demonstration project, it uses simulated data:

Current Auction

  • Dynamically generated active auction
  • Simulated real-time bid updates
  • Real countdown logic

Historical Data

  • 5 simulated historical auctions
  • Randomly generated bid records
  • Real timestamps and block information

Noun Images

  • Seed-based SVG generation
  • 5 traits: background, body, accessory, head, glasses
  • Simplified pixel art rendering

πŸ”§ Configuration Options

Network Configuration (src/lib/constants.ts)

export const CURRENT_NETWORK = NETWORKS.MAINNET; // Currently using mainnet

UI Configuration

export const UI = {
  GALLERY_SIZE: 5,                    // Gallery display count
  COUNTDOWN_UPDATE_INTERVAL: 1000,    // Countdown update interval
  AUCTION_QUERY_INTERVAL: 30000,      // Data query interval
};

🎯 Project Highlights

βœ… Fully Meets Requirements

  • βœ… Display today's live auction countdown
  • βœ… Render gallery of 5 historical Nouns
  • βœ… Show winning bid history
  • βœ… Real-time data updates

πŸš€ Technical Highlights

  • TypeScript Support: Complete type safety
  • Modular Design: Reusable component architecture
  • Performance Optimization: Reasonable state management and update strategies
  • Error Handling: Complete error boundaries and fallback strategies

🎨 User Experience

  • Intuitive Interface: Clear information hierarchy
  • Real-time Feedback: Dynamic status updates
  • Mobile Friendly: Responsive design
  • Loading Optimization: Graceful loading states

πŸ”— Future Extensions

Real Data Integration

  • Connect to official NounsDAO subgraph
  • Implement WebSocket real-time updates
  • Add Web3 wallet connectivity

Feature Enhancements

  • Auction participation functionality
  • Advanced filtering and search
  • Data export features
  • Price trend charts

πŸ“ Development Notes

This project is a practical application for Course 3, demonstrating all technologies learned from Units 3.1-3.5:

  1. API Architecture - Modular data query design
  2. Indexing System - Simulating Ponder.sh data structures
  3. Real-time Queries - WebSocket simulation and state management
  4. Historical Queries - Pagination and batch data processing
  5. Image System - Noun SVG generation and caching

🀝 Contributing

This is an educational project. Suggestions for improvements and feature extensions are welcome!

πŸ“„ License

MIT License - Feel free to use this project for learning and development purposes.

πŸ”— Links

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors