Skip to content

sb-ncbr/dareg-lab

Repository files navigation

DAREG LAB Client

The repository contains the DAREG Lab Client application. The application is a desktop client for the DAREG API. It is built using Tauri and React.

Project structure

  • src-tauri - Tauri application source code
  • src - React application source code
  • public - Static files
  • testing - Testing utility for DAREG Lab Client file synchronization

Config

To configure the application, place a file named config.json in the application's config directory. The data directory is platform dependent. See bellow for platform specific config paths.

config.json

{
  "dareg_url": "{DAREG_API_URL}",
  "token": "{DEVICE_TOKEN}"
}
  • DAREG_API_URL - The URL of the DAREG API
  • DEVICE_TOKEN - The token of the device generated in administrator interface DAREG

Windows

C:\Users\{USER}\AppData\Roaming\com.davidkonecny.dareg-lab-client

MacOs

/Users/{USER}/Library/Application Support/com.davidkonecny.dareg-lab-client

Linux

/home/{USER}/.local/share/com.davidkonecny.dareg-lab-client

Development

To run the application in development mode, run the following commands in the project's root directory.

Prerequisites

The following prerequisites are required to run the application in development mode:

  • Node.js (v18.0.0 or later)
  • Yarn (v1.22.0 or later)
  • Rust (v1.60.0 or later)

Install dependencies

yarn install

Start the application

To start the application, run the following command in the project's root directory:

yarn tauri dev

Generating the DAREG API client

To generate the DAREG API client, run the following command in the root of the repository:

yarn gen:api

This command generates a TypeScript client to /src/api.ts for the DAREG API using the OpenAPI specification. The source for the OpenAPI specification can be configured in orval.config.ts file.

Testing

Frontend

To run the frontend tests, run the following command in the project's root directory:

yarn test

Backend

To run the backend tests, run the following command in the src-tauri directory:

cargo test

Testing utility

The testing utility is located in the testing directory. It is a Python script that can be used to test the DAREG Lab Client. The script can be used to generate files in a directory structure, modify files, and delete files. It can also compare files in a directory structure on OneData with files in a local directory. The documentation is located in the testing/README.md file.

Build and package the application

The application is built and packaged using GitHub Actions. The build artifacts can be found on Releases page.

Funding

EOSC CZ Logo


This project output was developed with financial contributions from the EOSC CZ initiative throught the project National Repository Platform for Research Data (CZ.02.01.01/00/23_014/0008787) funded by Programme Johannes Amos Comenius (P JAC) of the Ministry of Education, Youth and Sports of the Czech Republic (MEYS).


EU and MŠMT Logos

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •