---
id: guide.customer-internal-serving
title: "Example: serve two audience builds"
summary: Follow a fictional billing example with two selected builds and an
  in-app export.
type: how-to
area: publishing
subarea: publishing-hosting
canonical: /publish/customer-internal-content
---

# Example: serve two audience builds

> Documentation index: [llms.min.txt](https://www.shoalrun.com/llms.min.txt) · Document manifest: [documents.json](https://www.shoalrun.com/documents.json)

Navigation section: [Docs](https://www.shoalrun.com/.well-known/shoalrun/navigation/docs-50f26fe22670.txt) (ID: docs). [All sections and pages](https://www.shoalrun.com/llms.min.txt)

Breadcrumbs: [Docs](https://www.shoalrun.com/what-is-shoalrun.md) > Publish and maintain > Example: audience builds

**Updated: 2026-11-14.**

**Available since: 1.3.0.**

This fictional billing example uses `customer` and `internal` as configured audience choices. They aren't built-in Shoalrun roles, and the labels don't grant permissions. Your project can declare other choices or select a different facet.

The example keeps shared instructions and additional sections in one source page, produces two website builds, and selects an in-app export separately. It illustrates one possible configuration rather than a required deployment model.

## Before you begin

Start in a project containing Shoalrun. Copy the packaged example into a working directory:

```sh
cp -R node_modules/@shoalrun/cli/examples/dual-audience-serving ./audience-demo
cd audience-demo
```

The example contains synthetic billing instructions. Don't replace them with real privileged information until your deployment's authentication and publishing checks are ready.

1. ### Review the audience boundaries

   In this example, `base.yaml` declares the customer and internal audience choices. The shared page has `audiences: [customer, internal]`. Shared paragraphs remain outside guards, while internal additions use a visible callout:

   ```mdx
   Customer-facing instructions.

   <ForFacet audience="internal">

   <Callout type="warning">

   **Company Internal Content**

   Privileged operational instructions.

   </Callout>

   </ForFacet>
   ```

   This is an authored composition of existing components. ForFacet doesn't add a label, glow, or box automatically. Unguarded text on a selected page is included. A custom project audit can enforce your team's marking conventions; the serving adapter doesn't classify paragraphs.

2. ### Build both websites and MCP bundles

   The customer config selects `audience: [customer]`; the internal config selects `audience: [internal]`. Run:

   ```sh
   npx --no-install shoalrun build customer.config.yaml dist/customer-site
   npx --no-install shoalrun build internal.config.yaml dist/internal-site
   npx --no-install shoalrun mcp export dist/customer-site --out dist/customer-mcp
   npx --no-install shoalrun mcp export dist/internal-site --out dist/internal-mcp
   ```

   Both builds use `production/current/en`. Their audience selections and bundle revisions differ; audience isn't an extra publication coordinate. Don't combine them in a server registry keyed only by publication.

3. ### Export customer in-app content

   The example's `app-help` export target explicitly selects customer content. Website `site.contentFilter` doesn't select application exports:

   ```yaml
   exports:
     app-help:
       formats: [html, markdown]
       contentFilter: { audience: [customer] }
       publicBase: /help/releases/demo/
       resources:
         - { kind: page, documentId: guide.billing }
         - { kind: section, documentId: guide.billing, sectionId: refunds }
   ```

   Build that target separately:

   ```sh
   npx --no-install shoalrun export customer.config.yaml --target app-help --out dist/app-help
   ```

   The page declares the refund section suitable for standalone use. Host the complete export at its `publicBase`, including assets, or use the Content REST adapter. Your app can fetch `guide.billing` or its `refunds` section using the [content client](https://www.shoalrun.com/content-delivery/client.md).

4. ### Serve and compare the two editions

   Run each command in a separate terminal:

   ```sh
   npx --no-install shoalrun serve dist/customer-site --port 8771
   ```

   ```sh
   npx --no-install shoalrun serve dist/internal-site --port 8772
   ```

   Open `http://127.0.0.1:8771/` and `http://127.0.0.1:8772/`. Only the internal page shows the Company Internal Content boxes. Their MCP endpoints are `/mcp` on the respective ports. For a host without Node, pass each discovery bundle to a separate [Python adapter](https://www.shoalrun.com/publish/python-serving.md), and optionally supply `dist/app-help` to the customer instance.

## Check the result

Confirm `INTERNAL_RETRY_QUEUE` and `INTERNAL_BILLING_REPLAY` appear in the internal build and are absent from every customer website, discovery, and application-export file. Test MCP search for those markers and try reading known internal-only IDs. Check both inclusion and exclusion so a missing fixture can't produce a false pass.

If you adapt this example for restricted content, protect the relevant website, MCP, Markdown, content routes, and assets with your own authentication. The current `mcp.access: public` configuration supplies no authentication itself. Keep audience directories and handler instances separate, and include the bundle revision in cache identity. The Node Content REST adapter's public immutable cache policy must be overridden for privileged responses.

## HTML, Markdown, and agents

The internal HTML page displays its authored callouts alongside shared instructions. Its Markdown and MCP reads retain the internal labels and text. The customer build omits each unmatched block before rendering, indexing, and dependency expansion. The customer in-app export applies its own filter and contains passive selected HTML or Markdown.

## Related reading

### Next steps

- [Read content with a client](https://www.shoalrun.com/content-delivery/client.md) — Read selected pages or standalone sections in an application.

### Reference while working

- [ForFacet](https://www.shoalrun.com/author/components/for-facet.md) — Review audience guard behavior and unguarded content.
