---
name: add-camada
description: "Add camada to a web app or API so its AI analyst can find attackers, rogue AI agents, credential stuffers and scrapers, and the app blocks them. Use when asked to install, configure or wire up camada (CAMADA_KEY, @camada/node, @camada/next, @camada/hono, or the camada SDK for Python, Go, Ruby, PHP, Java or .NET)."
---

# Add camada to an app

camada keeps bad actors out of web apps and APIs. An SDK inside the app sends one redacted event per request, camada's AI analyst reviews the traffic every few minutes, and the SDK enforces the resulting blocklist in the app's process. It fails open: if camada is down or the SDK errors, the app keeps serving.

## Steps

1. Find the app's framework below and read its quickstart (Markdown, linked in the table). Use the install command the quickstart shows; do not guess a package name or version.
2. Ask the user for the project key. It is shown once, when they create a project at https://my.camada.app. Never invent a key and never commit it.
3. Set the environment variables in the process environment. Most SDKs read no .env file; the quickstart says how each framework gets them there.
4. Mount the middleware as the quickstart shows, before the app's routes, so blocked requests never reach them.
5. Optional, recommended: add the beacon to HTML pages, and call track() for login failures, signups and checkout declines.
6. Check it: with the key set, responses carry an x-rid header. If the app logs "camada is inactive", CAMADA_KEY did not reach the process.

```dotenv
CAMADA_KEY=<ingest_token>.<snap_token>
CAMADA_INGEST_URL=http://localhost:8787   # dev only; defaults to production ingest
```

`CAMADA_DISABLED=1` switches the SDK off, checked per request. Every variable: https://www.camada.app/docs.md

## Frameworks

| Framework | Package | Install | Quickstart |
| --- | --- | --- | --- |
| Express | `@camada/node` | `npm i @camada/node` | https://www.camada.app/docs/quickstart/express.md |
| Fastify | `@camada/node` | `npm i @camada/node` | https://www.camada.app/docs/quickstart/fastify.md |
| NestJS | `@camada/node` | `npm i @camada/node` | https://www.camada.app/docs/quickstart/nest.md |
| Koa | `@camada/node` | `npm i @camada/node` | https://www.camada.app/docs/quickstart/koa.md |
| Next.js | `@camada/next` | `npm i @camada/next` | https://www.camada.app/docs/quickstart/nextjs.md |
| FastAPI | `camada` | `pip install camada` | https://www.camada.app/docs/quickstart/fastapi.md |
| Django | `camada` | `pip install camada` | https://www.camada.app/docs/quickstart/django.md |
| Flask | `camada` | `pip install camada` | https://www.camada.app/docs/quickstart/flask.md |
| Go | `github.com/camada-app/camada-go` | `go get github.com/camada-app/camada-go` | https://www.camada.app/docs/quickstart/go.md |
| Rails | `camada` | `bundle add camada` | https://www.camada.app/docs/quickstart/rails.md |
| PHP | `camada/camada` | from GitHub, see the quickstart | https://www.camada.app/docs/quickstart/php.md |
| Laravel | `camada/camada` | from GitHub, see the quickstart | https://www.camada.app/docs/quickstart/laravel.md |
| Spring Boot | `dev.camada:camada` | from GitHub, see the quickstart | https://www.camada.app/docs/quickstart/spring.md |
| ASP.NET Core | `Camada` | from GitHub, see the quickstart | https://www.camada.app/docs/quickstart/aspnet.md |

Other runtimes and the per-language reference: https://www.camada.app/docs.md. Everything on the site: https://www.camada.app/llms.txt
