A simple ethereum block and transaction explorer. Since it doesn't use a database some operations are slow.
npm install
Edit src/config.js
to point to a ethereum node.
To execute in development mode
npm run dev
It uses nodemon
and create-react-app
script to
reload changes.
This may work but otherwise is not tested.
npm run build
npm run start
The project is divided in two parts backend and frontend.
- Backend is an Express application that serves a RESTful api.
- Frontend is a React application that consumes the backend api.
Both should be independent of each other, so it is easy to replace one without affecting the other.
The backend code is in src/
directory. Again it is split in
two pieces:
-
Routes Express routes that only have to deal with REST endpoints and parsing parameters. They should not dependant on Ethereum implementation details.
-
Lib Code responsible to interact with Ethereum node and processing api. It is an abstraction above
web3
library to return processed information ready to consume.
The frontend code is in client/src/
. It should be a standard
React application.
-
Components Reusable components that show varios Ethereum objects like transactions, blocks, accounts, etc.
-
Controllers Old code to handle async request from views. It is being passed out.
-
Lib Requests to interact with backend API.
-
Utils Miscelaneus utilities.
-
Views High levels blocks of the frontend.