From 08586f0a7a7d00957f3b6c57ae4c9d45f9c3fd94 Mon Sep 17 00:00:00 2001 From: rm-dr <96270320+rm-dr@users.noreply.github.com> Date: Wed, 12 Nov 2025 13:59:22 -0800 Subject: [PATCH] README --- README.md | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..da8a608 --- /dev/null +++ b/README.md @@ -0,0 +1,22 @@ +[`utoipa`]: https://docs.rs/utoipa/latest/utoipa/ +[`axum`]: https://docs.rs/axum/latest/axum/ + +# Mark's webpage + +This is the source code behind [betalupi.com](https://betalupi.com), featuring a very efficient mini web framework written from scratch in Rust. It uses... +- [Axum](https://github.com/tokio-rs/axum) as an http server +- [Maud](https://maud.lambda.xyz/) for html templates +- [Grass](https://github.com/connorskees/grass) to parse and compile [sass](https://sass-lang.com/) +- [markdown-it](https://github.com/markdown-it-rust/markdown-it) to convert md to html + + +## Overview & Arch: +- [`bin/webpage`](./crates/bin/webpage/): Simple cli that starts `service-webpage` +- [`lib/libservice`](./crates/lib/libservice): Provides the `Service` trait. A service is a group of http routes with an optional [`utoipa`] schema. \ +This library decouples compiled binaries from the services they provide, and makes sure all services are self-contained. +- [`lib/page`](./crates/lib/page): Provides [PageServer], which builds an [`axum`] router that provides a caching and headers for resources served through http. + - Also provides [Servable], which is a trait for any resource that may be served. + - the [Page] servable serves html generated by a closure. + - the [StaticAsset] servable serves static assets (css, images, misc files), and provides transformation utilties for image assets (via [`pixel-transform`](./crates/lib/pixel-transform)). + +- [`service/service-webpage`](./crates/service/service-webpage): A `Service` that runs a `PageServer` that provides the content on [betalupi.com](https://betalupi.com)