Skip to content

do-2k25-28/do-board

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
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
planning Weekly schedule

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.


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

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors