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
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
