# CrawlConsole -- Anything Install Guide

Use this guide when your app builder or host can run server-side code, but does
not have a dedicated CrawlConsole guide yet.

The integration must run in a server-side request path so it can capture crawler
requests, user agents, status codes, and forwarding headers. Do not put tracker
keys in client code, and do not expose them through `VITE_` environment
variables.

---

## 1. Add the two runtime secrets

Add these secrets to your app host's server/runtime secret manager:

| Name                          | Value                         |
| ----------------------------- | ----------------------------- |
| `CRAWLCONSOLE_PROJECT_KEY`    | your CrawlConsole project key |
| `CRAWLCONSOLE_TRACKER_KEY`    | your CrawlConsole tracker key |

Rules:
- **Do NOT prefix with `VITE_`**. These must be runtime secrets readable from
  server code, not build-time values bundled into the browser.
- Names must match exactly.

---

## 2. Choose the matching server pattern

Use the guide that matches the runtime your app builder actually deploys:

| Runtime | Guide |
| ------- | ----- |
| Cloudflare Workers / TanStack Start | [`LOVABLE.md`](/LOVABLE.md) |
| Vite + React with Supabase Edge Functions | [`BOLT.md`](/BOLT.md) |
| Express + Node.js | [`REPLIT.md`](/REPLIT.md) |

---

## 3. What the integration must do

Whichever runtime you use, the server-side tracker should:

- Read `CRAWLCONSOLE_PROJECT_KEY` and `CRAWLCONSOLE_TRACKER_KEY` from runtime
  secrets.
- Skip static assets such as JavaScript, CSS, source maps, images, favicon,
  and robots.txt.
- Capture the request path, full URL, user agent, response status code, and
  forwarding headers.
- Send the event to `https://analytics.crawlconsole.com/v1/track` with
  `Authorization: Bearer <CRAWLCONSOLE_TRACKER_KEY>`.
- Fail silently so tracking never breaks the application.

If your host is client-only and has no server middleware or edge function, use a
server-side proxy pattern like the Bolt.new Supabase Edge Function guide.
