chore: add content folder

This commit is contained in:
Jesús Pérex 2025-07-07 23:08:15 +01:00
parent d33aeef1af
commit 8d51341c44
Signed by: jesus
GPG Key ID: 9F243E355E0BC939
18 changed files with 3918 additions and 0 deletions

View File

@ -0,0 +1,287 @@
---
title: "Getting Started with Admin Dashboard"
slug: "admin-getting-started"
name: "Getting Started Guide"
author: "Documentation Team"
author_id: "550e8400-e29b-41d4-a716-446655440002"
content_type: "documentation"
content_format: "markdown"
container: "main"
state: "published"
require_login: false
date_init: "2024-01-15T09:00:00Z"
date_end: null
published_at: "2024-01-15T09:00:00Z"
tags: ["guide", "documentation", "admin", "getting-started"]
category: "Documentation"
featured_image: "/images/admin-guide.jpg"
excerpt: "Complete guide to getting started with the admin dashboard. Learn user management, content creation, and system administration."
seo_title: "Admin Dashboard Getting Started Guide - Complete Tutorial"
seo_description: "Master the admin dashboard with our comprehensive getting started guide. User management, content creation, roles, and more."
allow_comments: true
sort_order: 1
metadata:
reading_time: "8 minutes"
difficulty: "beginner"
language: "en"
version: "1.0"
---
# Getting Started with Admin Dashboard
Welcome to the comprehensive admin dashboard guide! This documentation will help you master all aspects of system administration, from user management to content creation.
## Table of Contents
1. [Dashboard Overview](#dashboard-overview)
2. [User Management](#user-management)
3. [Role-Based Access Control](#role-based-access-control)
4. [Content Management](#content-management)
5. [System Settings](#system-settings)
6. [Best Practices](#best-practices)
## Dashboard Overview
The admin dashboard provides a centralized interface for managing your application. Key features include:
### Main Dashboard Features
- **📊 Analytics Overview** - Real-time statistics and metrics
- **👥 User Management** - Create, edit, and manage user accounts
- **🔐 Role Management** - Configure permissions and access levels
- **📝 Content Management** - Create and publish content
- **⚙️ System Settings** - Configure application settings
### Navigation
The sidebar navigation provides quick access to all admin functions:
```
Admin Dashboard
├── Dashboard (Overview & Stats)
├── Users (User Management)
├── Roles (Permission Management)
├── Content (Content Management)
└── Settings (System Configuration)
```
## User Management
### Creating New Users
1. Navigate to **Admin → Users**
2. Click **"Add New User"**
3. Fill in the required information:
- **Email Address** (required)
- **Display Name** (required)
- **Password** (auto-generated or custom)
- **Roles** (select appropriate permissions)
4. Click **"Create User"**
### User Status Management
Users can have different status levels:
| Status | Description | Actions Available |
|--------|-------------|-------------------|
| **Active** | Full access to assigned features | Edit, Suspend, Delete |
| **Inactive** | Account exists but login disabled | Activate, Edit, Delete |
| **Suspended** | Temporary restriction | Activate, Edit, Delete |
| **Pending** | Awaiting email verification | Resend Invite, Delete |
### Bulk Operations
Select multiple users to perform bulk actions:
- ✅ **Activate** multiple accounts
- ❌ **Suspend** accounts temporarily
- 🗑️ **Delete** accounts permanently
- 📧 **Send** notification emails
## Role-Based Access Control
### Understanding Roles
The system uses hierarchical role-based access control (RBAC):
```
Super Admin
├── Admin
│ ├── Editor
│ │ └── Author
│ │ └── Contributor
│ └── Moderator
└── User (Default)
```
### Creating Custom Roles
1. Go to **Admin → Roles**
2. Click **"Create New Role"**
3. Configure role settings:
- **Role Name** (e.g., "Content Editor")
- **Description** (role purpose)
- **Permissions** (select specific capabilities)
- **Inheritance** (optional parent role)
### Permission Categories
| Category | Description | Example Permissions |
|----------|-------------|-------------------|
| **User Management** | Control over user accounts | `create_user`, `edit_user`, `delete_user` |
| **Content Management** | Content creation and editing | `create_content`, `publish_content`, `delete_content` |
| **System Administration** | System-level configuration | `manage_settings`, `view_logs`, `backup_data` |
| **Analytics** | Access to metrics and reports | `view_analytics`, `export_reports` |
## Content Management
### Content Types
The system supports multiple content types:
- **📝 Blog Posts** - Articles and news updates
- **📄 Pages** - Static content pages
- **📚 Documentation** - Technical guides and manuals
- **🎓 Tutorials** - Step-by-step instructions
- **📰 Articles** - Long-form content
### Creating Content
1. Navigate to **Admin → Content**
2. Click **"Create Content"**
3. Choose content type and format
4. Fill in content details:
#### Basic Information
- **Title** - Content headline
- **Slug** - URL-friendly identifier
- **Content** - Main content body
- **Author** - Content creator
#### Metadata
- **Tags** - Comma-separated keywords
- **Category** - Content classification
- **Featured Image** - Optional header image
- **Excerpt** - Brief content summary
#### SEO Optimization
- **SEO Title** - Search engine title
- **SEO Description** - Meta description
- **Keywords** - Search optimization terms
#### Publication Settings
- **State** - Draft, Published, Scheduled, Archived
- **Publication Date** - When to publish
- **Access Control** - Public or login required
- **Comments** - Enable/disable user comments
### Content States Workflow
```
Draft → Review → Published
↓ ↓ ↓
Edit Reject Schedule
↓ ↓ ↓
Save Draft Archive
```
### File Upload Support
Upload content files directly:
- **Markdown** (.md, .markdown) - Processed with frontmatter
- **HTML** (.html) - Direct HTML content
- **Text** (.txt) - Plain text content
- **Images** - JPG, PNG, WebP for featured images
## System Settings
### General Configuration
- **Site Information** - Name, description, contact details
- **Localization** - Language and timezone settings
- **Email Configuration** - SMTP settings for notifications
- **Security Settings** - Password policies, session timeout
### Database Management
- **Backup Schedule** - Automated backup configuration
- **Data Export** - Export user and content data
- **Migration Tools** - Database version management
- **Performance Monitoring** - Query optimization insights
## Best Practices
### Security
1. **Strong Passwords** - Enforce password complexity requirements
2. **Regular Backups** - Schedule automated database backups
3. **Role Principle** - Assign minimum necessary permissions
4. **Activity Monitoring** - Review admin activity logs regularly
5. **Two-Factor Authentication** - Enable 2FA for admin accounts
### Content Management
1. **Consistent Naming** - Use clear, descriptive titles and slugs
2. **SEO Optimization** - Complete all meta fields for better search ranking
3. **Regular Reviews** - Audit published content for accuracy
4. **Version Control** - Keep drafts when making major changes
5. **Media Organization** - Use consistent file naming and organization
### User Management
1. **Onboarding Process** - Establish clear user setup procedures
2. **Regular Audits** - Review user accounts and permissions quarterly
3. **Documentation** - Maintain clear role and permission documentation
4. **Training Materials** - Provide user guides for different roles
5. **Support Channels** - Establish clear escalation procedures
## Troubleshooting
### Common Issues
**Q: Can't access admin dashboard**
- Verify user has admin role assigned
- Check authentication status
- Clear browser cache and cookies
**Q: Content not publishing**
- Verify publication date/time
- Check content state (should be "Published")
- Ensure user has publish permissions
**Q: User account creation failing**
- Check email format validity
- Verify password meets requirements
- Ensure email address isn't already registered
**Q: Role permissions not working**
- Clear user session cache
- Verify role has correct permissions
- Check for role inheritance conflicts
### Getting Help
For additional support:
- 📚 **Documentation** - Complete guides and API reference
- 💬 **Community Forum** - User discussions and solutions
- 🎫 **Support Tickets** - Direct technical support
- 📧 **Email Support** - admin-support@yourapp.com
## Next Steps
Now that you understand the basics:
1. **Explore Features** - Try creating content and managing users
2. **Customize Settings** - Configure the system for your needs
3. **Train Your Team** - Share this guide with other administrators
4. **Stay Updated** - Check for system updates and new features
---
*This guide covers the essential admin dashboard features. For advanced topics, see our [Advanced Administration Guide](advanced-admin-guide.md).*
**Last Updated**: January 15, 2024
**Version**: 1.0
**Authors**: Documentation Team

View File

@ -0,0 +1,140 @@
template_name = "page"
[values]
title = "About Rustelo"
subtitle = "Modern Web Framework Built with Rust"
author = "Rustelo Team"
last_updated = "2024-01-20"
reading_time = 5
show_meta = true
lang = "en"
content = """
## Our Mission
Rustelo was born from the desire to create a web framework that doesn't compromise on performance, security, or developer experience. We believe that modern web applications should be fast, secure, and maintainable.
## What Makes Rustelo Different
### Built on Solid Foundations
- **Rust**: Memory safety and zero-cost abstractions
- **Leptos**: Reactive web framework with server-side rendering
- **Tera**: Powerful and flexible template engine
- **SQLx**: Async SQL toolkit with compile-time checked queries
### Developer-First Experience
We've designed Rustelo with developers in mind:
- **Hot Reload**: Instant feedback during development
- **Type Safety**: Catch errors at compile time
- **Rich Documentation**: Comprehensive guides and examples
- **Flexible Architecture**: Adapt to your project's needs
### Production Ready
- **High Performance**: Optimized for speed and low resource usage
- **Security**: Built-in CSRF protection, secure headers, and more
- **Scalability**: Handle thousands of concurrent connections
- **Monitoring**: Built-in metrics and health checks
## The Team
Rustelo is maintained by a dedicated team of developers who are passionate about creating the best web development experience possible.
### Core Values
- **Performance**: Every millisecond matters
- **Security**: Security by design, not as an afterthought
- **Simplicity**: Complex problems deserve simple solutions
- **Community**: Open source and community-driven
## Technology Stack
Our carefully chosen technology stack ensures reliability and performance:
- **Backend**: Rust with Axum for HTTP handling
- **Frontend**: Leptos for reactive UI components
- **Database**: PostgreSQL and SQLite support via SQLx
- **Templates**: Tera template engine with custom filters
- **Authentication**: JWT-based with optional OAuth providers
- **Deployment**: Docker-ready with configurable environments
## Open Source
Rustelo is open source and we welcome contributions from the community. Whether you're fixing bugs, adding features, or improving documentation, every contribution helps make Rustelo better.
### How to Contribute
- Report bugs and suggest features on GitHub
- Submit pull requests with improvements
- Help with documentation and examples
- Share your Rustelo projects with the community
## Get Started Today
Ready to build your next web application with Rustelo? Check out our getting started guide and join our growing community of developers.
"""
toc_enabled = true
cta_enabled = true
cta_title = "Ready to Build with Rustelo?"
cta_description = "Join thousands of developers building fast, secure web applications."
cta_url = "/page:getting-started"
cta_button_text = "Get Started Now"
sidebar_title = "Quick Navigation"
[values.breadcrumbs]
[[values.breadcrumbs]]
title = "Home"
url = "/"
[[values.breadcrumbs]]
title = "About"
url = "/page:about"
[values.sidebar_links]
[[values.sidebar_links]]
title = "Getting Started"
url = "/page:getting-started"
[[values.sidebar_links]]
title = "Documentation"
url = "/docs"
[[values.sidebar_links]]
title = "Examples"
url = "/examples"
[[values.sidebar_links]]
title = "GitHub Repository"
url = "https://github.com/rustelo/rustelo"
[values.contact_info]
email = "hello@rustelo.dev"
address = "Open Source Project"
[values.related_pages]
[[values.related_pages]]
title = "Getting Started Guide"
url = "/page:getting-started"
[[values.related_pages]]
title = "Configuration Reference"
url = "/page:configuration"
[[values.related_pages]]
title = "Template System"
url = "/page:templates"
[values.footer_links]
[[values.footer_links]]
title = "Privacy Policy"
url = "/privacy"
[[values.footer_links]]
title = "Terms of Service"
url = "/terms"
[[values.footer_links]]
title = "GitHub"
url = "https://github.com/rustelo/rustelo"
[metadata]
category = "about"
page_type = "static"
priority = "high"
sitemap_include = true

View File

@ -0,0 +1,117 @@
template_name = "blog-post"
[values]
title = "Getting Started with Rustelo"
author = "Development Team"
published_date = "2024-01-15"
reading_time = 8
content = """
# Welcome to Rustelo
Rustelo is a powerful Rust-based web framework that combines the best of modern web development with the performance and safety of Rust.
## What is Rustelo?
Rustelo is built on top of **Leptos** and provides a complete solution for building fast, reliable web applications. It includes:
- **Template Engine**: Powered by Tera for flexible templating
- **Localization**: Built-in support for multiple languages
- **Content Management**: Easy content management with TOML configuration
- **Authentication**: Secure user authentication and authorization
- **Database Integration**: SQLx support for PostgreSQL and SQLite
## Key Features
### 🚀 Performance
Built with Rust for maximum performance and minimal resource usage.
### 🔒 Security
Security-first approach with built-in CSRF protection, secure headers, and more.
### 🌐 Localization
Easy internationalization with file-based language support.
### 📝 Content Management
Simple content management using TOML configuration files.
### 🎨 Flexible Templates
Powerful Tera template engine with custom filters and functions.
## Quick Start
1. **Clone the repository**
```bash
git clone https://github.com/your-org/rustelo.git
cd rustelo
```
2. **Install dependencies**
```bash
cargo build
```
3. **Run the development server**
```bash
cargo run
```
4. **Open your browser**
Navigate to `http://localhost:3030`
## Project Structure
```
rustelo/
server/ # Backend Rust code
client/ # Frontend Leptos code
shared/ # Shared code between client and server
templates/ # Tera templates
content/ # Content files (.tpl.toml)
public/ # Static assets
migrations/ # Database migrations
```
## Configuration
Rustelo uses TOML files for configuration. The main configuration file is `config.toml`:
```toml
[server]
host = "127.0.0.1"
port = 3030
[database]
url = "sqlite:database.db"
[content]
content_dir = "content"
template_dir = "templates"
```
## Creating Your First Page
1. Create a template file in `templates/my-page.html`
2. Create a content file in `content/docs/en_my-page.tpl.toml`
3. Access your page at `/page:my-page`
## Next Steps
- Read the [Configuration Guide](/page:configuration)
- Learn about [Template System](/page:templates)
- Explore [Authentication](/page:auth)
- Check out [Database Setup](/page:database)
Ready to build amazing web applications with Rustelo? Let's get started!
"""
tags = ["rust", "web-framework", "leptos", "getting-started", "tutorial"]
featured_image = "/images/rustelo-banner.jpg"
enable_sharing = true
page_url = "https://yoursite.com/page:getting-started"
back_url = "/"
back_text = "Documentation"
[metadata]
category = "documentation"
difficulty = "beginner"
estimated_time = "10 minutes"
version = "1.0"

View File

@ -0,0 +1,117 @@
template_name = "blog-post"
[values]
title = "Comenzando con Rustelo"
author = "Equipo de Desarrollo"
published_date = "2024-01-15"
reading_time = 8
content = """
# Bienvenido a Rustelo
Rustelo es un poderoso framework web basado en Rust que combina lo mejor del desarrollo web moderno con el rendimiento y la seguridad de Rust.
## ¿Qué es Rustelo?
Rustelo está construido sobre **Leptos** y proporciona una solución completa para construir aplicaciones web rápidas y confiables. Incluye:
- **Motor de Plantillas**: Potenciado por Tera para plantillas flexibles
- **Localización**: Soporte incorporado para múltiples idiomas
- **Gestión de Contenido**: Gestión fácil de contenido con configuración TOML
- **Autenticación**: Autenticación y autorización segura de usuarios
- **Integración de Base de Datos**: Soporte SQLx para PostgreSQL y SQLite
## Características Principales
### 🚀 Rendimiento
Construido con Rust para máximo rendimiento y uso mínimo de recursos.
### 🔒 Seguridad
Enfoque de seguridad primero con protección CSRF incorporada, cabeceras seguras y más.
### 🌐 Localización
Internacionalización fácil con soporte de idiomas basado en archivos.
### 📝 Gestión de Contenido
Gestión simple de contenido usando archivos de configuración TOML.
### 🎨 Plantillas Flexibles
Motor de plantillas Tera potente con filtros y funciones personalizadas.
## Inicio Rápido
1. **Clonar el repositorio**
```bash
git clone https://github.com/your-org/rustelo.git
cd rustelo
```
2. **Instalar dependencias**
```bash
cargo build
```
3. **Ejecutar el servidor de desarrollo**
```bash
cargo run
```
4. **Abrir el navegador**
Navegar a `http://localhost:3030`
## Estructura del Proyecto
```
rustelo/
server/ # Código Rust del backend
client/ # Código Leptos del frontend
shared/ # Código compartido entre cliente y servidor
templates/ # Plantillas Tera
content/ # Archivos de contenido (.tpl.toml)
public/ # Recursos estáticos
migrations/ # Migraciones de base de datos
```
## Configuración
Rustelo usa archivos TOML para la configuración. El archivo principal de configuración es `config.toml`:
```toml
[server]
host = "127.0.0.1"
port = 3030
[database]
url = "sqlite:database.db"
[content]
content_dir = "content"
template_dir = "templates"
```
## Creando tu Primera Página
1. Crear un archivo de plantilla en `templates/my-page.html`
2. Crear un archivo de contenido en `content/docs/es_my-page.tpl.toml`
3. Acceder a tu página en `/page:my-page`
## Próximos Pasos
- Leer la [Guía de Configuración](/page:configuration)
- Aprender sobre el [Sistema de Plantillas](/page:templates)
- Explorar [Autenticación](/page:auth)
- Revisar [Configuración de Base de Datos](/page:database)
¿Listo para construir aplicaciones web increíbles con Rustelo? ¡Comencemos!
"""
tags = ["rust", "web-framework", "leptos", "comenzando", "tutorial"]
featured_image = "/images/rustelo-banner.jpg"
enable_sharing = true
page_url = "https://yoursite.com/page:getting-started"
back_url = "/"
back_text = "Documentación"
[metadata]
category = "documentación"
difficulty = "principiante"
estimated_time = "10 minutos"
version = "1.0"

View File

@ -0,0 +1,385 @@
---
title: "Getting Started Guide"
slug: "getting-started"
name: "getting-started"
author: "Documentation Team"
content_type: "documentation"
content_format: "markdown"
container: "docs-container"
state: "published"
require_login: false
date_init: "2024-01-10T09:00:00Z"
tags: ["documentation", "getting-started", "tutorial", "setup"]
category: "documentation"
excerpt: "Learn how to get started with our platform. Complete setup guide, installation instructions, and first steps to get you up and running quickly."
seo_title: "Getting Started - Complete Setup Guide"
seo_description: "Complete getting started guide with installation instructions, setup steps, and examples to help you begin using our platform effectively."
allow_comments: false
sort_order: 1
metadata:
reading_time: "5"
difficulty: "beginner"
last_updated: "2024-01-10"
section: "basics"
---
# Getting Started Guide
Welcome to our platform! This guide will help you get up and running quickly with all the essential features and functionality.
## Prerequisites
Before you begin, make sure you have the following installed on your system:
- **Rust** (version 1.75 or later)
- **Node.js** (version 18 or later)
- **PostgreSQL** (version 14 or later)
- **Git** for version control
### Installing Rust
If you don't have Rust installed, visit [rustup.rs](https://rustup.rs/) and follow the installation instructions for your operating system.
```bash
# Verify your Rust installation
rustc --version
cargo --version
```
### Installing Node.js
Download and install Node.js from [nodejs.org](https://nodejs.org/) or use a version manager like `nvm`:
```bash
# Using nvm (recommended)
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh | bash
nvm install 18
nvm use 18
```
## Installation
### 1. Clone the Repository
```bash
git clone https://github.com/your-org/your-project.git
cd your-project
```
### 2. Environment Setup
Copy the example environment file and configure your settings:
```bash
cp .env.example .env
```
Edit the `.env` file with your configuration:
```env
# Database Configuration
DATABASE_URL=postgres://username:password@localhost/database_name
# Server Configuration
SERVER_HOST=127.0.0.1
SERVER_PORT=3000
SERVER_PROTOCOL=http
# JWT Configuration
JWT_SECRET=your-super-secret-jwt-key
JWT_EXPIRATION=24h
# OAuth Configuration (optional)
GOOGLE_CLIENT_ID=your-google-client-id
GOOGLE_CLIENT_SECRET=your-google-client-secret
GITHUB_CLIENT_ID=your-github-client-id
GITHUB_CLIENT_SECRET=your-github-client-secret
```
### 3. Database Setup
Create your PostgreSQL database and run migrations:
```bash
# Create database (adjust for your setup)
createdb your_database_name
# Run migrations
cargo install sqlx-cli
sqlx migrate run
```
### 4. Install Dependencies
```bash
# Install Rust dependencies
cargo build
# Install Node.js dependencies (if using frontend build tools)
npm install
```
## Quick Start
### 1. Start the Development Server
```bash
cargo run
```
The server will start on `http://localhost:3000` by default.
### 2. Access the Application
Open your web browser and navigate to:
- **Main Application**: `http://localhost:3000`
- **API Documentation**: `http://localhost:3000/api/docs` (if enabled)
- **Health Check**: `http://localhost:3000/health`
### 3. Create Your First User
You can create a user account through the registration endpoint:
```bash
curl -X POST http://localhost:3000/api/auth/register \
-H "Content-Type: application/json" \
-d '{
"username": "admin",
"email": "admin@example.com",
"password": "SecurePassword123!",
"display_name": "Administrator"
}'
```
## Basic Usage
### Authentication
Our platform supports multiple authentication methods:
#### 1. Username/Password Authentication
```bash
# Login with username and password
curl -X POST http://localhost:3000/api/auth/login \
-H "Content-Type: application/json" \
-d '{
"username": "admin",
"password": "SecurePassword123!"
}'
```
#### 2. OAuth Integration
We support OAuth with popular providers:
- Google OAuth
- GitHub OAuth
- Discord OAuth
Visit `/api/auth/oauth/{provider}/authorize` to initiate OAuth flow.
### Content Management
#### Creating Content
```bash
# Create a new blog post
curl -X POST http://localhost:3000/api/content/contents \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_JWT_TOKEN" \
-d '{
"slug": "my-first-post",
"title": "My First Blog Post",
"name": "first-post",
"content_type": "blog",
"content": "# Welcome\n\nThis is my first blog post!",
"container": "blog-container",
"state": "published"
}'
```
#### Retrieving Content
```bash
# Get content by slug
curl http://localhost:3000/api/content/contents/slug/my-first-post
# Get rendered HTML
curl http://localhost:3000/api/content/contents/slug/my-first-post/render
# List all published content
curl http://localhost:3000/api/content/contents/published
```
## Configuration Options
### Server Configuration
The server can be configured through environment variables or a configuration file:
```toml
# config/server.toml
[server]
host = "127.0.0.1"
port = 3000
protocol = "http"
[database]
url = "postgres://localhost/myapp"
max_connections = 10
[security]
jwt_secret = "your-secret-key"
cors_origins = ["http://localhost:3000"]
rate_limit_requests = 1000
rate_limit_window = 3600
```
### Content Configuration
Configure content sources and behavior:
```toml
# config/content.toml
[content]
source = "database" # or "files" or "both"
file_path = "./content"
enable_cache = true
default_container = "page-container"
[rendering]
enable_syntax_highlighting = true
enable_tables = true
enable_footnotes = true
theme = "base16-ocean.dark"
```
## Development Workflow
### 1. Making Changes
```bash
# Create a new feature branch
git checkout -b feature/my-new-feature
# Make your changes
# ... edit files ...
# Run tests
cargo test
# Check formatting
cargo fmt --check
# Run lints
cargo clippy
```
### 2. Database Migrations
When you need to modify the database schema:
```bash
# Create a new migration
sqlx migrate add create_my_table
# Edit the generated migration file
# migrations/YYYYMMDDHHMMSS_create_my_table.sql
# Run the migration
sqlx migrate run
```
### 3. Running Tests
```bash
# Run all tests
cargo test
# Run tests with output
cargo test -- --nocapture
# Run specific test
cargo test test_name
# Run integration tests
cargo test --test integration_tests
```
## Troubleshooting
### Common Issues
#### Database Connection Issues
```bash
# Check if PostgreSQL is running
pg_isready
# Check database exists
psql -l | grep your_database_name
# Test connection
psql $DATABASE_URL -c "SELECT 1;"
```
#### Port Already in Use
```bash
# Find process using port 3000
lsof -i :3000
# Kill the process (replace PID)
kill -9 PID
```
#### Permission Issues
```bash
# Fix file permissions
chmod +x target/debug/your-app
chmod -R 755 content/
```
### Log Analysis
Enable detailed logging for debugging:
```bash
# Set log level
export RUST_LOG=debug
# Run with logging
cargo run
```
### Getting Help
If you encounter issues:
1. **Check the logs** for error messages
2. **Review the documentation** for your specific use case
3. **Search existing issues** on GitHub
4. **Create a new issue** with detailed information
5. **Join our community** on Discord for real-time help
## Next Steps
Now that you have the basics working, here are some recommended next steps:
1. **[User Management](user-management.md)** - Learn about user roles and permissions
2. **[Content Creation](content-creation.md)** - Deep dive into content management
3. **[API Reference](api-reference.md)** - Explore all available endpoints
4. **[Deployment Guide](deployment.md)** - Deploy to production
5. **[Security Best Practices](security.md)** - Secure your application
## Additional Resources
- **[API Documentation](api-reference.md)** - Complete API reference
- **[Configuration Guide](configuration.md)** - Detailed configuration options
- **[Performance Tuning](performance.md)** - Optimize your application
- **[Contributing Guide](contributing.md)** - How to contribute to the project
---
*This guide gets you started quickly. For more detailed information, explore the other documentation sections or check out our [FAQ](faq.md).*

View File

@ -0,0 +1,287 @@
---
title: "Guía de Administración del Panel"
slug: "guia-administracion"
name: "Guía de Administración"
author: "Equipo de Documentación"
author_id: "550e8400-e29b-41d4-a716-446655440003"
content_type: "documentation"
content_format: "markdown"
container: "main"
state: "published"
require_login: false
date_init: "2024-01-15T15:00:00Z"
date_end: null
published_at: "2024-01-15T15:00:00Z"
tags: ["guía", "documentación", "administración", "inicio"]
category: "Documentación"
featured_image: "/images/guia-admin.jpg"
excerpt: "Guía completa para comenzar con el panel de administración. Aprende gestión de usuarios, creación de contenido y administración del sistema."
seo_title: "Guía del Panel de Administración - Tutorial Completo"
seo_description: "Domina el panel de administración con nuestra guía completa. Gestión de usuarios, creación de contenido, roles y más."
allow_comments: true
sort_order: 1
metadata:
reading_time: "8 minutos"
difficulty: "principiante"
language: "es"
version: "1.0"
---
# Guía de Administración del Panel
¡Bienvenido a la guía completa del panel de administración! Esta documentación te ayudará a dominar todos los aspectos de la administración del sistema, desde la gestión de usuarios hasta la creación de contenido.
## Tabla de Contenidos
1. [Resumen del Panel](#resumen-del-panel)
2. [Gestión de Usuarios](#gestión-de-usuarios)
3. [Control de Acceso Basado en Roles](#control-de-acceso-basado-en-roles)
4. [Gestión de Contenido](#gestión-de-contenido)
5. [Configuración del Sistema](#configuración-del-sistema)
6. [Mejores Prácticas](#mejores-prácticas)
## Resumen del Panel
El panel de administración proporciona una interfaz centralizada para gestionar tu aplicación. Las características principales incluyen:
### Características del Panel Principal
- **📊 Resumen de Analíticas** - Estadísticas y métricas en tiempo real
- **👥 Gestión de Usuarios** - Crear, editar y gestionar cuentas de usuario
- **🔐 Gestión de Roles** - Configurar permisos y niveles de acceso
- **📝 Gestión de Contenido** - Crear y publicar contenido
- **⚙️ Configuración del Sistema** - Configurar ajustes de la aplicación
### Navegación
La navegación lateral proporciona acceso rápido a todas las funciones de administración:
```
Panel de Administración
├── Panel (Resumen y Estadísticas)
├── Usuarios (Gestión de Usuarios)
├── Roles (Gestión de Permisos)
├── Contenido (Gestión de Contenido)
└── Configuración (Configuración del Sistema)
```
## Gestión de Usuarios
### Crear Nuevos Usuarios
1. Navega a **Admin → Usuarios**
2. Haz clic en **"Agregar Nuevo Usuario"**
3. Completa la información requerida:
- **Dirección de Email** (obligatorio)
- **Nombre para Mostrar** (obligatorio)
- **Contraseña** (auto-generada o personalizada)
- **Roles** (selecciona permisos apropiados)
4. Haz clic en **"Crear Usuario"**
### Gestión del Estado de Usuario
Los usuarios pueden tener diferentes niveles de estado:
| Estado | Descripción | Acciones Disponibles |
|--------|-------------|---------------------|
| **Activo** | Acceso completo a características asignadas | Editar, Suspender, Eliminar |
| **Inactivo** | La cuenta existe pero el login está deshabilitado | Activar, Editar, Eliminar |
| **Suspendido** | Restricción temporal | Activar, Editar, Eliminar |
| **Pendiente** | Esperando verificación de email | Reenviar Invitación, Eliminar |
### Operaciones en Lote
Selecciona múltiples usuarios para realizar acciones en lote:
- ✅ **Activar** múltiples cuentas
- ❌ **Suspender** cuentas temporalmente
- 🗑️ **Eliminar** cuentas permanentemente
- 📧 **Enviar** emails de notificación
## Control de Acceso Basado en Roles
### Entendiendo los Roles
El sistema usa control de acceso basado en roles (RBAC) jerárquico:
```
Super Administrador
├── Administrador
│ ├── Editor
│ │ └── Autor
│ │ └── Colaborador
│ └── Moderador
└── Usuario (Por defecto)
```
### Crear Roles Personalizados
1. Ve a **Admin → Roles**
2. Haz clic en **"Crear Nuevo Rol"**
3. Configura los ajustes del rol:
- **Nombre del Rol** (ej. "Editor de Contenido")
- **Descripción** (propósito del rol)
- **Permisos** (selecciona capacidades específicas)
- **Herencia** (rol padre opcional)
### Categorías de Permisos
| Categoría | Descripción | Permisos de Ejemplo |
|-----------|-------------|-------------------|
| **Gestión de Usuarios** | Control sobre cuentas de usuario | `crear_usuario`, `editar_usuario`, `eliminar_usuario` |
| **Gestión de Contenido** | Creación y edición de contenido | `crear_contenido`, `publicar_contenido`, `eliminar_contenido` |
| **Administración del Sistema** | Configuración a nivel de sistema | `gestionar_configuracion`, `ver_logs`, `respaldar_datos` |
| **Analíticas** | Acceso a métricas e informes | `ver_analiticas`, `exportar_informes` |
## Gestión de Contenido
### Tipos de Contenido
El sistema soporta múltiples tipos de contenido:
- **📝 Artículos de Blog** - Artículos y actualizaciones de noticias
- **📄 Páginas** - Páginas de contenido estático
- **📚 Documentación** - Guías técnicas y manuales
- **🎓 Tutoriales** - Instrucciones paso a paso
- **📰 Artículos** - Contenido de formato largo
### Crear Contenido
1. Navega a **Admin → Contenido**
2. Haz clic en **"Crear Contenido"**
3. Elige tipo de contenido y formato
4. Completa los detalles del contenido:
#### Información Básica
- **Título** - Encabezado del contenido
- **Slug** - Identificador amigable para URL
- **Contenido** - Cuerpo principal del contenido
- **Autor** - Creador del contenido
#### Metadatos
- **Etiquetas** - Palabras clave separadas por comas
- **Categoría** - Clasificación del contenido
- **Imagen Destacada** - Imagen de encabezado opcional
- **Extracto** - Resumen breve del contenido
#### Optimización SEO
- **Título SEO** - Título para motores de búsqueda
- **Descripción SEO** - Meta descripción
- **Palabras Clave** - Términos de optimización de búsqueda
#### Configuración de Publicación
- **Estado** - Borrador, Publicado, Programado, Archivado
- **Fecha de Publicación** - Cuándo publicar
- **Control de Acceso** - Público o requiere login
- **Comentarios** - Habilitar/deshabilitar comentarios de usuarios
### Flujo de Estados del Contenido
```
Borrador → Revisión → Publicado
↓ ↓ ↓
Editar Rechazar Programar
↓ ↓ ↓
Guardar Borrador Archivar
```
### Soporte de Subida de Archivos
Sube archivos de contenido directamente:
- **Markdown** (.md, .markdown) - Procesado con metadatos
- **HTML** (.html) - Contenido HTML directo
- **Texto** (.txt) - Contenido de texto plano
- **Imágenes** - JPG, PNG, WebP para imágenes destacadas
## Configuración del Sistema
### Configuración General
- **Información del Sitio** - Nombre, descripción, detalles de contacto
- **Localización** - Configuración de idioma y zona horaria
- **Configuración de Email** - Ajustes SMTP para notificaciones
- **Configuración de Seguridad** - Políticas de contraseña, tiempo de sesión
### Gestión de Base de Datos
- **Programación de Respaldos** - Configuración de respaldo automatizado
- **Exportación de Datos** - Exportar datos de usuario y contenido
- **Herramientas de Migración** - Gestión de versiones de base de datos
- **Monitoreo de Rendimiento** - Perspectivas de optimización de consultas
## Mejores Prácticas
### Seguridad
1. **Contraseñas Fuertes** - Aplicar requisitos de complejidad de contraseña
2. **Respaldos Regulares** - Programar respaldos automáticos de base de datos
3. **Principio de Roles** - Asignar permisos mínimos necesarios
4. **Monitoreo de Actividad** - Revisar logs de actividad de admin regularmente
5. **Autenticación de Dos Factores** - Habilitar 2FA para cuentas de admin
### Gestión de Contenido
1. **Nomenclatura Consistente** - Usar títulos y slugs claros y descriptivos
2. **Optimización SEO** - Completar todos los campos meta para mejor ranking en búsquedas
3. **Revisiones Regulares** - Auditar contenido publicado para precisión
4. **Control de Versiones** - Mantener borradores al hacer cambios importantes
5. **Organización de Medios** - Usar nomenclatura y organización consistente de archivos
### Gestión de Usuarios
1. **Proceso de Incorporación** - Establecer procedimientos claros de configuración de usuarios
2. **Auditorías Regulares** - Revisar cuentas de usuario y permisos trimestralmente
3. **Documentación** - Mantener documentación clara de roles y permisos
4. **Materiales de Entrenamiento** - Proporcionar guías de usuario para diferentes roles
5. **Canales de Soporte** - Establecer procedimientos claros de escalación
## Solución de Problemas
### Problemas Comunes
**P: No puedo acceder al panel de administración**
- Verifica que el usuario tenga rol de admin asignado
- Verifica el estado de autenticación
- Limpia caché y cookies del navegador
**P: El contenido no se publica**
- Verifica fecha/hora de publicación
- Verifica estado del contenido (debería ser "Publicado")
- Asegúrate de que el usuario tenga permisos de publicación
**P: La creación de cuenta de usuario falla**
- Verifica validez del formato de email
- Verifica que la contraseña cumpla los requisitos
- Asegúrate de que la dirección de email no esté ya registrada
**P: Los permisos de rol no funcionan**
- Limpia caché de sesión de usuario
- Verifica que el rol tenga permisos correctos
- Verifica conflictos de herencia de roles
### Obtener Ayuda
Para soporte adicional:
- 📚 **Documentación** - Guías completas y referencia de API
- 💬 **Foro de la Comunidad** - Discusiones de usuarios y soluciones
- 🎫 **Tickets de Soporte** - Soporte técnico directo
- 📧 **Soporte por Email** - soporte-admin@tuapp.com
## Próximos Pasos
Ahora que entiendes lo básico:
1. **Explora Características** - Prueba crear contenido y gestionar usuarios
2. **Personaliza Configuraciones** - Configura el sistema para tus necesidades
3. **Entrena a Tu Equipo** - Comparte esta guía con otros administradores
4. **Mantente Actualizado** - Verifica actualizaciones del sistema y nuevas características
---
*Esta guía cubre las características esenciales del panel de administración. Para temas avanzados, consulta nuestra [Guía de Administración Avanzada](guia-administracion-avanzada.md).*
**Última Actualización**: 15 de enero, 2024
**Versión**: 1.0
**Autores**: Equipo de Documentación

248
content/en.ftl Normal file
View File

@ -0,0 +1,248 @@
welcome = Welcome to Leptos
not-found = Page not found.
home = Home
about = About
user = User
main-desc = Welcome to the home page
about-desc = About this app
user-page = User page for ID: { $id }
# Language Selection
language = Language
select-language = Select Language
english = English
spanish = Español
# Authentication
sign-in = Sign In
sign-up = Sign Up
sign-out = Sign Out
login = Login
register = Register
logout = Logout
email = Email
password = Password
username = Username
display-name = Display Name
confirm-password = Confirm Password
remember-me = Remember me
forgot-password = Forgot your password?
create-account = Create Account
already-have-account = Already have an account?
dont-have-account = Don't have an account?
# Form Labels and Placeholders
email-address = Email Address
enter-email = Enter your email
enter-username = Choose a username
enter-password = Enter your password
create-password = Create a strong password
confirm-your-password = Confirm your password
how-should-we-call-you = How should we call you?
# Messages
welcome-back = Welcome back! Please sign in to your account.
join-us-today = Join us today! Please fill in your details.
signing-in = Signing In...
creating-account = Creating Account...
sign-in-success = Sign in successful
registration-success = Registration successful
logout-success = Logout successful
# Validation Messages
password-required = Password is required
email-required = Email is required
username-required = Username is required
passwords-no-match = Passwords do not match
passwords-match = Passwords match
password-too-short = Password must be at least 8 characters
invalid-email = Please enter a valid email address
username-format = 3-50 characters, letters, numbers, underscores and hyphens only
# Password Strength
password-strength = Password strength:
very-weak = Very Weak
weak = Weak
fair = Fair
good = Good
strong = Strong
password-requirements = Must be at least 8 characters with uppercase, lowercase, number and special character
# OAuth
continue-with = Or continue with
sign-up-with = Or sign up with
google = Google
github = GitHub
discord = Discord
microsoft = Microsoft
# Terms and Privacy
agree-to-terms = I agree to the
terms-of-service = Terms of Service
privacy-policy = Privacy Policy
and = and
# Errors
invalid-credentials = Invalid email or password
user-not-found = User not found
email-already-exists = An account with this email already exists
username-already-exists = This username is already taken
account-not-verified = Please verify your email before signing in
account-suspended = Your account has been suspended
rate-limit-exceeded = Too many attempts. Please try again later
network-error = Network error. Please check your connection
login-failed = Login failed
registration-failed = Registration failed
session-expired = Your session has expired. Please sign in again
invalid-token = Invalid authentication token
token-expired = Your authentication token has expired
insufficient-permissions = You don't have permission to perform this action
oauth-error = OAuth authentication error
database-error = A database error occurred. Please try again
internal-error = An internal error occurred. Please try again
validation-error = Please check your input and try again
authentication-failed = Authentication failed
server-error = Server error occurred. Please try again later
request-failed = Request failed. Please try again
unknown-error = An unknown error occurred
# Profile
profile = Profile
update-profile = Update Profile
change-password = Change Password
current-password = Current Password
new-password = New Password
profile-updated = Profile updated successfully
password-changed = Password changed successfully
profile-update-failed = Failed to update profile
password-change-failed = Failed to change password
# Password Reset
reset-password = Reset Password
request-password-reset = Request Password Reset
password-reset-sent = Password reset instructions sent to your email
password-reset-success = Password reset successfully
enter-reset-token = Enter reset token
reset-token = Reset Token
# Navigation
dashboard = Dashboard
settings = Settings
admin = Admin
users = Users
content = Content
# User Status
welcome-user = Welcome, { $name }
signed-in-as = Signed in as { $email }
last-login = Last login: { $date }
# Loading States
loading = Loading...
please-wait = Please wait...
processing = Processing...
# Admin
manage-users = Manage Users
user-roles = User Roles
permissions = Permissions
audit-log = Audit Log
system-settings = System Settings
# Roles
admin-role = Administrator
moderator-role = Moderator
user-role = User
guest-role = Guest
# Time
just-now = Just now
minutes-ago = { $count } minutes ago
hours-ago = { $count } hours ago
days-ago = { $count } days ago
# Error Display
dismiss = Dismiss
authentication-errors = Authentication Errors
# Navigation
pages = Pages
# Admin Dashboard
admin-dashboard = Admin Dashboard
overview-of-your-system = Overview of your system
refresh = Refresh
total-users = Total Users
active-users = Active Users
content-items = Content Items
total-roles = Total Roles
manage-users = Manage Users
manage-roles = Manage Roles
manage-content = Manage Content
no-recent-activity = No recent activity
activity-will-appear-here = Activity will appear here when users perform actions
# Content Management
content-management = Content Management
manage-your-content = Manage your content, create new posts, and organize your media.
upload-content = Upload Content
create-content = Create Content
total-content = Total Content
published = Published
drafts = Drafts
scheduled = Scheduled
total-views = Total Views
search-content = Search content...
all-types = All Types
posts = Posts
pages = Pages
articles = Articles
all-states = All States
draft = Draft
archived = Archived
actions = Actions
create-new-content = Create New Content
title = Title
slug = Slug
cancel = Cancel
edit-content = Edit Content
content-editing-functionality = Content editing functionality will be implemented here
selected-content = Selected content
drag-and-drop-files = Drag and drop files here, or click to select files
markdown-html-txt-supported = Markdown, HTML, TXT files supported
upload = Upload
# Roles Management
view-permissions = View Permissions
create-new-role = Create New Role
search-roles = Search Roles
clear = Clear
edit = Edit
delete = Delete
role-name = Role Name
description = Description
creating = Creating...
edit-role = Edit Role
updating = Updating...
system-permissions = System Permissions
# User Status
active = Active
inactive = Inactive
suspended = Suspended
pending = Pending
# User Management
user-management = User Management
add-new-user = Add New User
search-users = Search Users
filter-by-status = Filter by Status
all-status = All Status
clear-filters = Clear Filters
user = User
roles = Roles
status = Status
last-login = Last Login
name = Name
send-invitation-email = Send Invitation Email
edit-user = Edit User

248
content/es.ftl Normal file
View File

@ -0,0 +1,248 @@
welcome = Bienvenido a Leptos
not-found = Página no encontrada.
home = Inicio
about = Acerca de
user = Usuario
main-desc = Bienvenido a la página principal
about-desc = Acerca de esta aplicación
user-page = Página de usuario con ID: { $id }
# Language Selection
language = Idioma
select-language = Seleccionar Idioma
english = English
spanish = Español
# Authentication
sign-in = Iniciar Sesión
sign-up = Registrarse
sign-out = Cerrar Sesión
login = Iniciar Sesión
register = Registrarse
logout = Cerrar Sesión
email = Correo Electrónico
password = Contraseña
username = Nombre de Usuario
display-name = Nombre para Mostrar
confirm-password = Confirmar Contraseña
remember-me = Recordarme
forgot-password = ¿Olvidaste tu contraseña?
create-account = Crear Cuenta
already-have-account = ¿Ya tienes una cuenta?
dont-have-account = ¿No tienes una cuenta?
# Form Labels and Placeholders
email-address = Dirección de Correo Electrónico
enter-email = Ingresa tu correo electrónico
enter-username = Elige un nombre de usuario
enter-password = Ingresa tu contraseña
create-password = Crea una contraseña segura
confirm-your-password = Confirma tu contraseña
how-should-we-call-you = ¿Cómo deberíamos llamarte?
# Messages
welcome-back = ¡Bienvenido de vuelta! Por favor inicia sesión en tu cuenta.
join-us-today = ¡Únete a nosotros hoy! Por favor completa tus datos.
signing-in = Iniciando Sesión...
creating-account = Creando Cuenta...
sign-in-success = Inicio de sesión exitoso
registration-success = Registro exitoso
logout-success = Cierre de sesión exitoso
# Validation Messages
password-required = La contraseña es requerida
email-required = El correo electrónico es requerido
username-required = El nombre de usuario es requerido
passwords-no-match = Las contraseñas no coinciden
passwords-match = Las contraseñas coinciden
password-too-short = La contraseña debe tener al menos 8 caracteres
invalid-email = Por favor ingresa un correo electrónico válido
username-format = 3-50 caracteres, solo letras, números, guiones bajos y guiones
# Password Strength
password-strength = Fuerza de la contraseña:
very-weak = Muy Débil
weak = Débil
fair = Regular
good = Buena
strong = Fuerte
password-requirements = Debe tener al menos 8 caracteres con mayúscula, minúscula, número y carácter especial
# OAuth
continue-with = O continúa con
sign-up-with = O regístrate con
google = Google
github = GitHub
discord = Discord
microsoft = Microsoft
# Terms and Privacy
agree-to-terms = Acepto los
terms-of-service = Términos de Servicio
privacy-policy = Política de Privacidad
and = y
# Errors
invalid-credentials = Correo electrónico o contraseña inválidos
user-not-found = Usuario no encontrado
email-already-exists = Ya existe una cuenta con este correo electrónico
username-already-exists = Este nombre de usuario ya está en uso
account-not-verified = Por favor verifica tu correo electrónico antes de iniciar sesión
account-suspended = Tu cuenta ha sido suspendida
rate-limit-exceeded = Demasiados intentos. Por favor intenta de nuevo más tarde
network-error = Error de red. Por favor verifica tu conexión
login-failed = Error al iniciar sesión
registration-failed = Error en el registro
session-expired = Tu sesión ha expirado. Por favor inicia sesión de nuevo
invalid-token = Token de autenticación inválido
token-expired = Tu token de autenticación ha expirado
insufficient-permissions = No tienes permisos para realizar esta acción
oauth-error = Error de autenticación OAuth
database-error = Ocurrió un error en la base de datos. Por favor intenta de nuevo
internal-error = Ocurrió un error interno. Por favor intenta de nuevo
validation-error = Por favor revisa tu información e intenta de nuevo
authentication-failed = Error de autenticación
server-error = Error del servidor. Por favor intenta más tarde
request-failed = La solicitud falló. Por favor intenta de nuevo
unknown-error = Ocurrió un error desconocido
# Profile
profile = Perfil
update-profile = Actualizar Perfil
change-password = Cambiar Contraseña
current-password = Contraseña Actual
new-password = Nueva Contraseña
profile-updated = Perfil actualizado exitosamente
password-changed = Contraseña cambiada exitosamente
profile-update-failed = Error al actualizar el perfil
password-change-failed = Error al cambiar la contraseña
# Password Reset
reset-password = Restablecer Contraseña
request-password-reset = Solicitar Restablecimiento de Contraseña
password-reset-sent = Instrucciones de restablecimiento enviadas a tu correo
password-reset-success = Contraseña restablecida exitosamente
enter-reset-token = Ingresa el token de restablecimiento
reset-token = Token de Restablecimiento
# Navigation
dashboard = Panel de Control
settings = Configuraciones
admin = Administrador
users = Usuarios
content = Contenido
# User Status
welcome-user = Bienvenido, { $name }
signed-in-as = Conectado como { $email }
last-login = Último acceso: { $date }
# Loading States
loading = Cargando...
please-wait = Por favor espera...
processing = Procesando...
# Admin
manage-users = Gestionar Usuarios
user-roles = Roles de Usuario
permissions = Permisos
audit-log = Registro de Auditoría
system-settings = Configuraciones del Sistema
# Roles
admin-role = Administrador
moderator-role = Moderador
user-role = Usuario
guest-role = Invitado
# Time
just-now = Ahora mismo
minutes-ago = Hace { $count } minutos
hours-ago = Hace { $count } horas
days-ago = Hace { $count } días
# Error Display
dismiss = Descartar
authentication-errors = Errores de Autenticación
# Navigation
pages = Páginas
# Admin Dashboard
admin-dashboard = Panel de Administración
overview-of-your-system = Resumen de tu sistema
refresh = Actualizar
total-users = Total de Usuarios
active-users = Usuarios Activos
content-items = Elementos de Contenido
total-roles = Total de Roles
manage-users = Gestionar Usuarios
manage-roles = Gestionar Roles
manage-content = Gestionar Contenido
no-recent-activity = Sin actividad reciente
activity-will-appear-here = La actividad aparecerá aquí cuando los usuarios realicen acciones
# Content Management
content-management = Gestión de Contenido
manage-your-content = Gestiona tu contenido, crea nuevas publicaciones y organiza tus medios.
upload-content = Subir Contenido
create-content = Crear Contenido
total-content = Total de Contenido
published = Publicado
drafts = Borradores
scheduled = Programado
total-views = Total de Vistas
search-content = Buscar contenido...
all-types = Todos los Tipos
posts = Publicaciones
pages = Páginas
articles = Artículos
all-states = Todos los Estados
draft = Borrador
archived = Archivado
actions = Acciones
create-new-content = Crear Nuevo Contenido
title = Título
slug = Slug
cancel = Cancelar
edit-content = Editar Contenido
content-editing-functionality = La funcionalidad de edición de contenido se implementará aquí
selected-content = Contenido seleccionado
drag-and-drop-files = Arrastra y suelta archivos aquí, o haz clic para seleccionar archivos
markdown-html-txt-supported = Archivos Markdown, HTML, TXT compatibles
upload = Subir
# Roles Management
view-permissions = Ver Permisos
create-new-role = Crear Nuevo Rol
search-roles = Buscar Roles
clear = Limpiar
edit = Editar
delete = Eliminar
role-name = Nombre del Rol
description = Descripción
creating = Creando...
edit-role = Editar Rol
updating = Actualizando...
system-permissions = Permisos del Sistema
# User Status
active = Activo
inactive = Inactivo
suspended = Suspendido
pending = Pendiente
# User Management
user-management = Gestión de Usuarios
add-new-user = Agregar Nuevo Usuario
search-users = Buscar Usuarios
filter-by-status = Filtrar por Estado
all-status = Todos los Estados
clear-filters = Limpiar Filtros
user = Usuario
roles = Roles
status = Estado
last-login = Último Acceso
name = Nombre
send-invitation-email = Enviar Correo de Invitación
edit-user = Editar Usuario

24
content/menu.toml Normal file
View File

@ -0,0 +1,24 @@
[[menu]]
route = "/"
label.en = "Home"
label.es = "Inicio"
[[menu]]
route = "/about"
label.en = "About"
label.es = "Acerca de"
[[menu]]
route = "/user"
label.en = "User"
label.es = "Usuario"
[[menu]]
route = "/daisyui"
label.en = "DaisyUI"
label.es = "DaisyUI"
[[menu]]
route = "/features-demo"
label.en = "Features Demo"
label.es = "Demo de Características"

View File

@ -0,0 +1,127 @@
---
title: "Artículo de Ejemplo"
slug: "articulo-de-ejemplo"
name: "Artículo de Ejemplo"
author: "Administrador"
author_id: "550e8400-e29b-41d4-a716-446655440001"
content_type: "blog"
content_format: "markdown"
container: "main"
state: "published"
require_login: false
date_init: "2024-01-15T14:00:00Z"
date_end: null
published_at: "2024-01-15T14:00:00Z"
tags: ["ejemplo", "blog", "español", "markdown"]
category: "General"
featured_image: "/images/articulo-ejemplo.jpg"
excerpt: "Este es un artículo de ejemplo que demuestra el sistema de gestión de contenido con formato markdown y metadatos YAML."
seo_title: "Artículo de Ejemplo - Sistema de Gestión de Contenido"
seo_description: "Aprende a crear artículos atractivos con nuestro sistema de gestión de contenido. Este ejemplo demuestra el formato markdown y metadatos."
allow_comments: true
sort_order: 2
metadata:
reading_time: "3 minutos"
difficulty: "principiante"
language: "es"
---
# Bienvenido a Nuestro Sistema de Gestión de Contenido
Este es un **artículo de ejemplo** que demuestra las poderosas capacidades de gestión de contenido de nuestro sistema. Ya sea que escribas en inglés o español, nuestra plataforma soporta formato enriquecido y metadatos comprensivos.
## ¿Qué Lo Hace Especial?
Nuestro sistema de gestión de contenido soporta:
- ✅ **Múltiples Idiomas** - Crea contenido en inglés, español o cualquier idioma
- ✅ **Formato Enriquecido** - Usa Markdown para contenido hermoso y legible
- ✅ **Optimización SEO** - Meta etiquetas incorporadas y datos estructurados
- ✅ **Tipos de Contenido Flexibles** - Artículos de blog, páginas, documentación, tutoriales
- ✅ **Programación Avanzada** - Publica contenido en el momento perfecto
## Características de Markdown
### Fragmentos de Código
```rust
// Ejemplo de código Rust
fn main() {
println!("¡Hola, Gestión de Contenido!");
}
```
### Listas y Tablas
| Característica | Inglés | Español |
|----------------|--------|---------|
| Título | Title | Título |
| Contenido | Content | Contenido |
| Etiquetas | Tags | Etiquetas |
### Imágenes y Medios
Puedes incorporar fácilmente imágenes, videos y otros medios:
![Panel de Gestión de Contenido](/images/panel-administracion.png)
## Comenzando
1. **Crear Contenido** - Usa nuestra interfaz de administración intuitiva
2. **Formatear con Markdown** - Formato de texto enriquecido hecho simple
3. **Agregar Metadatos** - Etiquetas SEO, categorías y más
4. **Publicar o Programar** - Ve en vivo inmediatamente o programa para después
5. **Seguir Rendimiento** - Monitorea vistas y participación
## Soporte Multi-idioma
Nuestro sistema soporta nativamente múltiples idiomas. Puedes crear contenido en:
- **Inglés** - Soporte completo con optimización SEO
- **Español** - Localización completa incluyendo interfaz de administración
- **Idiomas Personalizados** - Fácil de extender con locales adicionales
> **Consejo Pro**: Usa slugs y metadatos consistentes a través de versiones de idiomas para mejor SEO y experiencia de usuario.
## Estados del Contenido
El contenido puede existir en diferentes estados:
- **Borrador** 📝 - Trabajo en progreso, no visible al público
- **Publicado** ✅ - En vivo y accesible a usuarios
- **Programado** ⏰ - Será publicado en un momento específico
- **Archivado** 📦 - Oculto del público pero preservado
## Características Avanzadas
### Metadatos YAML
Cada archivo de contenido puede incluir metadatos ricos usando metadatos YAML (como se ve en la parte superior de este archivo). Esto incluye:
- Fechas de publicación y programación
- Campos de optimización SEO
- Categorización y etiquetado personalizado
- Información del autor y atribución
- Configuraciones de control de acceso
### Híbrido Base de Datos + Archivos
El contenido puede almacenarse en:
1. **Base de Datos** - Contenido dinámico con edición en tiempo real
2. **Archivos** - Archivos markdown con control de versiones
3. **Híbrido** - Lo mejor de ambos mundos
## Llamada a la Acción
¿Listo para comenzar a crear contenido increíble?
[Crea Tu Primer Artículo →](/admin/content)
---
*Este artículo de ejemplo demuestra las capacidades completas de nuestro sistema de gestión de contenido. Desde formato markdown enriquecido hasta metadatos comprensivos, tienes todo lo que necesitas para crear contenido atractivo y optimizado para SEO.*
**Etiquetas**: #GestiónDeContenido #Blog #Markdown #Español #Ejemplo
**Última Actualización**: 15 de enero, 2024

View File

@ -0,0 +1,127 @@
---
title: "Sample Blog Post"
slug: "sample-blog-post"
name: "Sample Blog Post"
author: "Admin"
author_id: "550e8400-e29b-41d4-a716-446655440000"
content_type: "blog"
content_format: "markdown"
container: "main"
state: "published"
require_login: false
date_init: "2024-01-15T10:00:00Z"
date_end: null
published_at: "2024-01-15T10:00:00Z"
tags: ["sample", "blog", "english", "markdown"]
category: "General"
featured_image: "/images/sample-blog.jpg"
excerpt: "This is a sample blog post demonstrating the content management system with markdown formatting and YAML frontmatter."
seo_title: "Sample Blog Post - Content Management System"
seo_description: "Learn how to create engaging blog posts with our content management system. This sample demonstrates markdown formatting and metadata."
allow_comments: true
sort_order: 1
metadata:
reading_time: "3 minutes"
difficulty: "beginner"
language: "en"
---
# Welcome to Our Content Management System
This is a **sample blog post** that demonstrates the powerful content management capabilities of our system. Whether you're writing in English or Spanish, our platform supports rich formatting and comprehensive metadata.
## What Makes This Special?
Our content management system supports:
- ✅ **Multiple Languages** - Create content in English, Spanish, or any language
- ✅ **Rich Formatting** - Use Markdown for beautiful, readable content
- ✅ **SEO Optimization** - Built-in meta tags and structured data
- ✅ **Flexible Content Types** - Blog posts, pages, documentation, tutorials
- ✅ **Advanced Scheduling** - Publish content at the perfect time
## Markdown Features
### Code Snippets
```rust
// Example Rust code
fn main() {
println!("Hello, Content Management!");
}
```
### Lists and Tables
| Feature | English | Spanish |
|---------|---------|---------|
| Title | Title | Título |
| Content | Content | Contenido |
| Tags | Tags | Etiquetas |
### Images and Media
You can easily embed images, videos, and other media:
![Content Management Dashboard](/images/admin-dashboard.png)
## Getting Started
1. **Create Content** - Use our intuitive admin interface
2. **Format with Markdown** - Rich text formatting made simple
3. **Add Metadata** - SEO tags, categories, and more
4. **Publish or Schedule** - Go live immediately or schedule for later
5. **Track Performance** - Monitor views and engagement
## Multi-Language Support
Our system natively supports multiple languages. You can create content in:
- **English** - Full support with SEO optimization
- **Spanish** - Complete localization including admin interface
- **Custom Languages** - Easy to extend with additional locales
> **Pro Tip**: Use consistent slugs and metadata across language versions for better SEO and user experience.
## Content States
Content can exist in different states:
- **Draft** 📝 - Work in progress, not visible to public
- **Published** ✅ - Live and accessible to users
- **Scheduled** ⏰ - Will be published at a specific time
- **Archived** 📦 - Hidden from public but preserved
## Advanced Features
### YAML Frontmatter
Every content file can include rich metadata using YAML frontmatter (as seen at the top of this file). This includes:
- Publication dates and scheduling
- SEO optimization fields
- Custom categorization and tagging
- Author information and attribution
- Access control settings
### Database + File Hybrid
Content can be stored in:
1. **Database** - Dynamic content with real-time editing
2. **Files** - Version-controlled markdown files
3. **Hybrid** - Best of both worlds
## Call to Action
Ready to start creating amazing content?
[Create Your First Post →](/admin/content)
---
*This sample post demonstrates the full capabilities of our content management system. From rich markdown formatting to comprehensive metadata, you have everything you need to create engaging, SEO-optimized content.*
**Tags**: #ContentManagement #Blog #Markdown #English #Sample
**Last Updated**: January 15, 2024

85
content/public/.gitignore vendored Normal file
View File

@ -0,0 +1,85 @@
# Files to ignore in the public directory
# This helps prevent accidental commits of sensitive or temporary files
# Temporary files
*.tmp
*.temp
*~
.DS_Store
Thumbs.db
# Sensitive files that should not be public
*.key
*.pem
*.p12
*.pfx
*password*
*secret*
*private*
*.env
*.env.*
# Large files that should be handled separately
*.zip
*.tar
*.tar.gz
*.rar
*.7z
*.dmg
*.iso
# Media files that are too large for git
*.mov
*.mp4
*.avi
*.mkv
*.flv
*.wmv
*.webm
*.m4v
# High-resolution images (consider using Git LFS)
*_4k.*
*_8k.*
*_original.*
*_raw.*
# Database files
*.db
*.sqlite
*.sqlite3
# Log files
*.log
*.logs
# Cache files
*.cache
.cache/
# IDE and editor files
.vscode/
.idea/
*.swp
*.swo
*~
# OS generated files
.DS_Store
.DS_Store?
._*
.Spotlight-V100
.Trashes
ehthumbs.db
Thumbs.db
# Backup files
*.backup
*.bak
*.old
# Example files to keep (uncomment to track)
# !example.html
# !styles/custom.css
# !scripts/example.js
# !README.md

159
content/public/README.md Normal file
View File

@ -0,0 +1,159 @@
# Static File Serving
This directory (`content/public`) contains static files that are served directly by the Rustelo server without any processing. Files placed here can be accessed via HTTP requests using the `/public/` URL prefix.
## How It Works
The server is configured to serve static files from this directory using Axum's `ServeDir` service. When a request is made to `/public/*`, the server will:
1. Look for the corresponding file in the `content/public` directory
2. Serve the file with appropriate MIME type headers
3. Return the file content as-is without any processing
## URL Structure
Files in this directory are accessible via the following URL pattern:
```
https://your-domain.com/public/{path-to-file}
```
### Examples
| File Path | URL |
|-----------|-----|
| `content/public/example.html` | `/public/example.html` |
| `content/public/images/logo.png` | `/public/images/logo.png` |
| `content/public/documents/manual.pdf` | `/public/documents/manual.pdf` |
| `content/public/styles/custom.css` | `/public/styles/custom.css` |
| `content/public/scripts/app.js` | `/public/scripts/app.js` |
## Supported File Types
The server automatically detects and serves the following file types with appropriate MIME types:
- **HTML files** (`.html`, `.htm`) - `text/html`
- **CSS files** (`.css`) - `text/css`
- **JavaScript files** (`.js`) - `application/javascript`
- **Images** (`.png`, `.jpg`, `.jpeg`, `.gif`, `.svg`, `.webp`) - `image/*`
- **PDF documents** (`.pdf`) - `application/pdf`
- **Text files** (`.txt`, `.md`) - `text/plain`
- **JSON files** (`.json`) - `application/json`
- **XML files** (`.xml`) - `application/xml`
## Directory Organization
We recommend organizing your static files in subdirectories for better maintainability:
```
content/public/
├── images/ # Image files (PNG, JPG, SVG, etc.)
├── documents/ # PDF files, Word docs, etc.
├── styles/ # CSS stylesheets
├── scripts/ # JavaScript files
├── fonts/ # Web fonts
├── videos/ # Video files
└── downloads/ # Files for download
```
## Usage Examples
### 1. Serving Images
Place image files in `content/public/images/` and reference them in your content:
```html
<img src="/public/images/logo.png" alt="Logo">
```
### 2. Including CSS Files
Add CSS files to `content/public/styles/` and include them in your HTML:
```html
<link rel="stylesheet" href="/public/styles/custom.css">
```
### 3. JavaScript Files
Place JavaScript files in `content/public/scripts/` and include them:
```html
<script src="/public/scripts/app.js"></script>
```
### 4. Downloadable Documents
Store PDF files or other documents in `content/public/documents/`:
```html
<a href="/public/documents/user-manual.pdf" download>Download User Manual</a>
```
## Security Considerations
- **No server-side processing**: Files are served exactly as they are stored
- **No access control**: All files in this directory are publicly accessible
- **No authentication**: Anyone can access these files if they know the URL
- **File permissions**: Ensure files have appropriate read permissions
- **Content validation**: Validate file uploads if allowing user uploads
## Performance Notes
- Files are served directly by the web server for optimal performance
- Consider using a CDN for better global performance
- Large files should be optimized before placing in this directory
- Browser caching headers are automatically set for static files
## Configuration
The static file serving is configured in `server/src/main.rs`:
```rust
.nest_service("/public", ServeDir::new("content/public"))
```
This maps the `/public` URL prefix to the `content/public` directory.
## Development vs Production
### Development
- Files are served directly from the file system
- Changes to files are immediately visible
- No caching is enforced
### Production
- Consider using a reverse proxy (nginx) for better static file performance
- Implement proper caching headers
- Use a CDN for global distribution
- Compress files (gzip) for better transfer speeds
## Best Practices
1. **Organize by type**: Group similar files in subdirectories
2. **Use descriptive names**: Choose clear, descriptive filenames
3. **Optimize images**: Compress images before uploading
4. **Version control**: Keep track of file changes
5. **Security**: Don't store sensitive files in this directory
6. **Cleanup**: Remove unused files regularly
## Troubleshooting
### File Not Found (404)
- Check that the file exists in the `content/public` directory
- Verify the URL path matches the file path exactly
- Ensure the file has proper read permissions
### Wrong MIME Type
- Check the file extension
- Ensure the file is not corrupted
- Verify the file contains the expected content type
### Access Denied
- Check file permissions on the server
- Verify the server has read access to the directory
- Ensure the file is not being used by another process
## Examples in This Directory
- `example.html` - A complete HTML page demonstrating static file serving
- `styles/custom.css` - A CSS file with common styles and utilities
These files can be accessed at:
- `/public/example.html`
- `/public/styles/custom.css`

121
content/public/example.html Normal file
View File

@ -0,0 +1,121 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Example Static HTML File</title>
<!-- Include static CSS file -->
<link rel="stylesheet" href="/public/styles/custom.css" />
<style>
body {
font-family: Arial, sans-serif;
max-width: 800px;
margin: 0 auto;
padding: 20px;
line-height: 1.6;
color: #333;
}
h1 {
color: #2c3e50;
border-bottom: 2px solid #3498db;
padding-bottom: 10px;
}
.info-box {
background-color: #f8f9fa;
border: 1px solid #e9ecef;
border-radius: 5px;
padding: 15px;
margin: 20px 0;
}
.highlight {
background-color: #fff3cd;
padding: 2px 4px;
border-radius: 3px;
}
ul {
margin: 10px 0;
padding-left: 20px;
}
.footer {
margin-top: 40px;
padding-top: 20px;
border-top: 1px solid #dee2e6;
font-size: 0.9em;
color: #6c757d;
}
</style>
</head>
<body>
<h1>Static File Serving Example</h1>
<div class="info-box">
<p>
<strong
>This is a static HTML file served from the content/public
directory.</strong
>
</p>
<p>URL: <span class="highlight">/public/example.html</span></p>
</div>
<h2>Features</h2>
<ul>
<li>Direct file serving without processing</li>
<li>Support for various file types (HTML, images, PDFs, etc.)</li>
<li>Proper MIME type detection</li>
<li>Cache-friendly headers</li>
</ul>
<h2>Usage Examples</h2>
<p>You can access static files using these URL patterns:</p>
<ul>
<li><code>/public/example.html</code> - This HTML file</li>
<li><code>/public/images/logo.png</code> - Image files</li>
<li><code>/public/documents/manual.pdf</code> - PDF documents</li>
<li>
<code>/public/styles/custom.css</code> - CSS files (loaded
above)
</li>
<li>
<code>/public/scripts/example.js</code> - JavaScript files
(loaded below)
</li>
</ul>
<h2>File Organization</h2>
<p>
Organize your static files in the
<code>content/public</code> directory:
</p>
<pre>
content/public/
├── images/
│ ├── logo.png
│ └── banner.jpg
├── documents/
│ ├── manual.pdf
│ └── guide.docx
├── styles/
│ └── custom.css
├── scripts/
│ └── example.js
├── example.html
└── README.md
</pre
>
<div class="footer">
<p>
This file is served statically from the Rustelo content
management system.
</p>
<p>
<strong>Note:</strong> This page includes static CSS and
JavaScript files that are also served from the public directory.
</p>
</div>
<!-- Include static JavaScript file -->
<script src="/public/scripts/example.js"></script>
</body>
</html>

View File

@ -0,0 +1,211 @@
// Example JavaScript file for static file serving demonstration
// This file can be accessed at /public/scripts/example.js
(function() {
'use strict';
// Static file serving indicator
console.log('📁 Static JavaScript file loaded successfully!');
console.log('File served from: /public/scripts/example.js');
// Utility functions
const Utils = {
// Add a static file badge to the page
addStaticFileBadge: function() {
const badge = document.createElement('div');
badge.className = 'static-file-badge';
badge.textContent = 'Static JS Loaded';
badge.style.cssText = `
position: fixed;
bottom: 20px;
left: 20px;
background-color: #007bff;
color: white;
padding: 8px 12px;
border-radius: 20px;
font-size: 0.8rem;
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
z-index: 1000;
font-family: Arial, sans-serif;
`;
document.body.appendChild(badge);
},
// Log file serving information
logFileInfo: function() {
const info = {
filename: 'example.js',
url: '/public/scripts/example.js',
loadTime: new Date().toISOString(),
fileSize: 'Static files served as-is',
mimeType: 'application/javascript',
served: 'Directly from content/public directory'
};
console.table(info);
},
// Demonstrate file loading
demonstrateFileLoading: function() {
// Show that we can load other static files
const link = document.createElement('link');
link.rel = 'stylesheet';
link.href = '/public/styles/custom.css';
link.onload = function() {
console.log('✅ CSS file loaded from static directory');
};
document.head.appendChild(link);
},
// Create a simple interactive demo
createDemo: function() {
const demoContainer = document.createElement('div');
demoContainer.innerHTML = `
<div style="
position: fixed;
top: 20px;
right: 20px;
background: white;
padding: 20px;
border-radius: 8px;
box-shadow: 0 2px 10px rgba(0,0,0,0.1);
max-width: 300px;
font-family: Arial, sans-serif;
z-index: 1000;
">
<h3 style="margin: 0 0 10px 0; color: #333;">Static File Demo</h3>
<p style="margin: 0 0 10px 0; font-size: 0.9em;">
This content is generated by JavaScript loaded from:
<code>/public/scripts/example.js</code>
</p>
<button id="testStaticFiles" style="
background: #007bff;
color: white;
border: none;
padding: 8px 16px;
border-radius: 4px;
cursor: pointer;
font-size: 0.9em;
">Test Static Files</button>
<button id="closeDemo" style="
background: #6c757d;
color: white;
border: none;
padding: 8px 16px;
border-radius: 4px;
cursor: pointer;
font-size: 0.9em;
margin-left: 8px;
">Close</button>
</div>
`;
document.body.appendChild(demoContainer);
// Add event listeners
document.getElementById('testStaticFiles').addEventListener('click', function() {
Utils.testStaticFileUrls();
});
document.getElementById('closeDemo').addEventListener('click', function() {
demoContainer.remove();
});
},
// Test various static file URLs
testStaticFileUrls: function() {
const testUrls = [
'/public/example.html',
'/public/styles/custom.css',
'/public/scripts/example.js',
'/public/README.md'
];
console.group('🔍 Testing Static File URLs');
testUrls.forEach(url => {
fetch(url)
.then(response => {
const status = response.ok ? '✅' : '❌';
const contentType = response.headers.get('content-type');
console.log(`${status} ${url} - ${response.status} (${contentType})`);
})
.catch(error => {
console.log(`${url} - Error: ${error.message}`);
});
});
console.groupEnd();
},
// Initialize all demos
init: function() {
console.log('🚀 Initializing static file demonstrations...');
// Wait for DOM to be ready
if (document.readyState === 'loading') {
document.addEventListener('DOMContentLoaded', () => {
this.addStaticFileBadge();
this.logFileInfo();
this.demonstrateFileLoading();
this.createDemo();
});
} else {
this.addStaticFileBadge();
this.logFileInfo();
this.demonstrateFileLoading();
this.createDemo();
}
}
};
// Sample data that might be served statically
const StaticData = {
apiEndpoints: {
staticFiles: '/public/',
contentApi: '/api/content/',
authApi: '/api/auth/'
},
fileTypes: {
images: ['.png', '.jpg', '.jpeg', '.gif', '.svg', '.webp'],
documents: ['.pdf', '.doc', '.docx', '.txt', '.md'],
styles: ['.css', '.scss', '.less'],
scripts: ['.js', '.ts', '.jsx', '.tsx'],
data: ['.json', '.xml', '.csv', '.yaml']
},
examples: {
imageUrl: '/public/images/logo.png',
documentUrl: '/public/documents/manual.pdf',
styleUrl: '/public/styles/custom.css',
scriptUrl: '/public/scripts/example.js'
}
};
// Export to global scope for testing
window.StaticFileDemo = {
utils: Utils,
data: StaticData,
test: function() {
console.log('Static file serving is working correctly!');
Utils.testStaticFileUrls();
return StaticData;
}
};
// Auto-initialize when script loads
Utils.init();
// Add some helpful console messages
console.log('💡 Try these commands in the console:');
console.log(' StaticFileDemo.test() - Test static file URLs');
console.log(' StaticFileDemo.utils.testStaticFileUrls() - Test specific URLs');
console.log(' StaticFileDemo.data - View static file configuration');
})();
// Example of how to use this in other scripts:
// <script src="/public/scripts/example.js"></script>
// <script>
// StaticFileDemo.test();
// </script>

View File

@ -0,0 +1,333 @@
/* Custom CSS file for static file serving example */
/* Reset and base styles */
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
line-height: 1.6;
color: #333;
background-color: #f8f9fa;
}
/* Container */
.container {
max-width: 1200px;
margin: 0 auto;
padding: 0 20px;
}
/* Typography */
h1, h2, h3, h4, h5, h6 {
margin-bottom: 1rem;
color: #2c3e50;
}
h1 {
font-size: 2.5rem;
font-weight: 700;
}
h2 {
font-size: 2rem;
font-weight: 600;
}
h3 {
font-size: 1.5rem;
font-weight: 500;
}
p {
margin-bottom: 1rem;
}
/* Buttons */
.btn {
display: inline-block;
padding: 12px 24px;
font-size: 1rem;
font-weight: 500;
text-decoration: none;
border: none;
border-radius: 6px;
cursor: pointer;
transition: all 0.3s ease;
}
.btn-primary {
background-color: #3498db;
color: white;
}
.btn-primary:hover {
background-color: #2980b9;
transform: translateY(-2px);
}
.btn-secondary {
background-color: #6c757d;
color: white;
}
.btn-secondary:hover {
background-color: #5a6268;
}
.btn-success {
background-color: #28a745;
color: white;
}
.btn-success:hover {
background-color: #218838;
}
/* Cards */
.card {
background: white;
border-radius: 8px;
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
padding: 20px;
margin-bottom: 20px;
transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.card:hover {
transform: translateY(-5px);
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}
.card-title {
color: #2c3e50;
margin-bottom: 10px;
}
.card-text {
color: #666;
line-height: 1.5;
}
/* Navigation */
.navbar {
background-color: #2c3e50;
padding: 1rem 0;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
.navbar-brand {
color: white;
font-size: 1.5rem;
font-weight: 700;
text-decoration: none;
}
.navbar-nav {
display: flex;
list-style: none;
gap: 2rem;
margin-left: auto;
}
.nav-link {
color: #ecf0f1;
text-decoration: none;
transition: color 0.3s ease;
}
.nav-link:hover {
color: #3498db;
}
/* Grid system */
.row {
display: flex;
flex-wrap: wrap;
margin: 0 -15px;
}
.col {
flex: 1;
padding: 0 15px;
}
.col-1 { flex: 0 0 8.333333%; }
.col-2 { flex: 0 0 16.666667%; }
.col-3 { flex: 0 0 25%; }
.col-4 { flex: 0 0 33.333333%; }
.col-6 { flex: 0 0 50%; }
.col-8 { flex: 0 0 66.666667%; }
.col-12 { flex: 0 0 100%; }
/* Utilities */
.text-center {
text-align: center;
}
.text-left {
text-align: left;
}
.text-right {
text-align: right;
}
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.mt-5 { margin-top: 3rem; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }
.mb-5 { margin-bottom: 3rem; }
.p-1 { padding: 0.25rem; }
.p-2 { padding: 0.5rem; }
.p-3 { padding: 1rem; }
.p-4 { padding: 1.5rem; }
.p-5 { padding: 3rem; }
/* Alerts */
.alert {
padding: 15px;
margin-bottom: 20px;
border: 1px solid transparent;
border-radius: 6px;
}
.alert-info {
color: #0c5460;
background-color: #d1ecf1;
border-color: #bee5eb;
}
.alert-success {
color: #155724;
background-color: #d4edda;
border-color: #c3e6cb;
}
.alert-warning {
color: #856404;
background-color: #fff3cd;
border-color: #ffeaa7;
}
.alert-danger {
color: #721c24;
background-color: #f8d7da;
border-color: #f5c6cb;
}
/* Forms */
.form-group {
margin-bottom: 1rem;
}
.form-label {
display: block;
margin-bottom: 0.5rem;
font-weight: 500;
color: #333;
}
.form-control {
display: block;
width: 100%;
padding: 0.75rem;
font-size: 1rem;
border: 1px solid #ced4da;
border-radius: 6px;
transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.form-control:focus {
outline: none;
border-color: #3498db;
box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}
/* Responsive design */
@media (max-width: 768px) {
.container {
padding: 0 15px;
}
.row {
flex-direction: column;
}
.col {
flex: 1;
margin-bottom: 1rem;
}
.navbar-nav {
flex-direction: column;
gap: 1rem;
}
h1 {
font-size: 2rem;
}
h2 {
font-size: 1.5rem;
}
}
/* Animation utilities */
.fade-in {
animation: fadeIn 0.5s ease-in;
}
@keyframes fadeIn {
from {
opacity: 0;
transform: translateY(20px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
.slide-up {
animation: slideUp 0.6s ease-out;
}
@keyframes slideUp {
from {
opacity: 0;
transform: translateY(30px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
/* Static file serving indicator */
.static-file-badge {
position: fixed;
bottom: 20px;
right: 20px;
background-color: #28a745;
color: white;
padding: 8px 12px;
border-radius: 20px;
font-size: 0.8rem;
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
z-index: 1000;
}
.static-file-badge:before {
content: "📁 ";
}

View File

@ -0,0 +1,409 @@
---
title: "Building Modern Web Applications with Rust"
slug: "rust-web-development"
name: "rust-web-dev"
author: "Tech Team"
content_type: "blog"
content_format: "markdown"
container: "blog-container"
state: "published"
require_login: false
date_init: "2024-01-15T10:00:00Z"
tags: ["rust", "web-development", "axum", "leptos", "tutorial"]
category: "technology"
featured_image: "/images/rust-web.jpg"
excerpt: "Discover how to build high-performance, safe web applications using Rust. Learn about modern frameworks, best practices, and real-world examples."
seo_title: "Rust Web Development: Complete Guide to Modern Frameworks"
seo_description: "Learn Rust web development with Axum, Leptos, and other modern frameworks. Complete tutorial with examples, best practices, and performance tips."
allow_comments: true
sort_order: 1
metadata:
reading_time: "8"
difficulty: "intermediate"
last_updated: "2024-01-15"
---
# Building Modern Web Applications with Rust
Rust has emerged as a powerful language for web development, offering unparalleled performance, memory safety, and developer experience. In this comprehensive guide, we'll explore how to build modern, high-performance web applications using Rust's ecosystem.
## Why Choose Rust for Web Development?
### Performance That Matters
Rust delivers performance comparable to C and C++ while providing memory safety guarantees. This makes it ideal for high-throughput web services where every millisecond counts.
```rust
// Zero-cost abstractions in action
let numbers: Vec<i32> = (1..1000000).collect();
let sum: i32 = numbers.iter().sum(); // Optimized to a simple loop
```
### Memory Safety Without Garbage Collection
Unlike languages with garbage collectors, Rust prevents common bugs like null pointer dereferences, buffer overflows, and use-after-free errors at compile time.
### Fearless Concurrency
Rust's ownership system enables safe concurrent programming, making it easier to build scalable web applications.
```rust
use tokio::task;
async fn handle_requests() {
let handles: Vec<_> = (0..10)
.map(|i| task::spawn(async move {
// Each task runs concurrently and safely
process_request(i).await
}))
.collect();
for handle in handles {
handle.await.unwrap();
}
}
```
## Modern Rust Web Frameworks
### Axum: The Modern Choice
Axum is a web application framework that focuses on ergonomics and modularity. Built on top of Tokio and Tower, it provides excellent performance and developer experience.
```rust
use axum::{
response::Json,
routing::{get, post},
Router,
};
use serde::{Deserialize, Serialize};
#[derive(Serialize, Deserialize)]
struct User {
id: u64,
name: String,
}
async fn get_user() -> Json<User> {
Json(User {
id: 1,
name: "Alice".to_string(),
})
}
let app = Router::new()
.route("/users", get(get_user))
.route("/users", post(create_user));
```
### Leptos: Full-Stack Reactive Web Framework
Leptos brings reactive programming to Rust web development, similar to React or Solid.js, but with Rust's performance and safety.
```rust
use leptos::*;
#[component]
fn Counter() -> impl IntoView {
let (count, set_count) = create_signal(0);
view! {
<div>
<button on:click=move |_| set_count.update(|n| *n += 1)>
"Click me: " {count}
</button>
</div>
}
}
```
### Actix-web: Battle-Tested Performance
Actix-web has been a cornerstone of Rust web development, known for its exceptional performance and mature ecosystem.
```rust
use actix_web::{web, App, HttpResponse, HttpServer, Result};
async fn greet(name: web::Path<String>) -> Result<HttpResponse> {
Ok(HttpResponse::Ok().json(format!("Hello, {}!", name)))
}
#[actix_web::main]
async fn main() -> std::io::Result<()> {
HttpServer::new(|| {
App::new()
.route("/hello/{name}", web::get().to(greet))
})
.bind("127.0.0.1:8080")?
.run()
.await
}
```
## Database Integration
### SQLx: Compile-Time Checked SQL
SQLx provides compile-time verification of SQL queries, preventing runtime SQL errors.
```rust
use sqlx::{Pool, Postgres};
#[derive(sqlx::FromRow)]
struct User {
id: i32,
name: String,
email: String,
}
async fn get_user_by_id(pool: &Pool<Postgres>, id: i32) -> Result<User, sqlx::Error> {
sqlx::query_as!(
User,
"SELECT id, name, email FROM users WHERE id = $1",
id
)
.fetch_one(pool)
.await
}
```
### Diesel: Type-Safe ORM
Diesel provides a type-safe ORM experience with excellent compile-time guarantees.
```rust
use diesel::prelude::*;
#[derive(Queryable)]
struct User {
id: i32,
name: String,
email: String,
}
fn get_users(conn: &mut PgConnection) -> QueryResult<Vec<User>> {
users::table.load::<User>(conn)
}
```
## Authentication and Security
### JWT Token Handling
```rust
use jsonwebtoken::{encode, decode, Header, Algorithm, Validation, EncodingKey, DecodingKey};
use serde::{Deserialize, Serialize};
#[derive(Debug, Serialize, Deserialize)]
struct Claims {
sub: String,
exp: usize,
}
fn create_jwt(user_id: &str) -> Result<String, jsonwebtoken::errors::Error> {
let claims = Claims {
sub: user_id.to_string(),
exp: (chrono::Utc::now() + chrono::Duration::hours(24)).timestamp() as usize,
};
encode(&Header::default(), &claims, &EncodingKey::from_secret("secret".as_ref()))
}
```
### Password Hashing with Argon2
```rust
use argon2::{
Argon2,
password_hash::{PasswordHash, PasswordHasher, PasswordVerifier, SaltString, rand_core::OsRng},
};
fn hash_password(password: &str) -> Result<String, argon2::password_hash::Error> {
let argon2 = Argon2::default();
let salt = SaltString::generate(&mut OsRng);
let password_hash = argon2.hash_password(password.as_bytes(), &salt)?;
Ok(password_hash.to_string())
}
fn verify_password(password: &str, hash: &str) -> Result<bool, argon2::password_hash::Error> {
let argon2 = Argon2::default();
let parsed_hash = PasswordHash::new(hash)?;
argon2
.verify_password(password.as_bytes(), &parsed_hash)
.map(|_| true)
.or_else(|err| match err {
argon2::password_hash::Error::Password => Ok(false),
_ => Err(err),
})
}
```
## Testing Your Rust Web Applications
### Unit Testing
```rust
#[cfg(test)]
mod tests {
use super::*;
#[tokio::test]
async fn test_user_creation() {
let user = create_user("Alice", "alice@example.com").await;
assert_eq!(user.name, "Alice");
assert_eq!(user.email, "alice@example.com");
}
}
```
### Integration Testing with reqwest
```rust
#[tokio::test]
async fn test_api_endpoint() {
let client = reqwest::Client::new();
let response = client
.get("http://localhost:3000/api/users")
.send()
.await
.unwrap();
assert_eq!(response.status(), 200);
}
```
## Deployment and Production Considerations
### Docker Containerization
```dockerfile
FROM rust:1.75 as builder
WORKDIR /app
COPY . .
RUN cargo build --release
FROM debian:bookworm-slim
RUN apt-get update && apt-get install -y ca-certificates
COPY --from=builder /app/target/release/my-web-app /usr/local/bin/
EXPOSE 3000
CMD ["my-web-app"]
```
### Performance Optimization Tips
1. **Use `cargo build --release`** for production builds
2. **Enable link-time optimization (LTO)** in Cargo.toml
3. **Use connection pooling** for database connections
4. **Implement proper caching strategies**
5. **Monitor with tools like** `tokio-console`
```toml
[profile.release]
lto = true
codegen-units = 1
panic = "abort"
```
## Real-World Example: Building a Blog API
Let's build a complete blog API that demonstrates many of these concepts:
```rust
use axum::{
extract::{Path, Query, State},
response::Json,
routing::{get, post},
Router,
};
use sqlx::{PgPool, FromRow};
use serde::{Deserialize, Serialize};
use uuid::Uuid;
#[derive(FromRow, Serialize)]
struct BlogPost {
id: Uuid,
title: String,
content: String,
author_id: Uuid,
created_at: chrono::DateTime<chrono::Utc>,
}
#[derive(Deserialize)]
struct CreatePost {
title: String,
content: String,
author_id: Uuid,
}
#[derive(Deserialize)]
struct PostQuery {
limit: Option<i32>,
offset: Option<i32>,
}
async fn get_posts(
Query(query): Query<PostQuery>,
State(pool): State<PgPool>,
) -> Json<Vec<BlogPost>> {
let posts = sqlx::query_as!(
BlogPost,
"SELECT id, title, content, author_id, created_at
FROM blog_posts
ORDER BY created_at DESC
LIMIT $1 OFFSET $2",
query.limit.unwrap_or(10),
query.offset.unwrap_or(0)
)
.fetch_all(&pool)
.await
.unwrap_or_default();
Json(posts)
}
async fn create_post(
State(pool): State<PgPool>,
Json(post): Json<CreatePost>,
) -> Json<BlogPost> {
let new_post = sqlx::query_as!(
BlogPost,
"INSERT INTO blog_posts (title, content, author_id)
VALUES ($1, $2, $3)
RETURNING id, title, content, author_id, created_at",
post.title,
post.content,
post.author_id
)
.fetch_one(&pool)
.await
.unwrap();
Json(new_post)
}
fn create_blog_router(pool: PgPool) -> Router {
Router::new()
.route("/posts", get(get_posts).post(create_post))
.with_state(pool)
}
```
## Conclusion
Rust offers a compelling proposition for web development, combining performance, safety, and developer productivity. Whether you're building high-performance APIs, real-time applications, or full-stack web applications, Rust's ecosystem has matured to provide excellent solutions.
The frameworks and tools we've explored represent just the beginning of what's possible with Rust web development. As the ecosystem continues to grow, we can expect even more powerful abstractions and better developer experiences.
### Next Steps
1. **Try building a simple API** with Axum
2. **Experiment with Leptos** for full-stack development
3. **Learn about async Rust** and tokio
4. **Explore the crates.io ecosystem** for specialized libraries
5. **Join the Rust community** on Discord, Reddit, and GitHub
Happy coding with Rust! 🦀
---
*Want to learn more about Rust web development? Check out our other articles on advanced topics like WebAssembly integration, microservices architecture, and performance optimization.*

493
content/texts.toml Normal file
View File

@ -0,0 +1,493 @@
[en]
welcome = "Welcome to Leptos"
not_found = "Page not found."
# Authentication
login = "Login"
logout = "Logout"
register = "Register"
email = "Email"
password = "Password"
confirm-password = "Confirm Password"
username = "Username"
display-name = "Display Name"
first-name = "First Name"
last-name = "Last Name"
remember-me = "Remember me"
forgot-password = "Forgot password?"
sign-in = "Sign in"
sign-up = "Sign up"
create-account = "Create account"
already-have-account = "Already have an account?"
dont-have-account = "Don't have an account?"
welcome-back = "Welcome back"
email-address = "Email address"
enter-email = "Enter your email"
enter-password = "Enter your password"
signing-in = "Signing in..."
continue-with = "Or continue with"
join-us-today = "Join us today"
enter-username = "Enter your username"
creating-account = "Creating account..."
passwords-dont-match = "Passwords don't match"
passwords-match = "Passwords match"
i-agree-to-the = "I agree to the"
terms-of-service = "Terms of Service"
and = "and"
privacy-policy = "Privacy Policy"
username-format = "Username must be 3-30 characters, letters, numbers, and underscores only"
how-should-we-call-you = "How should we call you?"
# Authentication Errors
invalid-credentials = "Invalid email or password"
user-not-found = "User not found"
email-already-exists = "Email already exists"
username-already-exists = "Username already exists"
invalid-token = "Invalid token"
token-expired = "Token expired"
insufficient-permissions = "Insufficient permissions"
account-not-verified = "Account not verified"
account-suspended = "Account suspended"
rate-limit-exceeded = "Rate limit exceeded"
oauth-error = "OAuth error"
database-error = "Database error"
validation-error = "Validation error"
login-failed = "Login failed"
registration-failed = "Registration failed"
session-expired = "Session expired"
profile-update-failed = "Profile update failed"
password-change-failed = "Password change failed"
network-error = "Network error"
server-error = "Server error"
internal-error = "Internal error"
unknown-error = "Unknown error"
# Password Validation
password-strength = "Password strength"
password-weak = "Weak"
password-medium = "Medium"
password-strong = "Strong"
password-very-strong = "Very strong"
password-requirements = "Password must be at least 8 characters long"
very-weak = "Very Weak"
weak = "Weak"
fair = "Fair"
good = "Good"
strong = "Strong"
# Common UI
loading = "Loading..."
save = "Save"
cancel = "Cancel"
submit = "Submit"
close = "Close"
back = "Back"
next = "Next"
previous = "Previous"
search = "Search"
filter = "Filter"
sort = "Sort"
edit = "Edit"
delete = "Delete"
confirm = "Confirm"
success = "Success"
error = "Error"
warning = "Warning"
info = "Info"
# Language
select-language = "Select language"
language = "Language"
pages = "Pages"
# Admin Dashboard
"admin.dashboard.title" = "Admin Dashboard"
"admin.dashboard.subtitle" = "Monitor and manage your application"
"admin.dashboard.refresh" = "Refresh"
# Admin Stats
"admin.stats.total_users" = "Total Users"
"admin.stats.active_users" = "Active Users"
"admin.stats.content_items" = "Content Items"
"admin.stats.total_roles" = "Total Roles"
"admin.stats.pending_approvals" = "Pending Approvals"
"admin.stats.system_health" = "System Health"
# Admin Quick Actions
"admin.quick_actions.title" = "Quick Actions"
"admin.quick_actions.manage_users" = "Manage Users"
"admin.quick_actions.manage_roles" = "Manage Roles"
"admin.quick_actions.manage_content" = "Manage Content"
# Admin Recent Activity
"admin.recent_activity.title" = "Recent Activity"
"admin.recent_activity.no_activity" = "No recent activity"
"admin.recent_activity.no_activity_desc" = "Activity will appear here when users interact with the system"
# Admin Users
"admin.users.title" = "User Management"
"admin.users.add_user" = "Add New User"
"admin.users.search_placeholder" = "Search by name or email..."
"admin.users.filter_status" = "Filter by Status"
"admin.users.clear_filters" = "Clear Filters"
"admin.users.table.user" = "User"
"admin.users.table.roles" = "Roles"
"admin.users.table.status" = "Status"
"admin.users.table.last_login" = "Last Login"
"admin.users.table.actions" = "Actions"
"admin.users.edit" = "Edit"
"admin.users.activate" = "Activate"
"admin.users.suspend" = "Suspend"
"admin.users.delete" = "Delete"
"admin.users.delete_confirm" = "Are you sure you want to delete this user?"
# Admin Roles
"admin.roles.title" = "Role Management"
"admin.roles.create_role" = "Create New Role"
"admin.roles.view_permissions" = "View Permissions"
"admin.roles.search_placeholder" = "Search by name or description..."
"admin.roles.system_role" = "System Role"
"admin.roles.users" = "users"
"admin.roles.permissions" = "permissions"
"admin.roles.delete_confirm" = "Are you sure you want to delete this role?"
# User Status
"status.active" = "Active"
"status.inactive" = "Inactive"
"status.suspended" = "Suspended"
"status.pending" = "Pending"
# Admin Content Management
"admin.content.title" = "Content Management"
"admin.content.subtitle" = "Manage your content, posts, and media"
"admin.content.refresh" = "Refresh"
"admin.content.create" = "Create Content"
"admin.content.upload" = "Upload Files"
"admin.content.edit" = "Edit"
"admin.content.view" = "View"
"admin.content.delete" = "Delete"
"admin.content.cancel" = "Cancel"
"admin.content.save" = "Save"
# Content Stats
"admin.content.stats.total" = "Total Content"
"admin.content.stats.published" = "Published"
"admin.content.stats.drafts" = "Drafts"
"admin.content.stats.scheduled" = "Scheduled"
"admin.content.stats.views" = "Total Views"
# Content Filters
"admin.content.search" = "Search"
"admin.content.search_placeholder" = "Search content..."
"admin.content.filter_type" = "Content Type"
"admin.content.filter_state" = "State"
"admin.content.all_types" = "All Types"
"admin.content.all_states" = "All States"
"admin.content.sort" = "Sort By"
"admin.content.sort.updated" = "Last Updated"
"admin.content.sort.created" = "Created Date"
"admin.content.sort.title" = "Title"
"admin.content.sort.views" = "Views"
# Content Types
"admin.content.type.blog" = "Blog"
"admin.content.type.page" = "Page"
"admin.content.type.article" = "Article"
"admin.content.type.documentation" = "Documentation"
"admin.content.type.tutorial" = "Tutorial"
# Content States
"admin.content.state.draft" = "Draft"
"admin.content.state.published" = "Published"
"admin.content.state.archived" = "Archived"
"admin.content.state.scheduled" = "Scheduled"
# Content Formats
"admin.content.format.markdown" = "Markdown"
"admin.content.format.html" = "HTML"
"admin.content.format.plain_text" = "Plain Text"
# Content Table
"admin.content.table.title" = "Title"
"admin.content.table.type" = "Type"
"admin.content.table.state" = "State"
"admin.content.table.language" = "Language"
"admin.content.table.author" = "Author"
"admin.content.table.updated" = "Updated"
"admin.content.table.views" = "Views"
"admin.content.table.actions" = "Actions"
# Content Forms
"admin.content.create_title" = "Create New Content"
"admin.content.edit_title" = "Edit Content"
"admin.content.edit_placeholder" = "Content editing functionality"
"admin.content.upload_title" = "Upload Content Files"
"admin.content.upload_description" = "Drag and drop files here or click to browse"
"admin.content.choose_files" = "Choose Files"
"admin.content.form.title" = "Title"
"admin.content.form.slug" = "Slug"
"admin.content.form.content" = "Content"
"admin.content.form.type" = "Content Type"
"admin.content.form.format" = "Format"
"admin.content.form.state" = "State"
"admin.content.form.tags" = "Tags"
"admin.content.form.tags_placeholder" = "Comma-separated tags"
"admin.content.form.category" = "Category"
"admin.content.form.excerpt" = "Excerpt"
"admin.content.form.seo_title" = "SEO Title"
"admin.content.form.seo_description" = "SEO Description"
"admin.content.form.require_login" = "Require Login"
"admin.content.form.allow_comments" = "Allow Comments"
# Content Language Filtering
"admin.content.filter_language" = "Language"
"admin.content.all_languages" = "All Languages"
"admin.content.language.english" = "English"
"admin.content.language.spanish" = "Spanish"
[es]
welcome = "Bienvenido a Leptos"
not_found = "Página no encontrada."
# Authentication
login = "Iniciar sesión"
logout = "Cerrar sesión"
register = "Registrarse"
email = "Email"
password = "Contraseña"
confirm-password = "Confirmar contraseña"
username = "Nombre de usuario"
display-name = "Nombre para mostrar"
first-name = "Nombre"
last-name = "Apellido"
remember-me = "Recordarme"
forgot-password = "¿Olvidaste tu contraseña?"
sign-in = "Iniciar sesión"
sign-up = "Registrarse"
create-account = "Crear cuenta"
already-have-account = "¿Ya tienes una cuenta?"
dont-have-account = "¿No tienes una cuenta?"
welcome-back = "Bienvenido de vuelta"
email-address = "Dirección de email"
enter-email = "Introduce tu email"
enter-password = "Introduce tu contraseña"
signing-in = "Iniciando sesión..."
continue-with = "O continúa con"
join-us-today = "Únete a nosotros hoy"
enter-username = "Introduce tu nombre de usuario"
creating-account = "Creando cuenta..."
passwords-dont-match = "Las contraseñas no coinciden"
passwords-match = "Las contraseñas coinciden"
i-agree-to-the = "Acepto los"
terms-of-service = "Términos de Servicio"
and = "y"
privacy-policy = "Política de Privacidad"
username-format = "El nombre de usuario debe tener 3-30 caracteres, solo letras, números y guiones bajos"
how-should-we-call-you = "¿Cómo deberíamos llamarte?"
# Authentication Errors
invalid-credentials = "Email o contraseña inválidos"
user-not-found = "Usuario no encontrado"
email-already-exists = "El email ya existe"
username-already-exists = "El nombre de usuario ya existe"
invalid-token = "Token inválido"
token-expired = "Token expirado"
insufficient-permissions = "Permisos insuficientes"
account-not-verified = "Cuenta no verificada"
account-suspended = "Cuenta suspendida"
rate-limit-exceeded = "Límite de velocidad excedido"
oauth-error = "Error de OAuth"
database-error = "Error de base de datos"
validation-error = "Error de validación"
login-failed = "Inicio de sesión fallido"
registration-failed = "Registro fallido"
session-expired = "Sesión expirada"
profile-update-failed = "Actualización de perfil fallida"
password-change-failed = "Cambio de contraseña fallido"
network-error = "Error de red"
server-error = "Error del servidor"
internal-error = "Error interno"
unknown-error = "Error desconocido"
# Password Validation
password-strength = "Fuerza de contraseña"
password-weak = "Débil"
password-medium = "Medio"
password-strong = "Fuerte"
password-very-strong = "Muy fuerte"
password-requirements = "La contraseña debe tener al menos 8 caracteres"
very-weak = "Muy Débil"
weak = "Débil"
fair = "Regular"
good = "Bueno"
strong = "Fuerte"
# Common UI
loading = "Cargando..."
save = "Guardar"
cancel = "Cancelar"
submit = "Enviar"
close = "Cerrar"
back = "Atrás"
next = "Siguiente"
previous = "Anterior"
search = "Buscar"
filter = "Filtrar"
sort = "Ordenar"
edit = "Editar"
delete = "Eliminar"
confirm = "Confirmar"
success = "Éxito"
error = "Error"
warning = "Advertencia"
info = "Información"
# Language
select-language = "Seleccionar idioma"
language = "Idioma"
pages = "Páginas"
# Admin Dashboard
"admin.dashboard.title" = "Panel de Administración"
"admin.dashboard.subtitle" = "Monitorea y gestiona tu aplicación"
"admin.dashboard.refresh" = "Actualizar"
# Admin Stats
"admin.stats.total_users" = "Total de Usuarios"
"admin.stats.active_users" = "Usuarios Activos"
"admin.stats.content_items" = "Elementos de Contenido"
"admin.stats.total_roles" = "Total de Roles"
"admin.stats.pending_approvals" = "Aprobaciones Pendientes"
"admin.stats.system_health" = "Estado del Sistema"
# Admin Quick Actions
"admin.quick_actions.title" = "Acciones Rápidas"
"admin.quick_actions.manage_users" = "Gestionar Usuarios"
"admin.quick_actions.manage_roles" = "Gestionar Roles"
"admin.quick_actions.manage_content" = "Gestionar Contenido"
# Admin Recent Activity
"admin.recent_activity.title" = "Actividad Reciente"
"admin.recent_activity.no_activity" = "Sin actividad reciente"
"admin.recent_activity.no_activity_desc" = "La actividad aparecerá aquí cuando los usuarios interactúen con el sistema"
# Admin Users
"admin.users.title" = "Gestión de Usuarios"
"admin.users.add_user" = "Agregar Nuevo Usuario"
"admin.users.search_placeholder" = "Buscar por nombre o email..."
"admin.users.filter_status" = "Filtrar por Estado"
"admin.users.clear_filters" = "Limpiar Filtros"
"admin.users.table.user" = "Usuario"
"admin.users.table.roles" = "Roles"
"admin.users.table.status" = "Estado"
"admin.users.table.last_login" = "Último Acceso"
"admin.users.table.actions" = "Acciones"
"admin.users.edit" = "Editar"
"admin.users.activate" = "Activar"
"admin.users.suspend" = "Suspender"
"admin.users.delete" = "Eliminar"
"admin.users.delete_confirm" = "¿Estás seguro de que quieres eliminar este usuario?"
# Admin Roles
"admin.roles.title" = "Gestión de Roles"
"admin.roles.create_role" = "Crear Nuevo Rol"
"admin.roles.view_permissions" = "Ver Permisos"
"admin.roles.search_placeholder" = "Buscar por nombre o descripción..."
"admin.roles.system_role" = "Rol del Sistema"
"admin.roles.users" = "usuarios"
"admin.roles.permissions" = "permisos"
"admin.roles.delete_confirm" = "¿Estás seguro de que quieres eliminar este rol?"
# User Status
"status.active" = "Activo"
"status.inactive" = "Inactivo"
"status.suspended" = "Suspendido"
"status.pending" = "Pendiente"
# Admin Content Management
"admin.content.title" = "Gestión de Contenido"
"admin.content.subtitle" = "Gestiona tu contenido, publicaciones y medios"
"admin.content.refresh" = "Actualizar"
"admin.content.create" = "Crear Contenido"
"admin.content.upload" = "Subir Archivos"
"admin.content.edit" = "Editar"
"admin.content.view" = "Ver"
"admin.content.delete" = "Eliminar"
"admin.content.cancel" = "Cancelar"
"admin.content.save" = "Guardar"
# Content Stats
"admin.content.stats.total" = "Total de Contenido"
"admin.content.stats.published" = "Publicado"
"admin.content.stats.drafts" = "Borradores"
"admin.content.stats.scheduled" = "Programado"
"admin.content.stats.views" = "Total de Visitas"
# Content Filters
"admin.content.search" = "Buscar"
"admin.content.search_placeholder" = "Buscar contenido..."
"admin.content.filter_type" = "Tipo de Contenido"
"admin.content.filter_state" = "Estado"
"admin.content.all_types" = "Todos los Tipos"
"admin.content.all_states" = "Todos los Estados"
"admin.content.sort" = "Ordenar Por"
"admin.content.sort.updated" = "Última Actualización"
"admin.content.sort.created" = "Fecha de Creación"
"admin.content.sort.title" = "Título"
"admin.content.sort.views" = "Visitas"
# Content Types
"admin.content.type.blog" = "Blog"
"admin.content.type.page" = "Página"
"admin.content.type.article" = "Artículo"
"admin.content.type.documentation" = "Documentación"
"admin.content.type.tutorial" = "Tutorial"
# Content States
"admin.content.state.draft" = "Borrador"
"admin.content.state.published" = "Publicado"
"admin.content.state.archived" = "Archivado"
"admin.content.state.scheduled" = "Programado"
# Content Formats
"admin.content.format.markdown" = "Markdown"
"admin.content.format.html" = "HTML"
"admin.content.format.plain_text" = "Texto Plano"
# Content Table
"admin.content.table.title" = "Título"
"admin.content.table.type" = "Tipo"
"admin.content.table.state" = "Estado"
"admin.content.table.language" = "Idioma"
"admin.content.table.author" = "Autor"
"admin.content.table.updated" = "Actualizado"
"admin.content.table.views" = "Visitas"
"admin.content.table.actions" = "Acciones"
# Content Forms
"admin.content.create_title" = "Crear Nuevo Contenido"
"admin.content.edit_title" = "Editar Contenido"
"admin.content.edit_placeholder" = "Funcionalidad de edición de contenido"
"admin.content.upload_title" = "Subir Archivos de Contenido"
"admin.content.upload_description" = "Arrastra y suelta archivos aquí o haz clic para examinar"
"admin.content.choose_files" = "Elegir Archivos"
"admin.content.form.title" = "Título"
"admin.content.form.slug" = "Slug"
"admin.content.form.content" = "Contenido"
"admin.content.form.type" = "Tipo de Contenido"
"admin.content.form.format" = "Formato"
"admin.content.form.state" = "Estado"
"admin.content.form.tags" = "Etiquetas"
"admin.content.form.tags_placeholder" = "Etiquetas separadas por comas"
"admin.content.form.category" = "Categoría"
"admin.content.form.excerpt" = "Extracto"
"admin.content.form.seo_title" = "Título SEO"
"admin.content.form.seo_description" = "Descripción SEO"
"admin.content.form.require_login" = "Requiere Inicio de Sesión"
"admin.content.form.allow_comments" = "Permitir Comentarios"
# Content Language Filtering
"admin.content.filter_language" = "Idioma"
"admin.content.all_languages" = "Todos los Idiomas"
"admin.content.language.english" = "Inglés"
"admin.content.language.spanish" = "Español"