> ## Documentation Index
> Fetch the complete documentation index at: https://latchkey.getgalaxy.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Introduction to Latchkey

> Latchkey is a self-hosted authorization layer for ConnectRPC products, run as a service or embedded in a Go product.

> [!NOTE]
>
> Latchkey is pre-V1. These docs describe the V1 design, and most of it is
> not built yet.

Latchkey answers one question before a product RPC reaches its handler. May
this subject perform this action on this kind of resource, and on this
specific resource? Products describe their domain in proto annotations.
Latchkey evaluates a fixed model and returns allow or deny.

It runs two ways from the same Go module. As a service, one instance serves
several products and many tenants. Embedded, it runs inside a single Go
product with nothing extra to deploy. The model, the API and the data are the
same in both.

## What it gives a product

* One authorization model for every product, such as Filament and Alchemy.
* Checks in a Connect interceptor, before a request reaches a handler.
  Products never evaluate policy.
* Built-in Admin, Creator and Viewer roles, plus custom roles each tenant
  defines.
* Roles bound to users, groups or services, across the tenant or on a
  single resource.
* A stable ConnectRPC API that any team can run as its own service.

## What it leaves out

* **Authentication.** Latchkey receives a subject that was already verified
  upstream.
* **Row-level security.** Read covers the whole tenant, and list results are
  never filtered.
* **Project scope.** Filament and Alchemy have no projects yet. A project
  scope can be added later as a new kind of scope.
* **A policy language.** The model is fixed and evaluated in Go.

## Where to go next

> [card] [Concepts](https://latchkey.getgalaxy.io/pages/guides/concepts/overview.md)
>
> The model, how a check decides, and a worked example.

> [card] [Integrate a product](https://latchkey.getgalaxy.io/pages/guides/usage/integrating.md)
>
> Annotate protos, install the interceptor and turn enforcement on.

> [card] [Deploy](https://latchkey.getgalaxy.io/pages/guides/deployment/overview.md)
>
> Service and embedded modes, the database boundary and failure behavior.

> [card] [Security](https://latchkey.getgalaxy.io/pages/guides/concepts/security.md)
>
> Who may call what, and how Latchkey fails closed.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.