@stratal/inertia
v0.0.18
Published
Inertia.js v3 server adapter for Stratal framework — server-driven React SPAs
Downloads
1,062
Maintainers
Readme
@stratal/inertia
Inertia.js v3 server adapter for Stratal framework — build server-driven React SPAs on Cloudflare Workers.
Features
- InertiaModule — Drop-in Stratal module with
forRoot()/forRootAsync()configuration - Server-Side Rendering — SSR support with configurable per-route disabling
- Shared Data — Global shared props with static values or request-scoped resolvers
- @InertiaRoute Decorator — Convention-based Inertia page routes with auto-applied response schema
- Partial Reloads — Optional, deferred, and merge props for efficient data loading
- Quarry CLI Commands —
inertia:install,inertia:dev,inertia:build, andinertia:types
Installation
npm install @stratal/inertia
# or
yarn add @stratal/inertiaAI Agent Skills
Stratal provides Agent Skills for AI coding assistants like Claude Code and Cursor. Install to give your AI agent knowledge of Stratal patterns, conventions, and APIs:
npx skills add strataljs/stratal| Skill | Description |
|---|---|
| stratal | Build Cloudflare Workers apps with the Stratal framework — modules, DI, controllers, routing, OpenAPI, queues, cron, events, seeders, CLI, auth, database, RBAC, testing, and more |
Quick Start
Module setup
import { Stratal } from 'stratal'
import { Module } from 'stratal/module'
import { InertiaModule } from '@stratal/inertia'
@Module({
imports: [
InertiaModule.forRoot({
rootView: 'app',
entryClientPath: 'src/inertia/app.tsx',
sharedData: {
appName: 'My App',
},
}),
],
})
class AppModule {}
export default new Stratal({ module: AppModule })Controller with @InertiaRoute
import { Controller, type RouterContext } from 'stratal/router'
import { InertiaRoute } from '@stratal/inertia'
@Controller('/notes')
export class NotesController {
@InertiaRoute({ summary: 'List notes' })
async index(ctx: RouterContext) {
return ctx.inertia('notes/Index', { notes: [] })
}
}Documentation
Full guides and examples are available at stratal.dev.
License
MIT
