API Reference

Builder Methods

MethodDescription
Lithair::new()Create a new Lithair instance
.with_routing()Enable HTTP routing
.with_static_files(path)Serve static files from directory
.with_database()Enable embedded data engine
.with_auth()Enable authentication
.with_mfa_totp()Enable MFA/TOTP endpoints
.with_rbac_config()Enable role-based access control
.run()Start the server

Model Attributes

AttributeDescription
#[db(indexed)]Create an index on this field
#[http(expose)]Expose field in REST API
#[http(validate = "...")]Add validation rule
#[lifecycle(audited)]Track changes to this field
#[lifecycle(versioned = N)]Keep N historical versions
#[permission(write = "Role")]Require role for write access