Where the software delivery life cycle meets the life of cycling.
In separate terminals:
cd frontend && npm install && npm run dev
cargo run
Now navigate to http://localhost:3000.
npm
rust
A justfile
is provided. Install
Just and run just --list
for a list of
available commands.
Cykelvenner
is split into a distinct frontend and backend. Neither one knows
much about the other; the frontend lives in frontend/
and
simply knows that its generated assets (HTML pages, JavaScript files, CSS) will
be served by some backend, and that the backend will be available at /api/
.
Similarly, the backend simply serves the files in frontend/dist/
and is
blissfully unaware of the visual representation of the data it provides at
/api/
.
This decoupling allows using completely different languages, paradigms and tools for the job without worrying about one part of the system breaking the other. Additionally, a statically built frontend allows serving assets from a CDN, greatly optimizing time to first byte and massively reducing hosting complexity as the frontend can be hosted from anywhere (CORS permitting).
The user-facing parts of the application are built in HTML/TypeScript/CSS using Svelte, a frontend framework with a minimal footprint thanks to its compiler-based architecture. Svelte's compiler is invoked by SvelteKit, a toolkit for lean frontend development which also handles the bundling of assets and provides a hot-reloading dev server for local development. SvelteKit uses Vite under the hood but also provides a file-based routing solution.
The backend is built with Axum, a web framework designed for simplicity, modularity and ergonomics.
The application runs as a Heroku app with only a few lines of configuration in
.buildpacks
and Procfile
.
The application is an attempted marriage between the Twelve-Factor App and Jamstack. It aims for simplicity, efficiency and safety by leveraging performant, well-designed frameworks, libraries and platforms.
Svelte + TS + Vite template by dsegovia90
.
Licensed under either of Apache License, Version 2.0 or MIT license at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in this crate by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.