# ZapAction > Typed contracts for Next.js Server Actions and TanStack Query. ## Docs - [ActionErrorBoundary](https://kubo-47e69177.mintlify.app/en/api-reference/action-error-boundary.md): Boundary and reset hook from @zapaction/react. - [Cache Tags](https://kubo-47e69177.mintlify.app/en/api-reference/cache-tags.md): Tag registry and invalidation model across server and client. - [defineAction](https://kubo-47e69177.mintlify.app/en/api-reference/define-action.md): Typed action contract API from @zapaction/core. - [Logger](https://kubo-47e69177.mintlify.app/en/api-reference/logger.md): Configure action lifecycle logging in @zapaction/core. - [Middleware Hooks](https://kubo-47e69177.mintlify.app/en/api-reference/middleware-hooks.md): beforeAction and afterAction contract details. - [useAction](https://kubo-47e69177.mintlify.app/en/api-reference/use-action.md): Client hook from @zapaction/react for imperative action execution. - [useActionMutation](https://kubo-47e69177.mintlify.app/en/api-reference/use-action-mutation.md): Write hook from @zapaction/query with tag-based invalidation. - [useActionQuery](https://kubo-47e69177.mintlify.app/en/api-reference/use-action-query.md): Read hook from @zapaction/query backed by TanStack useQuery. - [Context7 Recipes](https://kubo-47e69177.mintlify.app/en/examples/context7-recipes.md): Copy-paste patterns that cover common ZapAction and React Query prompts. - [Full CRUD Example](https://kubo-47e69177.mintlify.app/en/examples/full-crud.md): Reference implementation from examples/next-app. - [Products Cart Module](https://kubo-47e69177.mintlify.app/en/examples/products-cart-module.md): Feature-key and feature-tag strategy for modular ecommerce flows. - [Architecture](https://kubo-47e69177.mintlify.app/en/guide/architecture.md): Recommended package and feature boundaries for ZapAction projects. - [Auth Patterns](https://kubo-47e69177.mintlify.app/en/guide/auth-patterns.md): Inject authentication context once and enforce authorization in actions. - [Client Data Fetching](https://kubo-47e69177.mintlify.app/en/guide/client-data-fetching.md): Use action-based reads and writes while keeping query behavior explicit. - [Error Handling](https://kubo-47e69177.mintlify.app/en/guide/error-handling.md): Handle validation, runtime, and UI errors with predictable boundaries. - [Middleware](https://kubo-47e69177.mintlify.app/en/guide/middleware.md): Use beforeAction and afterAction hooks for policy, audit, and shaping output. - [Optimistic Updates](https://kubo-47e69177.mintlify.app/en/guide/optimistic-updates.md): Use React Query optimistic mutation patterns with ZapAction mutations. - [Pagination](https://kubo-47e69177.mintlify.app/en/guide/pagination.md): Cursor pagination with useInfiniteQuery and action-based reads. - [Project Setup](https://kubo-47e69177.mintlify.app/en/guide/project-setup.md): Install and bootstrap ZapAction in a Next.js App Router project. - [React Query](https://kubo-47e69177.mintlify.app/en/guide/react-query.md): Read and write data with useActionQuery and useActionMutation. - [Testing Patterns](https://kubo-47e69177.mintlify.app/en/guide/testing-patterns.md): Vitest patterns for actions, hooks, and cache invalidation. - [Troubleshooting](https://kubo-47e69177.mintlify.app/en/guide/troubleshooting.md): Common setup and runtime problems with practical fixes. - [Introduction](https://kubo-47e69177.mintlify.app/en/introduction.md): What ZapAction solves and the shortest path to production usage. ## OpenAPI Specs - [openapi](https://kubo-47e69177.mintlify.app/api-reference/openapi.json)