# Rustelo Foundation Library System A complete, modular foundation for building modern web applications with Rust, Leptos, and WebAssembly. ## 🎯 Overview The Rustelo Foundation provides a comprehensive set of library crates that work together to create powerful web applications. Each crate is designed as a reusable library with importable functions, extensive documentation, and practical examples. ## 📦 Foundation Crates ### Core System - **[`server/`](crates/server/)** - Server-side library with importable main functions, routing, and middleware - **[`client/`](crates/client/)** - Client-side library with app mounting, hydration, and state management - **[`core-lib/`](crates/core-lib/)** - Shared utilities, configuration, i18n, and business logic - **[`core-types/`](crates/core-types/)** - Common type definitions and data structures ### UI System - **[`components/`](crates/components/)** - Reusable UI component library with theming support - **[`pages/`](crates/pages/)** - Page generation system with templates and content processing ## 🚀 Quick Start ### 1. Import Foundation Libraries ```rust // In your application's Cargo.toml [dependencies] server = { path = "path/to/rustelo/crates/foundation/crates/server" } client = { path = "path/to/rustelo/crates/foundation/crates/client" } components = { path = "path/to/rustelo/crates/foundation/crates/components" } pages = { path = "path/to/rustelo/crates/foundation/crates/pages" } core-lib = { path = "path/to/rustelo/crates/foundation/crates/core-lib" } core-types = { path = "path/to/rustelo/crates/foundation/crates/core-types" } ``` ### 2. Use Foundation Main Functions ```rust // src/main.rs - Import and use server main function use server::{run_server, ServerConfig}; #[tokio::main] async fn main() -> Result<(), Box> { // Simple usage - use foundation server directly run_server().await?; Ok(()) } ``` ### 3. Build with Foundation Utilities ```rust // build.rs - Use foundation build functions use server::build::generate_routes; use pages::build::generate_pages; use core_lib::build::process_configuration; fn main() -> Result<(), Box> { // Use foundation build utilities process_configuration("config/")?; generate_routes("content/routes/")?; generate_pages("content/")?; Ok(()) } ``` ### 4. Create UI with Foundation Components ```rust // Use foundation components and pages use components::{ navigation::{BrandHeader, Footer}, content::UnifiedContentCard, ui::SpaLink, }; use pages::{HomePage, AboutPage, ContactPage}; #[component] fn App() -> impl IntoView { view! { "Home" "About"