Skip to content
Kevin Heleodoro edited this page Aug 26, 2024 · 1 revision

Neo Tokyo Lore Generator

Welcome to the Neo Tokyo Lore Generator repository!

The Neo Tokyo Lore Generator is an advanced application designed to generate unique backstories for NFTs within the Neo Tokyo universe. This project leverages blockchain data and smart contracts to provide users with detailed, lore-rich narratives based on their NFT attributes.

Overview

The Neo Tokyo Lore Generator pulls data from Ethereum-based NFTs and uses it to generate immersive backstories. This tool is perfect for NFT enthusiasts, collectors, and developers who want to add extra value to their NFTs by providing a detailed narrative that enhances the overall experience.

Key Features

  1. NFT Data Retrieval:

    • The application can retrieve detailed information about an NFT, including attributes and metadata.
    • It supports querying by both Ethereum addresses and specific token IDs.
  2. Backstory Generation:

    • Based on NFT metadata, the generator creates unique and contextually relevant backstories.
    • The generation process can handle various traits, such as "Role," "Season," and more, filtering out irrelevant ones.
  3. User Interaction:

    • Users can search for NFTs via Ethereum wallet addresses or token IDs.
    • A user-friendly interface that allows toggling between different search modes (e.g., Wallet or Token ID).
    • Mobile responsiveness with a toggleable hamburger menu for easy navigation on smaller screens.
  4. Image Handling:

    • The application can handle multiple image formats, including SVG and PNG.
    • It incorporates fallback mechanisms to ensure that if an image is unavailable, a placeholder or loader is shown until the correct image loads.
  5. Error Handling and Logging:

    • Comprehensive logging for debugging, particularly in development and local environments.
    • Error handling ensures that the user is informed if data retrieval or backstory generation fails.

Project Structure

  • Frontend:

    • The React.js-based user interface is responsible for rendering the search bar, dropdown menus, NFT cards, and other components.
    • The use of styled-components for dynamic and reusable styles ensures a consistent theme across the application.
  • Backend:

    • The backend interacts with Ethereum smart contracts and APIs to fetch NFT data.
    • Node.js and Express are used to handle requests, validation, and API integrations.

How It Works

  1. Search by Wallet or Token ID:

    • Users can input an Ethereum address or token ID to retrieve NFTs.
    • The search interface includes a dropdown to switch between search types and select additional parameters (e.g., series for token IDs).
  2. Lore Generation:

    • After retrieving NFT data, users can generate a backstory by clicking the "Who am I?" button.
    • The generated lore is displayed on the NFT card, giving life to each digital asset.

Getting Started

To get started with the Neo Tokyo Lore Generator:

  1. Clone the repository:

    git clone https://github.com/Kevin-Heleodoro/Neo-Tokyo-Lore-Generator.git
  2. Install Dependencies:

    • Backend
      cd backend
      npm install
    • Frontend
      cd frontend
      npm install
  3. Run the servers

    • Backend
      cd backend
      npm run dev
    • Frontend
      cd frontend
      npm start

Future Development

Expansion of Supported NFT Collections: Future updates will include support for more NFT collections beyond Neo Tokyo, providing more versatility and use cases.

Enhanced Lore Customization: Users may soon have the ability to customize certain aspects of the generated lore, adding another layer of personalization.

Code Snippets and Legacy Code

For developers who might find some of the removed or refactored code useful, check out our Legacy Code Snippets page. This page includes snippets that were removed during refactoring or optimization but may still provide value in specific scenarios. Contributing

We welcome contributions from the community. Whether you're fixing bugs, enhancing features, or adding new ones, your help is appreciated! Please review our Contribution Guidelines before submitting your pull requests. License

This homepage serves as the central hub for understanding the Neo Tokyo Lore Generator project. You can navigate to other sections using the links provided to dive deeper into the codebase, contributing guidelines, and more.