From 41aaad9927375d129ab7ef3ad43e103d65f5484b Mon Sep 17 00:00:00 2001 From: Youwen Wu Date: Sat, 9 Mar 2024 23:33:32 -0800 Subject: [PATCH 1/8] chore: update package.json name --- client/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/package.json b/client/package.json index 4b054fa..1e94526 100644 --- a/client/package.json +++ b/client/package.json @@ -1,5 +1,5 @@ { - "name": "-client", + "name": "jankboard", "private": true, "version": "0.0.0", "type": "module", From 52e33e2370a2aec63e7b3838c7bb3ab1197c043e Mon Sep 17 00:00:00 2001 From: Youwen Wu Date: Sun, 10 Mar 2024 00:36:19 -0800 Subject: [PATCH 2/8] docs(readme): overhauled description and installation steps --- README.md | 117 +++++++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 94 insertions(+), 23 deletions(-) diff --git a/README.md b/README.md index 8f78891..162e170 100644 --- a/README.md +++ b/README.md @@ -1,38 +1,106 @@ # Jankboard 2 [![maintainability status](https://api.codeclimate.com/v1/badges/4bedd567dbf60ec87164/maintainability)](https://codeclimate.com/repos/65dfbdc904f9ed00bbf381c8/maintainability) +![build](https://github.com/Team-1280/Jankboard-2/actions/workflows/main.yml/badge.svg) +![build all platforms](https://github.com/Team-1280/Jankboard-2/actions/workflows/publish-all.yml/badge.svg) -A remastered version of the original Jankboard, with a focus on minimizing the Jank portion. Designed from the ground up to be easy to maintain and extend, unlike the original. -The frontend is powered by Svelte 4 (unfortunately, we had to drop support for the bleeding edge Svelte 5 due to lack of Vite support). -This project is closed source (for now) and licensed under a modified BSD 3.0 license. +Team 1280's custom, powerful, and opinionated dashboard for controlling FRC +Robots, built with [Svelte](https://svelte.dev/) and +[TypeScript](https://www.typescriptlang.org/), and powered by +[Rust (Tauri)](https://tauri.app/). + +Unlike Shuffleboard, which attempts to provide an unopinionated "blank slate" +with an easy to configure and modular environment for displaying robot data, +Jankboard 2 is purpose built for Team 1280's Swerve drivebase robots and their +needs. It's tightly integrated with our proprietary robot features, like +collision warning and detection, and displays robot drive modes. + +The UI is reminiscient of and inspired by dashboards designed by car +manufacturers, making it easy for the driver to get the information they need at +a glance, without squinting at Shuffleboard's tiny and ugly UIs. It even +includes a full 3D robot visualization, synced directly with the robot's +movements in real life. + +Even though the dashboard's layout and design are highly opinionated and not +meant to be heavily modular, features can still be easily extended via a drop-in +app system which supports easy drop-in app integration. Jankboard 2 ships with a +few apps by default, featuring a camera feed, robot settings configurator, and +even a music player and games. ## Installation guide -We recommend installing the latest stable release binaries from [our release page](https://github.com/Team-1280/Jankboard-2/releases/), if you're just looking to run the Jankboard. Alternatively, if you can't find release binaries for your system, -follow the directions below in the **For developers** section to build it from source. +We recommend installing the latest stable release binaries from +[our release page](https://github.com/Team-1280/Jankboard-2/releases/), if +you're just looking to run the Jankboard. Alternatively, if you can't find +release binaries for your system, follow the directions below in the +[For developers](#for-developers) section to build it from source. We will +periodically update the releases with new builds when we come out with stable +versions, and we follow [semantic versioning](https://semver.org/). + +## A brief footnote on the name "Jankboard 2" + +The name "Jankboard" comes from Team 1280's original attempt at creating a +custom dashboard. Though it looked and functioned superficially similar to +Jankboard 2, it was not designed with maintainability in mind and became +exceptionally difficult to extend and develop as the codebase became bloated. +Jankboard 2 is a version redesigned from the ground up with the goal of easy +maintainability and richer features. It contains both a completely rewritten +frontend and backend, which have been improved in almost every possible way. You +can view the original version at +[its archived repository.](https://github.com/Team-1280/Jankboard-Super-Jank/tree/f42715f5ae1897e95ef15103b16ba6e764d2c0be) ## For developers -If you would like to contribute to Jankboard 2, there's only a few simple steps to get the development build up and running. +If you would like to contribute to Jankboard 2, there's only a few simple steps +to get the development build up and running. ### Prerequisites -- Rust and `cargo`. Check the [Rust docs](https://www.rust-lang.org/learn) for more information. We recommend you install Rust using `rustup`. Keep in mind that this is ONLY necessary for development, release binaries do not require Rust. -- NodeJS and `npm`, for installing dependencies and the `vite` development server. -- If you would like the install the (deprecated) Python backend, you will need to install the `poetry` package manager. +- Rust and `cargo`. Check the [Rust docs](https://www.rust-lang.org/learn) for + more information. We recommend you install Rust using `rustup`. Keep in mind + that this is ONLY necessary for development, release binaries do not require + Rust. +- `pnpm`, for installing dependencies and the `vite` development server. +- Ideally, NodeJS, but it's technically not required as `pnpm` brings its own + node binary. ### Installation steps -1. Clone the repository. The `app` folder contains most of the (deprecated) Python code that powers the telemetry. The `client` folder contains the code for the desktop app. The `client/src-tauri` contains the Rust source code for the backend that interfaces with the robot via Network Tables. The python backend in `app` is currently being deprecated in favor of a Rust backend. If you need to run it for any reason, check the section below (**Troubleshooting common issues**). -2. `cd` into the `client` folder. The configuration files and `package.json`, as well as project code for the desktop app are all stored here. To install dependencies, simply run `npm i`. -3. To run the desktop app in developer mode (with automatic hot stateful reload and other useful features like error reporting), make sure you're in the `client` directory and run `npm run tauri dev`. This will install and build the Rust dependencies via `cargo` and initialize the `vite` development server for the frontend. Note that since this is basically just running the `vite` development server and then connecting the Tauri webview to it, there may be slightly inconsistent behavior in dev mode versus production mode. -4. To create a production binary, run `npm run tauri build`. Tauri cross-compilation is still in beta, so you should generally try to build targeting the same OS you're currently running. Check [the Tauri docs](https://tauri.app/v1/guides/building/) for more information. +1. Clone the repository. The `client` folder contains the vast majority of the + source code for the desktop app. +2. `cd` into the `client` folder. The configuration files and `package.json`, + This is where stuff like `package.json` and configuration files for our + various tooling are housed. The `client/src-tauri` directory contains the + Rust source code and `cargo` configuration files for the backend that + interfaces with the robot via Network Tables. +3. Run `pnpm install` to install dependencies. +4. To run the desktop app in developer mode (with automatic hot stateful reload + and other useful features like error reporting), make sure you're in the + `client` directory and run `pnpm run tauri dev`. This will install and build + the Rust dependencies via `cargo` and initialize the `vite` development + server for the frontend. Note that since this is basically just running the + `vite` development server and then connecting the Tauri webview to it, there + may be slightly inconsistent behavior in dev mode versus production mode. +5. To create a production binary, run `npm run tauri build`. Tauri + cross-compilation is still in beta, so you should generally try to build + targeting the same OS you're currently running. Check + [the Tauri docs](https://tauri.app/v1/guides/building/) for more information. + We also have some Github Actions set up to automatically compile a production + build for all platforms, but this is expensive (uses over 30 minutes of our + quota), and should only be used for publishing new major releases. ## Troubleshooting common issues -- If you're experiencing issues with TypeScript type checking or dependency resolution, try opening your editor directly in the `client` directory so it picks up the `tsconfig.json` and uses the project's own TypeScript language server. -- If you don't have access to a development environment that supports running standalone executables (eg. Github Codespaces), you can try running `npm run dev` instead of `npm run tauri dev`, which will open a development server at `localhost:5173` with the frontend running in the web. However, app behavior may be inconsistent and you will not get any features from the Rust backend. -- If for some reason you need to install and use the Python backend, run `poetry install --no-root` in the root directory of the project to install dependencies. You can start the server with `poetry run flask --app app/server.py run --host localhost --port 1280` (it must be running at port `1280` for the frontend to detect it), and it only works when the frontend is running in development mode. +- If you're experiencing issues with TypeScript type checking or dependency + resolution, try opening your editor directly in the `client` directory so it + picks up the `tsconfig.json` and uses the project's own TypeScript language + server. +- If you don't have access to a development environment that supports running + standalone executables (eg. Github Codespaces), you can try running + `npm run dev` instead of `npm run tauri dev`, which will open a development + server at `localhost:5173` with the frontend running in the web. However, app + behavior may be inconsistent and you will not get any features from the Rust + backend. ## Current progress and improvements over (original) Jankboard @@ -40,17 +108,20 @@ If you would like to contribute to Jankboard 2, there's only a few simple steps - Toast and audio cue system is much more robust - Transitions added almost everywhere to make things smoother - Tauri app created successfully, currently still using Flask backend -- Visualization vastly improved with Threlte (Three.js) powered 3D robot simulation -- Robot model ported successfully via massive optimization through polygon decimation -- Added settings app with options to disable certain features and developer tools for testing +- Visualization vastly improved with Threlte (Three.js) powered 3D robot + simulation +- Robot model ported successfully via massive optimization through polygon + decimation +- Added settings app with options to disable certain features and developer + tools for testing +- Created dynamic voice prompt system to support new languages very easily +- Overhaul backend in Rust +- Overhaul visualization (especially camera) +- Added Vlad's voice lines (AT LAST) ## TODO - Camera cutout overlay - Overhaul audio player system -- Overhaul visualization (especially camera) -- Overhaul backend in Rust - Further integrate telemetry (like GPWS, collision warning, etc) - Finish re-creating / adding various voice alerts and sequences -- Create dynamic voice prompt system to support new languages very easily -- Add dynamic voice prompt fallback to support incremental voice prompt migration From d4468953fbafa4c590390e5c39f8e377cf6045aa Mon Sep 17 00:00:00 2001 From: Youwen Wu Date: Sun, 10 Mar 2024 00:41:53 -0800 Subject: [PATCH 3/8] docs: add comparison of jankboard to shuffleboard --- README.md | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 162e170..1c71551 100644 --- a/README.md +++ b/README.md @@ -15,11 +15,13 @@ Jankboard 2 is purpose built for Team 1280's Swerve drivebase robots and their needs. It's tightly integrated with our proprietary robot features, like collision warning and detection, and displays robot drive modes. -The UI is reminiscient of and inspired by dashboards designed by car -manufacturers, making it easy for the driver to get the information they need at -a glance, without squinting at Shuffleboard's tiny and ugly UIs. It even -includes a full 3D robot visualization, synced directly with the robot's -movements in real life. +Shuffleboard, while easy to set up, lacks the fine-grained adjustments and +customization which is afforded by a fully custom solution. The UI looks +outdated and is quite ugly. In stark contrast, Jankboard's UI is reminiscient of +and inspired by dashboards designed by car manufacturers, making it easy for the +driver to get the information they need at a glance, without squinting at +Shuffleboard's tiny and ugly UIs. It even includes a full 3D robot +visualization, synced directly with the robot's movements in real life. Even though the dashboard's layout and design are highly opinionated and not meant to be heavily modular, features can still be easily extended via a drop-in From 57c1328079c55762c85b7c2551c4534d6c536bd0 Mon Sep 17 00:00:00 2001 From: Youwen Wu <38934577+couscousdude@users.noreply.github.com> Date: Sun, 10 Mar 2024 00:44:23 -0800 Subject: [PATCH 4/8] docs: fix grammar --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 1c71551..909ea02 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ needs. It's tightly integrated with our proprietary robot features, like collision warning and detection, and displays robot drive modes. Shuffleboard, while easy to set up, lacks the fine-grained adjustments and -customization which is afforded by a fully custom solution. The UI looks +customization which are afforded by a fully custom solution. The UI looks outdated and is quite ugly. In stark contrast, Jankboard's UI is reminiscient of and inspired by dashboards designed by car manufacturers, making it easy for the driver to get the information they need at a glance, without squinting at From 037906609fb1b6e2e29e54dd08942e1ce0ad0482 Mon Sep 17 00:00:00 2001 From: Youwen Wu <38934577+couscousdude@users.noreply.github.com> Date: Sun, 10 Mar 2024 00:45:44 -0800 Subject: [PATCH 5/8] docs: change all references of npm to pnpm --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 909ea02..f344a06 100644 --- a/README.md +++ b/README.md @@ -83,7 +83,7 @@ to get the development build up and running. server for the frontend. Note that since this is basically just running the `vite` development server and then connecting the Tauri webview to it, there may be slightly inconsistent behavior in dev mode versus production mode. -5. To create a production binary, run `npm run tauri build`. Tauri +5. To create a production binary, run `pnpm run tauri build`. Tauri cross-compilation is still in beta, so you should generally try to build targeting the same OS you're currently running. Check [the Tauri docs](https://tauri.app/v1/guides/building/) for more information. @@ -99,7 +99,7 @@ to get the development build up and running. server. - If you don't have access to a development environment that supports running standalone executables (eg. Github Codespaces), you can try running - `npm run dev` instead of `npm run tauri dev`, which will open a development + `pnpm run dev` instead of `pnpm run tauri dev`, which will open a development server at `localhost:5173` with the frontend running in the web. However, app behavior may be inconsistent and you will not get any features from the Rust backend. From 1974ea56039bdd045361ee18833a637e1e06f434 Mon Sep 17 00:00:00 2001 From: Youwen Wu Date: Sun, 10 Mar 2024 00:50:12 -0800 Subject: [PATCH 6/8] style: fix ordered list spacing --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index 1c71551..2a74bab 100644 --- a/README.md +++ b/README.md @@ -70,12 +70,14 @@ to get the development build up and running. 1. Clone the repository. The `client` folder contains the vast majority of the source code for the desktop app. + 2. `cd` into the `client` folder. The configuration files and `package.json`, This is where stuff like `package.json` and configuration files for our various tooling are housed. The `client/src-tauri` directory contains the Rust source code and `cargo` configuration files for the backend that interfaces with the robot via Network Tables. 3. Run `pnpm install` to install dependencies. + 4. To run the desktop app in developer mode (with automatic hot stateful reload and other useful features like error reporting), make sure you're in the `client` directory and run `pnpm run tauri dev`. This will install and build @@ -83,6 +85,7 @@ to get the development build up and running. server for the frontend. Note that since this is basically just running the `vite` development server and then connecting the Tauri webview to it, there may be slightly inconsistent behavior in dev mode versus production mode. + 5. To create a production binary, run `npm run tauri build`. Tauri cross-compilation is still in beta, so you should generally try to build targeting the same OS you're currently running. Check From 190cb61a50feb588d706498872deff2ac7088f8f Mon Sep 17 00:00:00 2001 From: Youwen Wu Date: Sun, 10 Mar 2024 00:51:45 -0800 Subject: [PATCH 7/8] docs: change npm reference to pnpm --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 36b0fbc..ae2067e 100644 --- a/README.md +++ b/README.md @@ -87,7 +87,7 @@ to get the development build up and running. may be slightly inconsistent behavior in dev mode versus production mode. 5. To create a production binary, run `pnpm run tauri build`. Tauri -6. To create a production binary, run `npm run tauri build`. Tauri +6. To create a production binary, run `pnpm run tauri build`. Tauri cross-compilation is still in beta, so you should generally try to build targeting the same OS you're currently running. Check [the Tauri docs](https://tauri.app/v1/guides/building/) for more information. From 69ea03b39914c1e08c1dfa23ba7adad35953a873 Mon Sep 17 00:00:00 2001 From: Youwen Wu Date: Sun, 10 Mar 2024 00:54:58 -0800 Subject: [PATCH 8/8] style: revert ordered list spacing, codeclimate dumb --- README.md | 3 --- 1 file changed, 3 deletions(-) diff --git a/README.md b/README.md index ae2067e..5548f06 100644 --- a/README.md +++ b/README.md @@ -70,14 +70,12 @@ to get the development build up and running. 1. Clone the repository. The `client` folder contains the vast majority of the source code for the desktop app. - 2. `cd` into the `client` folder. The configuration files and `package.json`, This is where stuff like `package.json` and configuration files for our various tooling are housed. The `client/src-tauri` directory contains the Rust source code and `cargo` configuration files for the backend that interfaces with the robot via Network Tables. 3. Run `pnpm install` to install dependencies. - 4. To run the desktop app in developer mode (with automatic hot stateful reload and other useful features like error reporting), make sure you're in the `client` directory and run `pnpm run tauri dev`. This will install and build @@ -86,7 +84,6 @@ to get the development build up and running. `vite` development server and then connecting the Tauri webview to it, there may be slightly inconsistent behavior in dev mode versus production mode. 5. To create a production binary, run `pnpm run tauri build`. Tauri - 6. To create a production binary, run `pnpm run tauri build`. Tauri cross-compilation is still in beta, so you should generally try to build targeting the same OS you're currently running. Check