# Bridge Controller

Bridge Controller is the central application that provides means to customize and configure other services (emulated interfaces) using a GUI.

## Usage

- Using a terminal window, launch a `bridge-controller` instance
- An icon will appear in the trace menu. To display the window, right-click on the icon and select `Show`

### Notes

- _localhost controller certificate is in `~/Desktop/meesign-server/keys/meesign-ca-cert.pem`_
- _`meesign.crocs.fi.muni.cz` controller certificate can be downloaded from the official [MeeSign website](https://meesign.crocs.fi.muni.cz/meesign-ca-cert.pem)_
- _WebAuthn and U2F must be tested using the provided Chrome browser_
- _because of the incomplete installation scripts, the current-user must be able to use passwordless
  sudo. This requirement will be dropped by proper udev rules._

## Installation

### Debian-Based Distributions

_already installed in Bridge Box_

1. Install the bridge-controller package

### All Linux-Based Distributions

- The application can be run using a built AppImage file.

## Build

Folder _.devcontainer_ contains a configuration for an environment with all the build dependencies. Devcontainers are explained in the main README file.

### Build Requirements

_(Already installed in the devcontainer)_

- [tauri prerequisites](https://tauri.app/v1/guides/getting-started/prerequisites/)
- [npm, Node.js](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm)
- [rust](https://www.rust-lang.org/tools/install)
- [protocol buffer compiler](https://grpc.io/docs/protoc-installation/)

### Development Build

- Launch a development server. The setup watches all files and reflects the changes on the fly
  ```bash
  npm run tauri dev
  ```

### Production Build

- Create a production build
  ```bash
  npm run tauri build
  ```
- The build is located in the `src-tauri/target/release/` directory
