Development Workflow
Backend Setup
Section titled “Backend Setup”Before the first run, you need to set up the web app dependencies, database, Redis Docker containers, and create certificates:
# Install all workspace dependencies from the rootyarn install
# Create SSL certificates for local developmenttask backend:create-certs
# Start Docker containers for PostgreSQL and Redistask backend:compose-up
# Start the backend which inits the databasetask backend:dev
# If it is the first time you are running the backend, you need to add mock data to the database.# By default it adds `michael@dundermifflin.com` and `dwight@dundermifflin.com` users.task backend:add-mock-dataAfter the initial setup, start the backend with the local LiveKit server:
You can change the server’s configuration in the backend/env-files/.env.local file.
task dev-serverTauri App Development
Section titled “Tauri App Development”Then you can start the Tauri desktop application:
task app:devYou can get an authentication token with:
task backend:user-token EMAIL=michael@dundermifflin.comTo connect then you need to paste the generated token inside the Debug screen inside the app.
For debugging purposes, you can spawn a clone of the app:
task app:start-replica-appAnd generated a token for Dwight user with command:
task backend:user-token EMAIL=dwight@dundermifflin.comThen you can make Dwight call Michael.
Exposing Services to the Internet
Section titled “Exposing Services to the Internet”You can expose the backend and LiveKit server to the internet by creating a tunnel. There are multiple tools available for this; one popular option is cloudflared.
Example Cloudflared Configuration
Section titled “Example Cloudflared Configuration”Create a config.yml file with the following configuration:
tunnel: <tunnel-id>credentials-file: <path-to-credentials-file>
ingress: - hostname: <hostname> service: https://localhost:1926
- hostname: <livekit_hostname> service: ws://localhost:7880
- service: http_status:404This configuration will:
- Expose the backend API (running on port 1926) via HTTPS
- Expose the LiveKit server (running on port 7880) via WebSocket
- Return a 404 for any other requests
Don’t forget to update the server’s configuration in env-files/.env.local when you expose the services to the internet.
Then you have to set the VITE_API_BASE_URL environment variable before running the Tauri app.
Logging
Section titled “Logging”For the tauri app you can enable logging by setting the RUST_LOG environment variable.
The values are the same as the ones from env-logger
, which is what hopp_core is using.
For example you could run the app with:
RUST_LOG=info task app:devThe tauri backend when launches hopp_core forwards the log level to it.