Skip to content
This repository was archived by the owner on Nov 21, 2022. It is now read-only.

protiumx/fviz

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

fviz

Simple drone flight visualization monorepo.

Note: ideally we should split apps into repositories but for demo purposes this will be a monorepo containing rust and react apps.

Getting Started

Requirements

  • Cargo, Rust
  • NodeJS
  • Yarn
  • Docker

Build a package

make build package=<server|ui|simulator>

Run a package

make run package=<server|ui|simulator>

Test a package

make test package=<server|ui|simulator>

Folder structure

  • docs/: text and image assets for documentation
  • packages/:
    • fviz-server/: rust web server
    • fviz-ui/: react client app
    • fviz-simulator/: go project to simulate devices/actors

System communication

diagram

sequenceDiagram
    fviz-device->>+fviz-server: ws/status (postition, system health)
    fviz-server->>+fviz-ui: ws/device-status (postition, system health)
    fviz-server->>+fviz-device: ws/commands (land, new position)
    fviz-ui->>+fviz-server: ws/command (land, new position)
Loading

Format of WS messages

Each status update from a device/actor should be formatted as follow

<command> // note the line break
<lat> <lng> <alt>

Client handshake/registration

diagram

sequenceDiagram
    fviz-(ui|simulator)->>+fviz-server: HTTP POST /handshake { client: "fviz-ui-000" }
    fviz-server-->>fviz-(ui|simulator): HTTP { session_uuid: "18868b27-b1b6-4a09-998b-44ffa1daf114" }
    fviz-(ui|simulator)-->>fviz-server: HTTP POST /ws/{session_uuid}
    fviz-server-->>fviz-(ui|simulator): Connection: upgrade WS
Loading

Server

We relay on warp to handle http and ws requests. tokio is being used for multithreading.

Conventional commits

In this repository commits messages are formatted following conventional commits. You will need a linter running locally.

npm i -g @commitlint/cli @commitlint/config-conventional

To set git hooks for commit linting messages run

make init-git

TODO

  • Setup Rust CI
  • Setup React CI
  • SetReact Yarn 2
  • Setup ESLint
  • Setup Stylelint
  • Build docker images
  • Setup deployments
  • Setup renovate bot
  • Setup commit lint (ci or local)
  • Setup PR check (size, title, etc)
  • Add logs to server
  • Set Swagger documentation from warp handlers
  • Load configuration in memory
  • Setup server graceful shutdown
  • Setup postgres with docker compose
  • Setup rate limit and payload size

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors