This is the UI application of CaBr2. It is written in Angular with TypeScript.
It can be build in two different ways: As a Tauri desktop application and as web application with a WASM implementation.
In the src
folder is the Angular source code.
In the src-tauri
folder is the Tauri source code.
In the src-wasm
folder is the WASM glue code for the CaBr2 core logic.
Using Windows for development is not recommended, because it isn't tested and all of us use Linux so we most likely can't help you when you have problems.
It is recommended to use your system's package manager for each of these. For Windows you can use chocolatey.
- Install Rust
- Install Node.js and yarn
- Set up the Tauri development environment by following their guide (This is only needed if you want to build the desktop app).
- (optional) If you want to generate PDFs have a look at the wkhtmltopdf section.
Jump to the corresponding section to learn how to build this project:
Tauri Application
Standalone Web Application
Tauri is an alternative to Electron that enables us to build smaller apps and write a Rust backend. It is now out of beta, but because of wkhtmltopdf not everything works at the moment. We advise you to use the web app until we removed the dependency on wkhtmltopdf.
First you have to install all npm dependencies:
yarn install
To start the Angular application in development mode run:
yarn start
Wait until the above command finishes (it says something like: Angular Live Development Server is listening on localhost:4200
) and then run the following command to start Tauri in development mode:
yarn tauri:dev
To build the Tauri app in release mode you must first install the npm dependencies:
yarn install --force --frozen-lockfile
Then you just have to run:
yarn build:release
This step most likely fails on Linux. We are trying to fix the problem but haven't found a solution yet.
You first have to compile the wasm binary. For instructions how to do this have a look at the README in the src-wasm
folder.
Then install all npm dependencies:
yarn install
To start the Angular application in development mode run:
yarn start:web
When the command finishes you can open http://localhost:4200 in your Browser.
To build the Web app in release mode you must first install the npm dependencies:
yarn install --force --frozen-lockfile
Then you just have to run:
yarn build:web
We will soon(tm) switch to another method of generating PDFs
We generate the PDFs from html templates using wkhtmltopdf
, so you have to install
wkhtmltox
.