A collection of graphs, which uses gRPC for communication, Rust (Tonic) for the backend server and React (protobuf-ts) for the frontend.
Tech stack:
-
Backend:
-
Frontend:
-
Vite: Frontend tooling
-
React: User interfaces
-
Protobuf-ts: Protobuf
-
Antd: UI components
-
ECharts: Visualization library
-
-
Copy your own CSV data into the
./data
directory, see Data for the required schema. -
Run data server by
make dev-srv
-
Define your own
./viz/.env
file (see./viz/.template.env
) -
Run web server by
make init-dev-viz
Dependencies for gRPC:
cargo add prost prost-types tonic tonic-web
Test case:
grpcurl -plaintext -import-path proto -proto kbar.proto 127.0.0.1:8001 kbar.KBar/GetSymbols
grpcurl -d '{"symbol": "000001.SH"}' -plaintext -import-path proto -proto kbar.proto 127.0.0.1:8001 kbar.KBar/GetKBar
Dependencies for gRPC:
yarn add @protobuf-ts/plugin @protobuf-ts/grpcweb-transport
Use case please see protobuf-ts
-
kbar
: proto file defined in here, and one must provide a CSV file (under./data
dir) with head:symbol,trade_date,pre_close,open_price,hight_price,low_price,close_price,change,pct_change,volume,amount