Un entorno para el desarrollo de soluciones web modulares, extensibles y configurables.
Find a file
2024-03-14 06:20:16 +01:00
config 🚧 Doc and code tweaks 2024-02-16 20:03:11 +01:00
docs 📝 Translate default config file comments 2024-02-16 20:00:14 +01:00
drust ♻️ Refactor to include homedemo as welcome package 2024-02-26 07:49:04 +01:00
examples 🧑‍💻 Simplify service::HttpRequest to HttpRequest 2024-02-28 09:11:58 +01:00
helpers 🔖 [macros] release development version 0.0.10 2024-03-08 22:59:31 +01:00
packages 🚚 Rename operations with assets in context 2024-03-11 23:29:37 +01:00
src 🚚 Name enums/classes based on their properties 2024-03-14 06:20:16 +01:00
static 🚚 Name enums/classes based on their properties 2024-03-14 06:20:16 +01:00
tests 🔥 Remove unwrap usage to improve new apps setup 2024-02-26 07:39:08 +01:00
tools 🔨 Add a forgotten pause 2024-03-09 00:27:44 +01:00
.gitignore 🔧 Add optional local config file for default mode 2023-10-29 19:10:54 +01:00
build.rs ♻️ Major code restructuring 2024-02-09 14:05:38 +01:00
Cargo.toml 🔖 [pagetop] release development version 0.0.51 2024-03-08 23:37:59 +01:00
CREDITS.md Integrate "SmartDefault" as "AutoDefault" macro 2024-02-27 21:57:16 +01:00
LICENSE-APACHE Añade las licencias del proyecto 2022-06-07 06:44:51 +02:00
LICENSE-MIT Añade las licencias del proyecto 2022-06-07 06:44:51 +02:00
README.md 🧑‍💻 Simplify service::HttpRequest to HttpRequest 2024-02-28 09:11:58 +01:00
STARTER.bin.Cargo.toml ♻️ Major code restructuring 2024-02-09 14:05:38 +01:00
STARTER.lib.Cargo.toml ♻️ Major code restructuring 2024-02-09 14:05:38 +01:00

PageTop

License API Docs Crates.io Downloads

PageTop is an opinionated Rust web development framework to build secure and modular Server-Side Rendering (SSR) web solutions.

PageTop stands on the shoulders of giants. It leverages some of the most stable and popular Rust crates to provide extensible and easily configurable features.

🚧 Warning

PageTop framework is currently in active development. The API is unstable and subject to frequent changes. Production use is not recommended until version 0.1.0.

Quick start

use pagetop::prelude::*;

struct HelloWorld;

impl PackageTrait for HelloWorld {
    fn configure_service(&self, scfg: &mut service::web::ServiceConfig) {
        scfg.route("/", service::web::get().to(hello_world));
    }
}

async fn hello_world(request: HttpRequest) -> ResultPage<Markup, ErrorPage> {
    Page::new(request)
        .with_component(Html::with(html! { h1 { "Hello World!" } }))
        .render()
}

#[pagetop::main]
async fn main() -> std::io::Result<()> {
    Application::prepare(&HelloWorld).run()?.await
}

This program features a HelloWorld package, providing a service that serves a greeting web page accessible via http://localhost:8088 under default settings.

📂 Repository Structure

This repository is organized into a workspace that includes several subprojects, each serving a distinct role within the PageTop ecosystem:

Application

  • drust: A simple Content Management System (CMS) built on PageTop, which enables the creation, editing, and maintenance of dynamic, fast, and secure websites. It uses the following essential packages to provide standard CMS functionalities.

Helpers

  • pagetop-macros: A collection of procedural macros that enhance the development experience within PageTop.

  • pagetop-build: Simplifies the process of embedding resources directly into binary files for PageTop applications.

Packages

  • pagetop-user: Facilitates user management, including roles, permissions, and session handling, for applications built on PageTop.

  • pagetop-admin: Provides a unified interface for administrators to configure and manage package settings.

  • pagetop-node: Enables the creation and customization of content types, enhancing website content management.

Themes

📜 License

PageTop is free, open source and permissively licensed! Except where noted (below and/or in individual files), all code in this project is dual-licensed under either:

at your option. This means you can select the license you prefer! This dual-licensing approach is the de-facto standard in the Rust ecosystem.

Contributions

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.