nuxt-actions
Type-safe server actions for Nuxt with Standard Schema validation.
Create and list todos using E2E typed action references from #actions.
Form ActionsuseFormAction with field-level validation errors, dirty tracking, and reset.
Optimistic UpdatesToggle todo status with instant UI updates and automatic rollback on error.
Smart Cache InvalidationuseActionMutation + tags — a write auto-refetches every query that depends on it.
File Uploadsmultipart/form-data parsed into typed file fields. Avatar upload with preview.
Auth PresetdefineAuthMiddleware resolves ctx.user or rejects with a typed 401.
OpenAPI & Swagger UIGenerate an OpenAPI 3.1 document and Swagger UI straight from your actions.
Idempotent PaymentsDouble-clicking Pay never double-charges — idempotency option replays duplicate requests.
ObservabilityGlobal action:start/success/error/settled hooks plus grouped actions.admin.metrics.
ResilienceExponential retry backoff with jitter, cancelPrevious search, and manual cancel().
StreamingAI-style text streaming via Server-Sent Events with real-time chunk updates.
SSR QueriesServer-rendered queries with debounced search and automatic re-fetching.
Middleware & AuthAuthentication flow with chained middleware, validation, and error handling.
Advanced FeaturesRetry, timeout, custom headers, dedupe, throttle, output validation, and executeAsync.
Polling & Auto-RefetchrefetchInterval, refetchOnFocus, refetchOnReconnect, enabled toggle, and transform.
Infinite ScrollCursor-based pagination with useInfiniteActionQuery — fetchNextPage, hasNextPage.
Batch ExecutionExecute multiple actions in parallel or sequentially with useActions.
Security MiddlewareBuilt-in rateLimitMiddleware and csrfMiddleware for action protection.
Progressive EnhancementuseActionState for forms that work with and without JavaScript.
Real-World AppComplete mini todo app combining auth, CRUD, optimistic updates, and validation.
Prefetch & Stream CacheprefetchAction to pre-warm cache on hover, useStreamActionQuery with persistent cache.