The Ecosystem

Three powerful libraries working together to make web development in Vala a joy

Astralis

The high-performance web server foundation. Astralis provides the HTTP server, routing, compression, and static file serving that powers Spry applications.

HTTP Server Routing Compression Fast Resources Middleware
Vala
var app = new WebApplication(8080);
app.use_compression();
app.add_endpoint(
    new EndpointRoute("/api")
);
app.run();

Inversion

A lightweight dependency injection container. Inversion manages your services, stores, and component lifecycles with elegant IoC patterns.

IoC Container DI Lifecycles Factories Modules
Vala
// Register services
container.add_singleton();
container.add_scoped();
container.add_transient();

// Inject anywhere
var db = inject();

Spry

The component-based web framework. Spry brings reactive templates, HTMX integration, and a delightful developer experience to Vala web development.

Components HTMX Templates Outlets Actions
Vala
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:

1

Astralis Handles HTTP

Receives requests, routes them to the right handler, and sends responses with compression.

2

Inversion Manages Dependencies

Creates and injects services, stores, and components with the right lifecycle.

3

Spry Renders UI

Components handle requests, render templates, and respond with HTML for HTMX.

🏗 Architecture Overview

Request Flow
┌─────────────────────────────────────────────────────────────┐
│                        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.