Skip to content

ereynier/Oval3-viewer

Repository files navigation

Contributors Forks Stargazers Issues MIT License LinkedIn


Logo

Oval3 Viewer

A Next.js web app that allows you to explore Oval3 cards by their owners, view their stats, game week score, and filter them based on various criteria.
Explore the docs »

View Website · Report Bug · Request Feature

Table of Contents
  1. About The Project
  2. Getting Started
  3. Usage
  4. Roadmap
  5. Contributing
  6. License
  7. Contact
  8. Acknowledgments

About The Project

Product Name Screen Shot

The web app is a simple way to explore the Oval3 cards by their owners. You can filter the cards by their stats, and see the cards' details by clicking on them. It use a JSON file to store the cards and owners datas created by the scripts in the ./scripts folder. Some datas can be wrong or missing due to the way the scripts are working. You can find a further explanation in this article: English / French.

(back to top)

Built With

  • Next
  • React
  • TailwindCSS
  • Viem
  • Prisma
  • PostgreSQL

(back to top)

Getting Started

To get a local copy up and running follow these simple steps.

Prerequisites

Installation

To run the app

  1. install the dependencies

    pnpm install
  2. Set the ENV variables

    cp .env.example .env.local

    Then fill the .env.local file with the required variables

  3. Run the development server

    pnpm next dev
  4. Open http://localhost:3000 with your browser to see the result.

In the ./scripts folder, you can find some scripts to get the cards by address and save them in a JSON file.

  1. ./scripts/GetOwners.ts will get the owners of the cards and save them in a JSON file one time.
    cd scripts
    tsc GetOwners.ts
    node GetOwners.js
    cp data.json ../utils/datas/owners.json
  2. ./scripts/TransferListener.ts will listen to the transfer events and save the cards in a JSON file every time a transfer event is detected. (It will update data.json, not owners.json)
    cd scripts
    tsc TransferListener.ts
    node TransferListener.js
  3. In .env.local set DATA_SOURCE to JSON.

The app can use a database to store the datas, you can find the scripts to fill the database in this repository: https://github.com/ereynier/oval3-Owners

  1. In .env.local set DATA_SOURCE to DB.

(back to top)

Usage

Go on the application URL and enter the address you want to check. You can also use the filters to find the cards you want to see.

Here's a short list of addresses with cards:

  • 0xBbBfc940ddF3222Cd01168D838dFA2cDe78947D3
  • 0xBDb1c31b8e8e61E85Bb5F3efD56e992e7E50af3e
  • 0x6a8319C56707a0d9E6F1e44cD277757aE5562835

For a more detailed example, check the demo video

(back to top)

Roadmap

See the open issues for a full list of proposed features (and known issues).

(back to top)

Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

(back to top)

License

Distributed under the MIT License. See LICENSE.txt for more information.

(back to top)

Contact

Estéban Reynier - @EstebanReynier - esteban@ereynier.me

Project Link: https://github.com/ereynier/Oval3-viewer

(back to top)

Acknowledgments

(back to top)