# Apps

Borrow complete production-shaped patterns from Ferrite commerce, scheduling, support, compliance, dashboard, AI, and collaboration apps.

Ferrite apps are complete source-deployable Rust crates, not screenshots or
framework sketches. Use them to see how several platform features meet inside
one product boundary.

## Real-world reference apps

| App | What to borrow | Ferrite features |
| --- | --- | --- |
| `ferrite-demo-shop` | Full customer registration, session and CSRF flow, catalogue, cart, guarded inventory, orders, Stripe checkout and signed payment webhook, email delivery, admin policy | Transactions, Store, Queue, webhooks, egress, secrets, route limits, secure cookies, agent-ready |
| `fe-cal` | Slot holds, staff authentication, booking lifecycle, reminders, reports, public and private agent tools | Transactions, Store, delayed Queue, sessions, CSRF, scheduling, WebMCP |
| `ferrite-helpdesk` | Multi-tenant tickets, requester and agent roles, inbound email, attachments, SSE updates, AI assistance | Store, Object Storage, Queue, Streams, signed webhooks, AI Gateway |
| `ferrite-evidence-vault` | Evidence intake, integrity hashes, retention, legal holds, SSO-derived roles, review queue, audit | Store, Object Storage, Streams, signed assertions, route limits |

## Platform apps

- `ferrite-dashboard-app` packages the customer dashboard and connects it to
  the live browser-safe control API.
- `ferrite-ai-gateway` centralizes provider egress, budgets, and attribution.
- `ferrite-agents` runs durable agent sessions and tool workflows.
- `ferrite-workflows` coordinates private long-running steps.
- `ferrite-sql-app` and `ferrite-worker-app` demonstrate constrained SQL and
  WASM-oriented service shapes.
- `buzz`, `fe-plan-studio`, `fe-taskboard`, `agent-browser`, and the Arcwell apps
  show collaboration, protocol, browsing, and agent runtime patterns.

## Run an app

```bash
cd apps/ferrite-demo-shop
ferrite check
ferrite test
ferrite dev
```

Read the app’s README and `ferrite.json` before borrowing code. The manifest is
the shortest authority map: it shows every data handle, public route, forwarded
header, egress destination, secret, and compute limit.

## Serve a website

`ferrite new webapp my-app` creates an editable `site/index.html` and a public
content route. The CLI keeps a gate-safe Rust asset image synchronized before
check, test, build, and deploy. When the app starts, it publishes that image
through its own `site` Blob binding.

```bash
ferrite new webapp my-app --with-tests
cd my-app
ferrite dev
```

Save `site/index.html` to refresh the browser without compiling Rust. Save a
Rust source file to compile the application and restart its process while the
local Store, Queue, Stream, Transaction, and Object Storage state stays in
place. On deploy, the same asset is part of the attested source image; no
external bucket, upload command, or CDN configuration is required.

Generic service names resolve through Ferrite's per-app backing pool. Two apps
can both call a binding `site` or `state` without sharing keys, messages, or
objects. Use a workload-specific fixed service mapping only when several apps
are intentionally sharing one declared resource.

## What not to copy blindly

Keep tenant and role decisions aligned with your product. Do not reuse fixture
credentials, development-only secrets, canonical origins, or dated deployment
claims. Re-run the app’s focused acceptance and your own critical journey.
