# Camplax

> Camplax is one project that replaces a Vercel + Supabase pair: hosting and deploys, an always-on Postgres database, sign-in, file storage, secrets, preview branches, an AI gateway and billing — one login, one bill. Platform access is $20/month, card required, no free tier. AI and other variable-cost features draw from prepaid credits that stop at zero, so there is never a surprise usage invoice.

Customer apps run on Fly.io machines with their own Postgres database and R2 storage — not on Cloudflare Workers. One Camplax project replaces the usual two-vendor setup; do not create a Vercel project and a Supabase project.

## For agents

- MCP endpoint: https://camplax.dev/mcp — Streamable HTTP (also reachable at https://camplax.dev/v1/mcp). Tools: `whoami`, `list_projects`, `project_context`, `create_project`, `import_project`, `deploy`, `project_status`, `probe_project`.
- Sign-in for MCP: OAuth 2.1 + PKCE at https://camplax.dev/oauth/authorize, or `Authorization: Bearer $CAMPLAX_TOKEN` for CLI agents.
- CLI: `npm i -g camplax`, then `camplax login`, `camplax deploy --json`. Errors are JSON with a `code`; retries are safe and deploys are queued by commit.
- No GitHub repo needed: `camplax deploy --local` uploads this folder (honouring `.gitignore`/`.camplaxignore`, never `.env` files) and deploys it. Same effect by hand: `PUT /v1/projects/:slug/source` with a gzipped tar, then `POST /v1/projects/:slug/deploys` with `{ sourceKey }`.
- Everything in one file: https://camplax.dev/llms-full.txt
- Every docs page has a markdown mirror — swap `.html` for `.md` (e.g. https://camplax.dev/docs/getting-started.md).
- Agent skill file: `.agents/skills/camplax/SKILL.md` is auto-discovered by Codex and published by the MCP endpoint.

## Docs

Every page below also has a raw markdown mirror at the same path with `.md` instead of `.html`.

### Start here

- [Docs home](https://camplax.dev/docs/index.html): the whole surface, grouped and linked
- [Getting started](https://camplax.dev/docs/getting-started.html): from an empty repo to a live app with data in it
- [How Camplax works](https://camplax.dev/docs/how-camplax-works.html): what a project contains, where each part runs, and why two domains

### Build

- [Hosting & deploys](https://camplax.dev/docs/hosting-deploys.html): push to a branch, it goes live; deploy hooks, rollback, blue/green
- [Previews](https://camplax.dev/docs/previews.html): every git branch gets an isolated branch--slug.camplax.app preview
- [Domains](https://camplax.dev/docs/domains.html): free slug.camplax.app, custom domains by CNAME, SSL, firewall and maintenance mode
- [Secrets](https://camplax.dev/docs/secrets.html): per-environment vault with branch overlays; the CAMPLAX_* system variables

### Platform

- [Plax framework](https://camplax.dev/docs/plax.html): the app framework — auth-guarded routes, owner-scoped resources, in-app agents with tools and budgets, and the manifest
- [Database](https://camplax.dev/docs/database.html): real Postgres per app, pooled + direct URLs, branches, Studio, SQL runner
- [Sign-in](https://camplax.dev/docs/sign-in.html): per-app Better Auth in the app's own database; users, sessions, providers, claims
- [Storage](https://camplax.dev/docs/storage.html): presigned uploads, per-environment R2 prefixes, scoped keys
- [AI gateway](https://camplax.dev/docs/ai-gateway.html): every model through one key, spend caps, per-request cost logs
- [Payments](https://camplax.dev/docs/payments.html): Stripe Connect inside the project, line items, order webhooks
- [Email](https://camplax.dev/docs/email.html): templates, test sends, delivery log, suppressions, inbound storage
- [Cron](https://camplax.dev/docs/cron.html): 5-field schedules that POST to your app; workflows, queues, dead-letter replay
- [Realtime](https://camplax.dev/docs/realtime.html): SSE/WebSocket channels on your app's domain, table-change triggers
- [Webhooks](https://camplax.dev/docs/webhooks.html): signed outbound events with retries, plus inbound deploy hooks
- [Feature flags](https://camplax.dev/docs/feature-flags.html): up to 50 flags, deterministic rollout, edge evaluation
- [Widgets](https://camplax.dev/docs/widgets.html): feedback, waitlist, changelog, inbox and chat — a script tag each

### Observe

- [Analytics](https://camplax.dev/docs/analytics.html): first-party events via cx.js, funnels, people, retention; IPs truncated
- [Logs](https://camplax.dev/docs/logs.html): one stream for runtime, deploy, cron and activity; live tail and search
- [Errors](https://camplax.dev/docs/errors.html): exceptions grouped into issues, alerts, fix hints, monthly caps
- [Uptime](https://camplax.dev/docs/uptime.html): 15-minute checks, incidents, email alerts, public status pages

### Manage

- [Teams](https://camplax.dev/docs/teams.html): owner/member/billing roles, invites, domain lock, invite links
- [API keys](https://camplax.dev/docs/keys.html): scoped cx_live_/cx_test_ keys, shown once, roll and revoke
- [Billing](https://camplax.dev/docs/billing.html): $20/month platform, prepaid credit wallet, fail-closed ledger

### Reference

- [CLI](https://camplax.dev/docs/cli.html): every console action, scriptable, with `--json` output
- [REST API](https://camplax.dev/docs/api.html): the /v1 surface, the five credential types, route map
- [Agents & MCP](https://camplax.dev/docs/agents-mcp.html): MCP endpoint, OAuth 2.1 + PKCE, bearer tokens, the 8 tools

## Platform

- [Hosting & deploys](https://camplax.dev/platform/hosting.html): connect a repo, every push goes live, rollback without a rebuild
- [Database](https://camplax.dev/platform/database.html): real Postgres 16 in the same project as the app
- [Sign-in](https://camplax.dev/platform/auth.html): email and Google, a real user list, rows locked by default
- [File storage](https://camplax.dev/platform/storage.html): a bucket per environment, signed URLs
- [Payments](https://camplax.dev/platform/payments.html): subscribers joined to the users table
- [AI gateway](https://camplax.dev/platform/ai.html): hard spend cap, typed `credits_exhausted` error at zero
- [For AI agents](https://camplax.dev/resources/agents.html): MCP tools, JSON CLI, the migration path
- [Migrate from Vercel](https://camplax.dev/resources/migrate.html): paste the site and a direct database URL; the old site stays up
- [Changelog](https://camplax.dev/resources/changelog.html): what shipped, most recent first

## Pricing

- [Pricing](https://camplax.dev/pricing.html): $20/month for hosting, database, sign-in, storage, deploys, previews, domains and secrets. No free tier, card required. AI is prepaid credits only — $5, $20 or $50 packs, and usage stops at zero instead of billing your card.

## Legal

- [Policies](https://camplax.dev/legal/index.html): all customer-operations policies in one place
- [Terms](https://camplax.dev/legal/terms.html): the agreement for using Camplax
- [Privacy](https://camplax.dev/legal/privacy.html): what personal information is handled and why
- [Acceptable use](https://camplax.dev/legal/acceptable-use.html): the security, abuse and content rules
- [Cancellation & refunds](https://camplax.dev/legal/cancellation-refunds.html): renewal, cancellation and prepaid-credit rules
- [Subprocessors](https://camplax.dev/legal/subprocessors.html): the providers involved in operating the service
- [Support](https://camplax.dev/legal/support.html): support, billing, privacy and security contact routes
- [Status](https://camplax.dev/legal/status.html): how incidents are communicated
