Skip to content

deno-inertia — Documentation

@streemkit/inertia-deno is an Inertia.js server-side adapter for Deno. It uses only standard Web APIs (Request, Response, URLPattern) and integrates with any compatible framework or router (Hono, Oak, std/http, etc.).


Table of contents

PageDescription
InstallationPrerequisites, deno.json, npm
Quick startWorking project in 5 minutes
ConfigurationInertiaConfig — all fields
Renderingrender(), renderWithErrors(), redirect()
Propsnormal, shared, always, lazy, defer, merge
Forms & validationErrors, error bags, POST cycle
Flash messages__flash cookie, auto-clear
RoutercreateRouter(), params, middleware, groups
ViteDev + production integration
AdaptersHono, Oak, std/http
Inertia v2Deferred, merge, encryptHistory
TypeScriptPropValue<T>, PageProps<T>, all types
CLI@streemkit/inertia-deno-cli — init, dev, build, preview

Overview

What is Inertia.js?

Inertia.js is a protocol that creates server-driven SPAs without REST APIs or GraphQL. The server renders pages as named components with JSON props. The client (Vue, React, Svelte) mounts these components directly — SPA navigation without manual JSON/fetch.

Browser ──[ GET / ]──────────────────────► Deno
        ◄──[ HTML + <div data-page="…"> ]──

Browser ──[ GET /about  X-Inertia:true ]──► Deno
        ◄──[ JSON { component, props, url } ]──

Why deno-inertia?

ConstraintSolution
Works with Hono, Oak, std/http…Pure Request/Response API — no framework coupling
Inertia v1 + v2lazy, defer, merge, encryptHistory
Strict TypeScriptPropValue<T>, PageProps<T>, generics on render<T>()
Zero magicEvery behavior is explicit and testable

JSR packages

PackageRole
jsr:@streemkit/inertia-denoMain server library
jsr:@streemkit/inertia-deno/honoHono adapter (toWebRequest)
jsr:@streemkit/inertia-deno/oakOak adapter (toWebRequest + applyResponse)
jsr:@streemkit/inertia-deno-cliCLI (init, dev, build, preview)