Files
service-aware-frontend/pkgs/ui/README.md
Luis-Hebendanz fba6dcb70a
All checks were successful
checks-impure / test (pull_request) Successful in 25s
checks / test (pull_request) Successful in 1m16s
Finished README for backend
2024-01-24 17:53:46 +01:00

1.5 KiB

Web UI

Dependency Management: We use the Nix package manager to manage dependencies and ensure reproducibility, making your development process more robust.

The files in src/api are autogenerated from the openapi.json. The openapi.json comes from the backend, from fastapi which autogenerates the openapi.json file from the python code.

We then use orval to generate typescript files to src/api

Build Development Web UI

To build the dev web ui with hotreloading

npm run dev

Build release Web UI

To build the release version execute

nix build .#ui

you can find the output in your current working directory at a symlink called result The actual web files served by the web server are located in result/lib/node_modules/clan-ui/out

You can also build it directly in you dev environment. Notice however that this will clutter your directory. The out directory is directly in you working dir.

npm run build

Development environment

The development environment created by nix develop or automatically by direnv is located at shell.nix. The shellHook variable executes bash code.

Updating dependencies

After changing dependencies with

npm <dep> i --package-lock-only

Update floco dependencies:

nix run github:aakropotkin/floco -- translate -pt -o ./nix/pdefs.nix

The prettier tailwind class sorting is not yet working properly with our devShell integration.

To sort classnames manually:

cd /clan-core/pkgs/ui/