# Restify Documentation

Restify serves JSON:API endpoints and MCP tools for your Laravel for Rust models. You describe a model's API once, in a repository, and Restify serves it to people and to AI agents with the same rules.

These guides ship inside the `laravel-restify` crate, so they always match the version an application has installed.

- [Installation](installation.md): add Restify to an application and serve a first model.
- [Repositories](repositories.md): everything a repository can declare.
- [Fields](fields.md): what a resource shows, in which view and to whom, and how each type is written.
- [Filtering](filtering.md): search, filters, sorting and pagination of a list.
- [Relationships](relationships.md): loading a model's related models with `?related=`.
- [Writing](writing.md): the input that creates and updates a model, validation, and hooks.
- [Files and images](files.md): file uploads, where they are saved, how they are shown, and deleting them.
- [Actions and getters](actions.md): operations beyond list, show, create, update and delete, such as publishing a post.
- [Authorization](authorization.md): API tokens, and who may do what.
- [Sanctum tokens](sanctum.md): keep the Laravel Sanctum tokens of a PHP application working after it moves to Rust, and create new ones.
- [Authentication](authentication.md): the register, login, logout, password reset, email verification and profile endpoints of Restify for PHP.
- [Soft deletes](soft-deletes.md): hide deleted rows, and mark rows deleted instead of removing them.
- [Bulk operations](bulk.md): creating, updating and deleting many models in one request, all or nothing.
- [MCP](mcp.md): the tools AI agents get, and how to connect an agent.
- [OpenAPI](openapi.md): the OpenAPI 3.1 document of the endpoints, for API clients and SDK generators.
- [Reference](reference.md): every endpoint, parameter, response shape and status code.
- [Testing](testing.md): testing endpoints, tools and commands.
- [Before you go to production](production.md): the settings to check before the first deploy.
- [Troubleshooting](troubleshooting.md): compiler errors and unexpected responses, with their fixes.
- [Migrating from Restify for PHP](migrating-from-php.md): move a PHP Restify API to Rust, and prove it answers the same.

## For AI coding agents

Run `laravel restify:install` once in an application. It writes a skill to `.agents/skills/building-apis-with-restify` that tells an agent how to work with Restify and where these guides are, and the skill `restify-migrate`, which moves a Restify for PHP application to Rust. It writes the same files to `.claude/skills`, where Claude Code finds them as `/building-apis-with-restify` and `/restify-migrate`. In a PHP application, `php artisan restify:rust-install` writes `restify-migrate` ([Migrating from Restify for PHP](migrating-from-php.md#with-an-ai-coding-agent)). Run `laravel restify:list --json` to see what an application serves.

## Status

Restify for Laravel for Rust is at version 0.2, on `laravel-rust` 0.2.
