Skip to content

Commit

Permalink
Merge pull request #10 from cryptape/release
Browse files Browse the repository at this point in the history
Release
  • Loading branch information
Keith-CY authored Jun 30, 2019
2 parents b2fbd3c + 0e2ce70 commit dceb18d
Show file tree
Hide file tree
Showing 3 changed files with 287 additions and 15 deletions.
149 changes: 149 additions & 0 deletions README-CN.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,149 @@
[![MIT](https://img.shields.io/badge/License-MIT-green.svg)](https://github.com/cryptape/microscope-v2)
[![CITAHub](https://img.shields.io/badge/made%20for-CITAHub-blue.svg)](https://www.citahub.com/)

English | [简体中文](./README-CN.md)

# 概述

Microscope的v2版本(Microscope提供了一个易于使用的用户界面来查询CITA链上信息)


# 关于 Microscope

Microscope是一款区块链浏览器,用[React](https://reactjs.org/)构建,用于查询CITA链上的数据。 它支持搜索区块,交易,帐户信息和调用智能合约方法。 它还可以与[ReBirth](https://github.com/cryptape/re-birth)一起使用,实现指定组合条件的区块交易列表查询,分析CITA的工作状态等高级功能。


# 功能特性

## v1功能继承

* 链网络状态信息、实时出块与实时交易信息、综合搜索、网络切换

* 区块列表、区块详情、ReBirth条件组合查询

* 交易列表、交易详情、ReBirth条件组合查询

* 账号余额、交易查询

* 合约在线查看与调用

* 统计图表

* 移动端兼容

## v2改进

* 简化调试开发环境

* 新增 rpc API/ rebirth API列表(支持在线编辑发送请求查看返回)

* 优化实时出块交易轮询,修正页面卡顿崩溃

* 修正优化高级搜索功能

* 优化区块与交易列表翻页

* 国际化文件依赖在线服务切换为本地JSON文件编辑


# 运行

* 环境准备

nodejs 11.10, yarn 1.13.0

* 下载仓库

```
git clone https://github.com/cryptape/microscope-v2/
```

* 安装依赖

```
yarn install
```

* 调试环境

```
yarn start
```

* 生产环境

```
yarn build // build 产生目录可直接拷贝到nginx等web服务器下
```


# 快速拥有一个micrscope

* Fork the microscope-v2, On https://github.com/cryptape/microscope-v2, 点击 Fork.

* Forking 完成后, 点击 Settings 并且 enable Github pages.

* 验证是否成功通过访问 https://YOUR_GITHUB_USERNAME.github.io/microscope-v2/ i.e. if your github name is cryptape then replace YOUR_GITHUB_USERNAME with cryptape.


# 目录结构


* /public --------------------- html与字体图片等静态资源目录

* /src/index.tsx -------------- 入口文件

* /src/layouts/app.tsx -------- 应用root, 设置页面布局,全局模态框,加载框,toast提示等

* /src/routes ---------------- 分页面总路由文件

* /src/locale ---------------- 国际化文件

* /src/layout/ --------------- 页面

* /src/layouts/home/ ---------- 首页

* /src/layouts/block/ --------- 区块列表、区块详情

* /src/layouts/transaction/ --- 交易列表、交易详情

* /src/layouts/address/ ------- 账户详情

* /src/layouts/static/ -------- 统计页面

* /src/layouts/api/ ----------- api列表与调用页面

* /src/layouts/error/ --------- 404错误页面

* /src/layouts/search/ -------- 搜索失败页面

* /src/layouts/common --------- 页面共享组件,交易列表分页表格、交易搜索模态框、区块搜索模态框

* /src/components/ ------------ 基础组件,header/content/footer/loading/tab/toast/modal

* /src/components/redux ------- redux相关的reduce/action/state

* /src/utils/ ----------------- 工具类

* /src/utils/dataAPI ---------- microscope的所有数据API,目前依赖rebirthAPI

* /src/utils/rebirthAPI ------- 封装兼容rebirth交互与citaSDK直接调用rpc交互

#库

* [react](https://reactjs.org/)

* [redux](https://github.com/reduxjs/redux)

* [react-router](https://github.com/ReactTraining/react-router)

* [bootstrap](https://github.com/twbs/bootstrap)

* [react-json-view](https://github.com/mac-s-g/react-json-view)

* [rc-pagination](https://github.com/react-component/pagination)

* [rc-select](https://github.com/react-component/select)

* [echarts-for-react](https://github.com/hustcc/echarts-for-react)

151 changes: 137 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,28 +1,151 @@
[![MIT](https://img.shields.io/badge/License-MIT-green.svg)](https://github.com/cryptape/microscope)
[![MIT](https://img.shields.io/badge/License-MIT-green.svg)](https://github.com/cryptape/microscope-v2)
[![CITAHub](https://img.shields.io/badge/made%20for-CITAHub-blue.svg)](https://www.citahub.com/)

English | [简体中文](./README-CN.md)

# Overview
this is repository of microscope v2

Microscope v2(Microscope provides an easy-to-use user interface to inspect CITA)


# About Microscope

Microscope is a blockchain explorer built with [React](https://reactjs.org/) for inspecting CITA. It supports searching block, transaction, account and invoking call method of smart contract. It also can work with [ReBirth](https://github.com/cryptape/re-birth) to display a list of blocks and transactions on specified conditions, or even analyzes CITA‘s working status.


# Features

## extend v1 features

* Chain Meta Info、RealTime Block and Transaction Info、Advance Search、Switch Network

* Block List、Block Detail、ReBirth Advance Query

* Transaction List、Transaction Detail、ReBirth Advance Query

* Address Account Blance、Transactions under the Address

* Contract Online Query and Call

* Static Chart

* Mobile Access

## v2 Improvement

* Simplify Development/Debug Environment

* Add RPC API/ ReBirth API List(edit sending-request and check response)

* Optimize real-time Block/Transaction Polling; Fixed Page Crash

* Fix/Optimize Advanced Search Function

* Optimize Block/Transaction List Pagination

* Add ERC20 Transactions Query

* Internationalization files from relying on online services to switch to local JSON files


# Run

* Prerequisite

nodejs 11.10, yarn 1.13.0

* clone the repo

```
git clone https://github.com/cryptape/microscope-v2/
```

* Install Dependencies

```
yarn install
```

* Develop Environment

```
yarn start
```

* Production Environment

```
yarn build // the output directory could be copied to nginx webServer
```


# Have one microscope quickly

* Fork the microscope-v2, On https://github.com/cryptape/microscope-v2, click Fork.

* Once forking completes, click Settings and enable Github pages.

* Verify that it works by visiting https://YOUR_GITHUB_USERNAME.github.io/microscope-v2/ i.e. if your github name is cryptape then replace YOUR_GITHUB_USERNAME with cryptape.


# Directory Structure


* /public --------------------- html/font/images assets

* /src/index.tsx -------------- entrance

* /src/layouts/app.tsx -------- App root, Page layout,global modal,loading,toast etc

* /src/routes ---------------- route of all pages

* /src/locale ---------------- i18 JSON files

* /src/layout/ --------------- Page

* /src/layouts/home/ ---------- Home page

* /src/layouts/block/ --------- Block List、Block Detail

* /src/layouts/transaction/ --- Transaction List、Transaction Detail

* /src/layouts/address/ ------- Address detail

* /src/layouts/static/ -------- Static Page

* /src/layouts/api/ ----------- API list and API call simulation

* /src/layouts/error/ --------- 404 Error Page

* /src/layouts/search/ -------- Search Failed Page

* /src/layouts/common --------- Transaction Table、Transaction Search Modal、Block Search Modal

* /src/components/ ------------ Basic Components,header/content/footer/loading/tab/toast/modal

* /src/components/redux ------- redux reduce/action/state

* /src/utils/ ----------------- utils

* /src/utils/dataAPI ---------- all data API,currently mainly dependent on ReBirthAPI file

* /src/utils/rebirthAPI ------- package ReBirth interaction and citaSDK direct rpc interaction

# Development
# library

Prerequisite: nodejs 11.10
* [react](https://reactjs.org/)

* [redux](https://github.com/reduxjs/redux)

``` shell
* [react-router](https://github.com/ReactTraining/react-router)

yarn
* [bootstrap](https://github.com/twbs/bootstrap)

yarn run start
* [react-json-view](https://github.com/mac-s-g/react-json-view)

yarn run build
* [rc-pagination](https://github.com/react-component/pagination)

yarn run deploy
* [rc-select](https://github.com/react-component/select)

```
* [echarts-for-react](https://github.com/hustcc/echarts-for-react)

# 3rd libaray
1. [react-json-view](https://github.com/mac-s-g/react-json-view)
2. [rc-pagination](https://github.com/react-component/pagination)
3. [rc-select](https://github.com/react-component/select)
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "Microscope",
"version": "2.0.0",
"description": "",
"description": "CITA blockchain explorer",
"engines": {
"node": ">= 10.14.2"
},
Expand Down

0 comments on commit dceb18d

Please sign in to comment.