Skip to content
do-2k25-28Public

About

πŸ–₯️ A simple website to display informations on a TV.

Resources

Contributing

Stars

2 stars

Watchers

0 watching

Forks

Repository files navigation

do-board

Rust Dioxus WebAssembly License: MIT Issues PRs Welcome GitHub Stars

Open-source customizable dashboard for TV displays, written in Rust.

Overview

do-board is a web application designed to run on a television screen. It displays configurable widgets in real time: public transport schedules, promotion birthdays, embedded dashboards (Grafana, etc.), weather, planning, and more.

Architecture

Rust workspace with two crates and a shared types library:

do-board/
β”œβ”€β”€ backend/    # REST API (Axum, port 3000)
β”œβ”€β”€ frontend/   # SPA compiled to WebAssembly (Dioxus)
β”œβ”€β”€ shared/     # Types shared between backend and frontend
└── helm/       # Kubernetes Helm chart
Crate Role Technology
backend HTTP API, data aggregation Axum, Tokio
frontend Browser UI, widget rendering Dioxus, WASM
shared Common data types (Dashboard, Widget, …) Serde

Widgets

Type Description
weather Current weather conditions
transport Public transport schedules
birthdays Promotion birthdays
iframe Embedded external URL (Grafana, …)
clock Current time and date

Running

Docker (recommended)

The only prerequisite is Docker with Compose v2.

Development

Hot-reload on every file change: cargo-watch recompiles the backend in a few seconds, dx serve reloads the frontend WASM in the browser.

# First run - builds the dev images (takes ~10 minutes, cached afterwards)
docker compose -f docker-compose.dev.yml up --build

# Subsequent runs
docker compose -f docker-compose.dev.yml up
Service URL Reloads on change to…
Frontend http://localhost:8080 frontend/src/**, frontend/input.css
Backend http://localhost:3000 backend/src/**, shared/src/**

Production

Builds optimised release images (Rust binary + nginx serving the WASM bundle).

docker compose up --build
Service URL
Frontend http://localhost:80
Backend http://localhost:3000

Environment variables

Copy and edit before starting:

cp .env.example .env
Variable Default Description
ADMIN_EMAIL admin@example.com Email of the initial admin account
ADMIN_PASSWORD changeme Password of the initial admin account
JWT_SECRET change_me_in_production Secret used to sign JWT tokens - change this in production

The initial admin account is created automatically on first start if it does not already exist.


Kubernetes (Helm)

A Helm chart is provided in helm/do-board to deploy do-board on a Kubernetes cluster. It deploys:

  • a backend Deployment + Service (Axum API)
  • a frontend Deployment + Service (nginx serving the WASM bundle, reverse-proxying /api and /ws to the backend)
  • an optional Ingress exposing the frontend
  • a bundled PostgreSQL StatefulSet + Service (plain postgres image, can be disabled in favour of an external/managed database)

Images

Container images are built and pushed to the GitHub Container Registry by .github/workflows/docker.yml:

Trigger Tags pushed
Push to main latest, sha-<short-sha>
GitHub Release (vX.Y.Z) X.Y.Z, X.Y, X

Images: ghcr.io/do-2k25-28/do-board-backend and ghcr.io/do-2k25-28/do-board-frontend. If the packages are private, create an imagePullSecrets entry (see below) before installing the chart.

Prerequisites

  • A Kubernetes cluster and kubectl configured to reach it
  • Helm β‰₯ 3.8
  • An ingress controller (e.g. Traefik) if you want to enable the bundled Ingress

Install

cd helm/do-board

helm install do-board . \
  --namespace do-board --create-namespace \
  --set env.jwtSecret="$(openssl rand -hex 32)" \
  --set env.adminEmail=admin@example.com \
  --set env.adminPassword="$(openssl rand -hex 16)" \
  --set ingress.enabled=true \
  --set ingress.className=traefik \
  --set ingress.host=do-board.example.com

Without ingress.enabled, reach the app with:

kubectl port-forward -n do-board svc/do-board-frontend 8080:80

Key values

Value Default Description
backend.image.repository ghcr.io/do-2k25-28/do-board-backend Backend image
frontend.image.repository ghcr.io/do-2k25-28/do-board-frontend Frontend image
backend.image.tag / frontend.image.tag "" (β†’ .Chart.AppVersion, i.e. latest) Override to pin a release tag, e.g. 1.2.0 or sha-abcdef0
imagePullSecrets [] Names of secrets to pull private GHCR images
env.jwtSecret / env.adminEmail / env.adminPassword see values.yaml App credentials - override in production, or set existingSecret to a Secret you manage yourself
config.gtfsStaticUrl / config.gtfsRtUrl Montpellier TaM GTFS feeds Public transport widget data source
postgresql.enabled true Set to false to use an external database via externalDatabase.url
postgresql.persistence.size 4Gi Size of the PVC for the bundled PostgreSQL data volume
ingress.enabled false Expose the frontend through an Ingress

See helm/do-board/values.yaml for the full list, and run helm show values helm/do-board or helm template helm/do-board to inspect the rendered manifests before installing.

Upgrade / uninstall

helm upgrade do-board helm/do-board -n do-board -f my-values.yaml
helm uninstall do-board -n do-board

Manual (without Docker)

Requirements

  • Rust β‰₯ 1.80
  • Dioxus CLI - cargo install dioxus-cli
  • Tailwind CSS CLI - standalone binary, no Node.js required
  • wasm32-unknown-unknown target
  • A running PostgreSQL instance
rustup target add wasm32-unknown-unknown
cargo install dioxus-cli

# Tailwind CSS standalone binary (Linux x86_64)
curl -sL https://github.com/tailwindlabs/tailwindcss/releases/latest/download/tailwindcss-linux-x64 \
  -o ~/.local/bin/tailwindcss && chmod +x ~/.local/bin/tailwindcss

Backend

export DATABASE_URL=postgresql://user:password@localhost:5432/doboard
export ADMIN_EMAIL=admin@example.com
export ADMIN_PASSWORD=changeme
export JWT_SECRET=my_secret

cargo run -p backend
# API available at http://localhost:3000

Frontend

Two terminals running in parallel:

# Terminal 1 - Tailwind CSS (watch mode)
cd frontend
tailwindcss -i input.css -o assets/tailwind.css --watch

# Terminal 2 - Dioxus dev server
cd frontend
API_BASE=http://localhost:3000 dx serve
# UI available at http://localhost:8080

Star History

License

MIT - see LICENSE

About

πŸ–₯️ A simple website to display informations on a TV.

Resources

Contributing

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages