Project

spin-sample-leptos-rs is a sample app based on leptos-rs + Fermyon Spin.

It uses leptos_oidc to connect with an auth0 OIDC Provider.

Setup

# install tooling
cargo install trunk just

Configuration for local deployment

Create the .env file

cp .env-sample .env

Edit the .env file:

  • SPIN_VARIABLE_AUTH0_CLIENT_ID: OIDC client_id token
  • SPIN_VARIABLE_AUTH0_DOMAIN: Auth0 Domain

Configuration for github action

Deploy github action automates deployment of anomaly4 to spin/fermyon hosting.

Setup the environment secrets:

  • FERMYON_CLOUD_TOKEN: Fermyon Cloud Token used to authenticate before spin deployment
  • AUTH0_CLIENT_ID: value of the auth0_client_id parameter
  • AUTH0_DOMAIN: value of the auth0_domain parameter

Start app locally with Spin on watch mode

To start the application

just watch

Start app locally with Spin

To start the application

just up

Start frontend locally with Trunk

To start the frontend

just serve