X-Git-Url: https://git.euphorik.ch/?p=recipes.git;a=blobdiff_plain;f=README.md;h=120c61003a6bb83586b93f26523f66a39955dd75;hp=5de09358a449518cb564e343eb6d9d6bbb362682;hb=HEAD;hpb=c951ba6d37d525f00c6fb92eb5ab72e1ae311791 diff --git a/README.md b/README.md index 5de0935..590a690 100644 --- a/README.md +++ b/README.md @@ -1,30 +1,65 @@ -# Use cases - -## Create a recipe -(A group is automatically created) - -## Create a groupe - -## Move a group - -## Delete a group - -## Create a step - -## Move a step - -## Delete a step - -# Technical - -## Useful URLs - -* Rust patterns : https://github.com/rust-unofficial/patterns/tree/master/patterns -* Rusqlite (SQLite) : https://docs.rs/rusqlite/0.20.0/rusqlite/ - -## How to develop - -Autoreload: https://actix.rs/docs/autoreload/ - - - +# Technical + +## Backend + +### Launch Axum + +In directory '/backend' type: + $> cargo run + +Then browse http://127.0.0.1:8082 (You need to compile the wasm file first, see section 'Frontend') + +At first launch the configuration file '/backend/conf.ron' is created. It contains the port the server will listen to and information about the SMTP server which will be used to send email when a user sign up or change its password. + +### Autoreload + +First install cargo watch: + $> cargo install cargo-watch + +In directory '/backend' type: + $> cargo watch -x run + + +## Frontend + +### Tools needed + +nushell: https://www.nushell.sh/ +trunk: https://trunkrs.dev + +### Compilation + +In directory '/frontend' type: + $> nu deploy.nu + +It will create the '/frontend/pkg' directory and copy the wasm file into '/backend/static'. +You can now refresh your browser to reload the wasm file. + +# How-to + +## How to install service on a Linux server + +As root: + +1. Copy '/doc/recipes.service' to '/lib/systemd/system/' +2. Enabled it: #> systemctl enable recipes +3. Launch it: #> systemctl start recipes + +## Cross compile for Raspberry PI on Windows + +* $> https://gnutoolchains.com/raspberry/ +* https://gnutoolchains.com/raspberry64/ + +# Useful URLs + +* Rust patterns: https://github.com/rust-unofficial/patterns +* Rust cheat Sheet: https://cheats.rs/ +* HTML Validation Service: https://validator.w3.org/ +* Site analysis: https://pagespeed.web.dev/ +* Open-Source UI: https://uiverse.io/ + +# Useful tools + +HTTP benchmarking and stress tool: https://crates.io/crates/oha +HTTP API tool: https://www.usebruno.com/ +GUI Database client: https://dbeaver.io/