Tenis Rajec — tenisrajec.sk
Booking site for the tennis courts in Rajec. Visitors browse the weekly court calendar and an About page; the single admin manages courts, bookings and the About-page content.
Built with Loco, a web framework running on Rust.
Quick Start
cargo loco start
$ cargo loco start
Finished dev [unoptimized + debuginfo] target(s) in 21.63s
Running `target/debug/myapp start`
:
:
:
controller/app_routes.rs:203: [Middleware] Adding log trace id
▄ ▀
▀ ▄
▄ ▀ ▄ ▄ ▄▀
▄ ▀▄▄
▄ ▀ ▀ ▀▄▀█▄
▀█▄
▄▄▄▄▄▄▄ ▄▄▄▄▄▄▄▄▄ ▄▄▄▄▄▄▄▄▄▄▄ ▄▄▄▄▄▄▄▄▄ ▀▀█
██████ █████ ███ █████ ███ █████ ███ ▀█
██████ █████ ███ █████ ▀▀▀ █████ ███ ▄█▄
██████ █████ ███ █████ █████ ███ ████▄
██████ █████ ███ █████ ▄▄▄ █████ ███ █████
██████ █████ ███ ████ ███ █████ ███ ████▀
▀▀▀██▄ ▀▀▀▀▀▀▀▀▀▀ ▀▀▀▀▀▀▀▀▀▀ ▀▀▀▀▀▀▀▀▀▀ ██▀
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
https://loco.rs
environment: development
database: automigrate
logger: debug
compilation: debug
modes: server
listening on http://localhost:5150
Styling (CSS build)
The UI uses Tailwind CSS + daisyUI. Rather than the render-blocking Tailwind
Play CDN, the stylesheet is compiled ahead of time into a purged, minified
bundle at assets/static/css/app.css (served at /static/css/app.css).
One-time setup:
npm install
Rebuild the bundle after changing any class names in assets/views/**/*.html
or the theme config:
npm run build:css # one-off, minified
npm run watch:css # rebuild on save while developing templates
assets/static/css/app.css is committed, so a deploy needs no Node step — but
remember to rebuild and commit it whenever the templates change. The Tailwind
source lives in assets/css/tailwind.css; theme config is tailwind.config.js.
Deployment
Production runs as a single Docker container behind a Caddy reverse proxy. See DEPLOY.md for the full first-time setup. After that, a deploy is just:
git pull && make restart
Full Stack Serving
You can check your configuration to pick either frontend setup or server-side rendered template, and activate the relevant configuration sections.
Getting help
Check out a quick tour or the complete guide.