The local-first web-application platform for the decentralized web.
Look at the traditional centralized web-applications architecture vs. the local-first web-applications architecture:
The Laplace high-level architecture is shown in the diagram below:
Building Laplace requires the latest stable
and nightly
Rust toolchains, the wasm32
targets and cargo-make
and
wasm-bindgen
build tools.
To install Rust and its toolchains/targets via rustup, if it is not already installed, run:
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
source $HOME/.cargo/env
rustup toolchain install stable nightly
rustup target add wasm32-unknown-unknown --toolchain stable
rustup target add wasm32-wasi --toolchain nightly
To install cargo-make and wasm-bindgen, run:
cargo install --force cargo-make wasm-bindgen-cli
To build Laplace and all examples, run:
cargo make all
Or for a debug build, use the following command:
cargo make -p debug all
Run the Laplace server:
cargo make run
Or for a debug build:
cargo make -p debug run
Then visit http://localhost:8080. If you are running for the first time or the previous link
did not work, then visit http://localhost:8080/?access_token=24tpHRcbGKGYFGMYq66G3hfH8GQEYGTysXqiJyaCy9eR.
You can change the default port, access token and other settings by editing Laplace.toml
config file.
To check the project, use the following command:
cargo make check
To run all tests, use the following command:
cargo make test
To check and perform formatting, use the following commands:
cargo make checkfmt
cargo make fmt
To run clippy, use the following command:
cargo make clippy