liveBook · Manning

SmartCMS

As explained in Server-Side WebAssembly

SmartCMS is a content management system for creating, curating, storing, and presenting children's stories.

SmartCMS is a content management system for creating, curating, storing, and presenting children’s stories. Its frontend collects and displays stories, while a Wasm-powered backend handles storage, HTTP access, and machine-learning generation. section 2.5

The backend is organized around three cooperating components:

  • A key-value store persists stories to storage such as disk, Redis, or NATS. section 2.5
  • An HTTP component acts as the API gateway between the frontend and backend. section 2.5
  • A machine-learning component generates stories through a neural-network WIT interface. section 2.5
Figure 2.4 The basic architecture for our SmartCMS application
A screenshot of a computer

AI-generated content may be incorrect.

Architecture diagram showing the frontend, backend components, and Kubernetes orchestration. section 2.5

The system develops incrementally: a minimal WIT content API becomes a JavaScript guest with a custom Rust host, gains a composed machine-learning guest, adopts wasi:nn, moves to wasmCloud, and finally runs as a Kubernetes service. section 9.1

Deploying SmartCMS

Push the application to a registry, adapt wadm.yaml, deploy the Ollama LLM backend, and apply the configuration with kubectl apply -f wadm.yaml. Forward NATS with kubectl port-forward nats-0 4222, inspect status using wash app status smart-cms, and expose the application with kubectl port-forward deployment/wasmcloud-host 8000. The browser interface can then create, retrieve, and generate stories; logs are available through kubectl logs -l app.kubernetes.io/instance=wasmcloud-host -c wasmcloud-host. section 8.4 section 8.4.3

Figure 9.1 Final architecture of SmartCMS deployed in Kubernetes. The frontend interacts with a wasmCloud host via an HTTP server. Inside the host, Wasm components use capability providers for storage and ML. The ML provider delegates inference to Ollama, while persistent storage is handled by kvnats.

Final architecture showing HTTP access, wasmCloud capability providers, Ollama inference, and kvnats persistence. section 9.1

How Server-Side WebAssembly covers it

How deep it goes
Defines a WIT content API, traces component composition and providers, and reaches deployment; optional observability and cloud extensions remain separate.
Examples
Uses a WIT key-value interface, browser story operations, LLM generation, Kubernetes manifests, port forwarding, and deployment-status inspection.
What you can do after
Operate/configure a multiservice Wasm story application with storage, LLM inference, component linking, and Kubernetes deployment.
How it connects
Connects WebAssembly Interface Types, key-value stores, HTTP, machine learning, wasmCloud, capability providers, Ollama, and Kubernetes.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Server-Side WebAssembly. The section links point to the parts of the book it draws on.