Libraries Overview
Libraries Overview
Section titled “Libraries Overview”The Surkyl Platform includes several reusable libraries that provide shared functionality across applications. These libraries promote code reuse, maintain consistency, and accelerate development.
Frontend Libraries
Section titled “Frontend Libraries”Pixel Component Library
Section titled “Pixel Component Library”Modern Angular component library built with Material Design and TailwindCSS.
- Technology: Angular 20+ (standalone components)
- Key Features:
- Comprehensive theme system
- Pre-built UI components
- NanX Flows Workflow Engine - YAML-based workflow automation
- TailwindCSS integration
- Accessibility-first design
Backend Libraries (Rust)
Section titled “Backend Libraries (Rust)”Surkyl Core
Section titled “Surkyl Core”Core Rust utilities and shared functionality used across all Rust applications.
- Key Features: Common types, utilities, configuration helpers
- Used by: All Rust applications
Hypers
Section titled “Hypers”HTTP utilities and middleware helpers for Axum applications.
- Key Features: HTTP middleware, request/response utilities
- Used by: Gate, Surkyl Server
Validation and utility library providing common validation logic.
- Key Features: Input validation, data transformation
- Used by: Surkyl Server, Gate
MueSync
Section titled “MueSync”MueSync-specific utilities and shared code.
- Key Features: Product-specific utilities
- Used by: MueSync applications
Nanions
Section titled “Nanions”Background job and queue management library.
- Key Features: Job queuing, distributed task processing
- Used by: NanX, Surkyl Server
Using Libraries
Section titled “Using Libraries”In Angular Applications
Section titled “In Angular Applications”// Import from Pixel libraryimport { ButtonComponent } from '@surkyl/pixel';In Rust Applications
Section titled “In Rust Applications”# Add to Cargo.toml[dependencies]surkyl_core = { workspace = true }hypers = { workspace = true }// Import in Rustuse surkyl_core::manifest::Manifest;use hypers::middleware::Logger;Library Development
Section titled “Library Development”When developing libraries:
- Keep them focused - Each library should have a clear, single purpose
- Minimize dependencies - Reduce external dependencies where possible
- Document thoroughly - Libraries are shared code, document well
- Test extensively - Libraries are used by multiple apps, test coverage is critical
- Version carefully - Changes affect multiple consumers
Next Steps
Section titled “Next Steps”- Pixel Component Library - Explore the Angular component library
- Workflow Engine - Learn about NanX Flows
- Theme System - Customize the Pixel theme
- Contributing Guide - Contribute to libraries