The Ecosystem
Three powerful libraries working together to make web development in Vala a joy
A
Astralis
The high-performance web server foundation. Astralis provides the HTTP server, routing, compression, and static file serving that powers Spry applications.
var app = new WebApplication(8080);
app.use_compression();
app.add_endpoint(
new EndpointRoute("/api")
);
app.run();
I
Inversion
A lightweight dependency injection container. Inversion manages your services, stores, and component lifecycles with elegant IoC patterns.
// Register services
container.add_singleton();
container.add_scoped();
container.add_transient();
// Inject anywhere
var db = inject();
S
Spry
The component-based web framework. Spry brings reactive templates, HTMX integration, and a delightful developer experience to Vala web development.
class MyComponent : Component {
public override string markup {
owned get {
return "
";
}
}
}
🔗 How They Work Together
The three libraries form a complete stack for building web applications:
Astralis Handles HTTP
Receives requests, routes them to the right handler, and sends responses with compression.
Inversion Manages Dependencies
Creates and injects services, stores, and components with the right lifecycle.
Spry Renders UI
Components handle requests, render templates, and respond with HTML for HTMX.
🏗 Architecture Overview
┌─────────────────────────────────────────────────────────────┐
│ Browser │
│ (HTMX + HTML) │
└─────────────────────────┬───────────────────────────────────┘
│ HTTP Request
▼
┌─────────────────────────────────────────────────────────────┐
│ Astralis │
│ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐ │
│ │ Server │→ │ Router │→ │ Compression │ │
│ └─────────────┘ └─────────────┘ └─────────────┘ │
└─────────────────────────┬───────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────────────┐
│ Inversion │
│ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐ │
│ │ Container │→ │ Factories │→ │ Scopes │ │
│ └─────────────┘ └─────────────┘ └─────────────┘ │
│ ↓ inject() into components │
└─────────────────────────┬───────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────────────┐
│ Spry │
│ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐ │
│ │ Components │→ │ Templates │→ │ Actions │ │
│ └─────────────┘ └─────────────┘ └─────────────┘ │
│ ↓ HTML Response with HTMX attributes │
└─────────────────────────────────────────────────────────────┘
Experience the Power
See the ecosystem in action with our interactive demo.