Git Product home page Git Product logo

libplanet-explorer-frontend's Introduction

Libplanet Explorer Frontend

This project is a user-facing web app, which renders data provided by a Libplanet Explorer server instance.

Package Management

This project uses yarn 3+ with PnP installs for package management. Please enable yarn as the following:

corepack enable

If you get an error message that looks like this: -bash: corepack: command not found please install corepack and try again:

npm i -g corepack
corepack enable

Also, if you are using an IDE, you might need to setup the editor SDK on yarn for the IDE to work properly. Refer to https://yarnpkg.com/getting-started/editor-sdks for further instruction.

Development (without server)

Copy .env.development (which contains the defaults) to .env.local, and open the copied .env.development file and change the NEXT_PUBLIC_GRAPHQL_ENDPOINTS list to refer to our demo server. The demo server URI can be found in the first line of DEPLOYMENTS.tsv.

Then, install the dependencies and build the app:

yarn
yarn dev

You can now see the web app from localhost:3000.

Development (with server)

First of all, you need to run the server. See the below repository and then follow the instruction in its README:

https://github.com/planetarium/libplanet-explorer

If you are sure that your server is ready (check localhost:5000) copy .env.development to .env.local and build the app:

yarn
yarn dev

You can now see the web app from localhost:3000.

Production

Make a .env.local configuration and then build:

yarn
yarn build
yarn export

libplanet-explorer-frontend's People

Contributors

aioo avatar area363 avatar aucch avatar baumstern avatar channprj avatar dahlia avatar earlbread avatar greymistcube avatar ipdae avatar item4 avatar jckdotim avatar kanghyojun avatar kmjayadeep avatar limebell avatar longfin avatar lqez avatar maxstalker avatar minhoryang avatar moreal avatar mrbartrns avatar mu-hun avatar oaroomy avatar qria avatar riemannulus avatar tkiapril avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

libplanet-explorer-frontend's Issues

Run faster in Docker

We can run this project as docker thanks to #18. However, it takes time to run because the image runs npm run dev every time. It would be better to build the static files when making the docker image and serve it when running the image.

Display block interval

Currently explorer shows average of recent blocks, but interval for each block is not shown. It will be great if the time spent for mining each block is shown.

Split installing dependencies and codegen at `install` phase.

{
  "scripts": {
    "install": "npm run codegen",
  },
}

will be fired when npm install.

It causes 2 problems:

  1. (Related with #6) codegen.yml (and src/*.graqhql) required at npm install phase.
  2. (Related with #6) If src/*.graphql changes, npm install re-run (and expected to take too much time)

Improve User Interface visibility

Motivation

I felt that the visibility was relatively low compared to other blockchain explorers. It seems that we should reach the level of other services that will be visited by ordinary users in the future through the Nine Chronicle Launcher.

Screen_Shot_2020-08-04_at_2 05 42_PM

Reference service

Goal to solve

Main page

Screen_Shot_2020-08-04_at_12 18 55_PM

  • Increase the width of the Transaction column. it is difficult to see if the number of two digits exceeds.
  • Increase the width of the index column. Same reason as below item.
  • Removed difficulty column. It is not helpful to identify a specific block.

Screen_Shot_2020-08-04_at_12 19 15_PM

  • Adding a UI to show a transaction list. like upper screenshot.

Blocks and Transactions page

  • Show the block and transaction informations as a table.

Transaction page

  • Show the action like below code block.
{
  "values": {
    "foods": [],
    "worldId": "1",
    "stageId": "11",
    "weeklyArenaAddress": "cv1HYOuUly92BmrJTeWJteY7W+o=",
    "costumes": [],
    "equipments": [
      "X6PtkJOhrE220ugX36vV4A==",
      "lh8uTHK4XkarIIlD+slRyQ==",
      "RT/E96KgPESUKFcczf+90Q=="
    ],
    "id": "KUk/GU9zDke/jlPtTYf1qw==",
    "avatarAddress": "2Q39HkxyaoJSRceRTzVFTPBIs8Q="
  },
  "type_id": "hack_and_slash"
}

InvolvedAddress does not work correctly

In account page, there is a window for displaying transactions which include account in its updatedAddress. But currently, it does not show corresponding transactions.

Add action type search

The search page may have txs matching the action type / blocks including the tx / accounts recently involved in tx including the action.

Search does not works well.

When I tried query some type of transactionhash and blockhash, sometimes explorer is freezed and show some error messages. e.g. I think It is exception error of React component.

스크린샷 2020-06-27 오후 8 24 08

Display hex values with monospace font

It's a visibility improvement suggestion in addition to #99. Now hex values in main pages use same font with other elements. It would be great if we use monospace font (i.e. consolas) for better visibility.

Make search bar to work

Although there is a top search bar, but it does not work at all. We should implement some search patterns, e.g.:

  • Block hash (ff64cab33a6bca4e7e7cdff4d654fccd617792d49510e8492b81af8d4bcad36d)
  • Block index (like #123?)
  • #10 TxID (ff64cab33a6bca4e7e7cdff4d654fccd617792d49510e8492b81af8d4bcad36d → this and block hash are both a SHA-256 hexadecimal digest; we need to distinguish two)
  • #9 Account address (0x561329477ECB990d16a0aB60067d81676d36EE69)

Add search suggestions dropdown

When the search string partially matches the formats (Block Hash, TxHash, Address etc.) A dropdown may show which kind of search string might be valid. It may have the inferred type on the right-aligned smaller grey text. It may also show that a search string is invalid if it does not fit any of the formats.

Dockerize

If we can run this project as docker container, that would be good for testing or deploy.

Default endpoint as main page

The main page should be an endpoint summary page with default endpoint as the main page.
There should be a mechanism to retrieve the default main page from a static file in the public/ directory.
The file should be generated on build/export, and measures to decide on a default endpoint on the environment variable must be provided.
A static endpoint given as a slug must be redirected to the top level pages if the given static endpoint is the default endpoint.

Search bar does not work.

When I enter txid into the search bar and press the enter, I got following error:

loader.js:195 Uncaught (in promise) Error: 404 page could not be found. Checkout https://www.gatsbyjs.org/docs/add-404-page/
    at loader.js:195

Support system action

Currently system actions are not correctly displayed in JSONTree. This must be fixed.

Account page

A page that lists transactions related to an account.

Display block miner address at the main page

Currently, only block index, hash, timestamp and tx count is shown in main page. Since there may exist numerous miners, it will be great to display miner address information.

Can't run dev:prettier

Can't use npm run dev:prettier because there are some errors like that.

/**/*.@(ts was unexpected at this time

Display count of transactions

In my thought, It will be better to display count of transactions if there are so many transactions or is nothing.

Let's see with screenshot. This is now.

image

But isn't it better if it became like below or another?

image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.