A little cooking recipes website
Find a file
2025-02-08 22:31:38 +01:00
.cargo Replace Rusqlite by Sqlx and Actix by Axum (A lot of changes) 2024-11-03 10:13:31 +01:00
backend Calendar is now displayed on home page and recipes can be scheduled without being logged 2025-02-08 22:31:38 +01:00
common Calendar is now displayed on home page and recipes can be scheduled without being logged 2025-02-08 22:31:38 +01:00
doc WIP... 2023-04-10 09:35:10 +02:00
frontend Calendar is now displayed on home page and recipes can be scheduled without being logged 2025-02-08 22:31:38 +01:00
.gitignore Avoid to commit sass cache 2025-01-17 08:05:00 +01:00
Cargo.lock Calendar is now displayed on home page and recipes can be scheduled without being logged 2025-02-08 22:31:38 +01:00
Cargo.toml Steps can now be ordered (via drag and drop) 2025-01-15 01:37:49 +01:00
check_cargo_dependencies_upgrade.nu Replace Rusqlite by Sqlx and Actix by Axum (A lot of changes) 2024-11-03 10:13:31 +01:00
deploy.nu Translation (WIP) 2025-01-05 22:38:46 +01:00
README.md Rewrite README + use lettre crate to validate email address instead of regex 2025-01-16 23:09:06 +01:00
TODO.md Calendar (WIP) 2025-01-29 14:37:25 +01:00

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/ wasm-pack: https://github.com/rustwasm/wasm-pack wasm-opt: $> cargo install wasm-opt

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

Useful URLs

Useful tools

Benchmarking: https://crates.io/crates/oha HTTP API tool: https://www.usebruno.com/ GUI Database client: https://dbeaver.io/