Documentation Index
Fetch the complete documentation index at: https://kubo-47e69177.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Architecture
High-level flow
- Server action contracts live close to the domain.
- Query keys and tags are defined once per feature.
- Client components call actions through query and mutation hooks.
- Cache invalidation is driven by tags, not ad-hoc manual keys.
Recommended folders
app/
actions/
todos.ts
users.ts
providers.tsx
query-keys.ts
features/
todos/
ui/
tests/
packages/
core/
react/
query/
Keep contracts close to features
import { defineAction } from "@zapaction/core";
import { z } from "zod";
export const listTodos = defineAction({
input: z.object({}),
output: z.array(z.object({ id: z.string(), title: z.string(), done: z.boolean() })),
handler: async () => []
});
Keep query key strategy explicit
import { createFeatureKeys, createFeatureTags } from "@zapaction/core";
export const todoKeys = createFeatureKeys("todos", {
all: () => [],
byId: (id: string) => ["by-id", id]
});
export const todoTags = createFeatureTags("todos", {
byId: (id: string) => ["by-id", id]
});