Skip to content

Jacobbishopxy/minifigures

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MiniFigures

A collection of graphs, which uses gRPC for communication, Rust (Tonic) for the backend server and React (protobuf-ts) for the frontend.

Tech stack:

Quick Start

  1. Copy your own CSV data into the ./data directory, see Data for the required schema.

  2. Run data server by make dev-srv

  3. Define your own ./viz/.env file (see ./viz/.template.env)

  4. Run web server by make init-dev-viz

Structure

Backend - Srv

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

Frontend - Viz

Dependencies for gRPC:

yarn add @protobuf-ts/plugin @protobuf-ts/grpcweb-transport

Use case please see protobuf-ts

Data

  • 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