# nestjs-endpoints > Write each NestJS endpoint as one file with Zod schemas, and get validation and a typed axios or React Query client. **Coding agents:** read the [Agent playbook](/ai/playbook.md) first. It has the rules and a recipe for each task, and links to the pages below. ## Table of Contents ### Introduction - [Getting started](/guide/getting-started.md): Install nestjs-endpoints in a NestJS app, write a first endpoint and call it. - [Why nestjs-endpoints](/guide/why.md): What nestjs-endpoints replaces in a NestJS app, what it leaves alone, and what it asks of you. - [How it fits NestJS](/guide/nestjs.md): What an endpoint is to the rest of a NestJS app, and how modules, providers, guards, interceptors and adapters apply to it. - [Improvements on NestJS](/guide/improvements.md): What nestjs-endpoints adds to NestJS itself — guards, interceptors and middleware scoped to a router module, validation that gives each schema only its own value and runs faster, and responses the compiler checks. - [Performance](/guide/performance.md): Benchmarks of nestjs-endpoints against NestJS controllers that validate with NestJS's own schema validation — about 25% more requests per second where both validate. ### Endpoints - [Writing an endpoint](/guide/endpoints.md): Define an endpoint with endpoint.query() or endpoint.mutation() — its request schemas, HTTP method, output and handler. - [Type safety](/guide/type-safety.md): What the compiler checks in an endpoint and in the generated client, all inferred from the endpoint's Zod schemas. - [Responses](/guide/responses.md): An endpoint's output schema — one response, a schema per status code, and transforms in output schemas. - [Dependency injection](/guide/dependency-injection.md): Inject providers and per-request values into an endpoint's handler, per endpoint or once for a whole router. ### Routing - [File-based routing](/guide/file-based-routing.md): How an endpoint file's location becomes its URL — path segments, $param path parameters, _folders and endpoint.ts files. - [Routers](/guide/routers.md): Routers — NestJS modules that find a folder's endpoints and give them a URL prefix, providers, middleware, interceptors and guards. - [Explicit paths](/guide/explicit-paths.md): Register endpoints by hand with an explicit path, as controllers or on a router, and mix them with file-based routing. ### Clients - [Generating clients](/clients/codegen.md): Generate a typed axios or React Query client from your endpoints' Zod schemas with setupCodegen. - [axios client](/clients/axios.md): The generated axios client — creating one, calling operations, reading results, handling errors and configuring requests. - [React Query client](/clients/react-query.md): The generated React Query client — hooks on the client object, queryOptions and mutationOptions outside React, query keys and input schemas. - [Namespaces](/clients/namespaces.md): Router namespaces nest operations in the generated clients, and a client's namespaces option limits it to part of the API. - [OpenAPI](/clients/openapi.md): Building an OpenAPI document for an app that uses nestjs-endpoints, with @nestjs/swagger and the metadata endpoints carry. ### Workflow - [Development](/guide/development.md): The commands to run an app in development, so that the endpoint files you add are served and the clients follow. - [Testing](/guide/testing.md): Test endpoints over HTTP, through the generated client, one router at a time, or by calling a handler directly with invoke(). ### AI agents - [Built for agents](/ai/overview.md): How nestjs-endpoints tells a coding agent about itself - the rules file and skill it installs, and llms.txt on the site and inside the npm package. - [Agent playbook](/ai/playbook.md): Recipes for a coding agent - tell whether a repo uses nestjs-endpoints, add or change an endpoint, route it, give it providers, regenerate and call the client, test it, and find the cause of an error. ### Reference - [Endpoint options](/reference/endpoint.md): Every option of endpoint.query() and endpoint.mutation(), and what the handler receives. - [Router options](/reference/router.md): Every option of NestjsEndpoints.forRoot() and EndpointRouterModule.create(), and what they return. - [Exports](/reference/exports.md): What the nestjs-endpoints package exports. - [Troubleshooting](/reference/troubleshooting.md): Symptoms and causes — routes that 404, validation errors, setup, codegen and import cycles.