# Building Mojo promo and landing pages

Use this project to build working Mojo campaign pages. Give each page its own design and connect its form or checkout to the corresponding live Nautilus resource. The project supports production pages; a sample component's limitations do not restrict new work.

Read `mojo-resource-catalog.json` for the forms and checkout pages available to Mojo and its brands. It includes unpublished forms so you can understand existing campaigns, but only published forms and active checkout pages should be offered to visitors. This is a dated inventory: refresh it with Shipyard's `getNautilusEmbeds` tool before choosing a resource. The tool includes child-brand forms; its checkout lookup currently covers the project's organization only, so the catalog also records child-brand checkout pages.

## Pick the flow

| Visitor intent | Use | What Nautilus handles |
| --- | --- | --- |
| Contact, giveaway, lead capture, voucher request | Published form at `/c/form/{id}` | Configured fields, validation, submission, consent, and configured completion behavior |
| Buy a specific offer or membership | Active checkout at `/c/checkout/{id}` | Eligible locations and products, contact information, payment, and purchase result |
| Browse available products | Storefront at `/c/storefront/{slug}` | Catalog and location selection, followed by checkout |
| Reuse a custom Mojo campaign | Its verified `/c/mojobrands/...` route | Campaign-specific location, tier, eligibility, referral, and delivery behavior |

All paths above are relative to `https://www.nautilus-app.com`. Resource IDs, organization slugs, brand route segments, and location IDs are different values. Keep their associations intact. An active checkout or published form does not by itself establish that an old campaign's advertised dates and terms are still valid.

## Forms

The published form is the source of truth for fields and required flags. Nautilus renders fields from the form configuration, including field-specific validation and conditional visibility. Some forms require email verification, limit repeat submissions, or have access restrictions. Retain that behavior by embedding the hosted form.

Submission is handled by Nautilus's `submitFormResponse` server action. Form settings control the success title, message, button, and voucher display. Voucher display can wait for fulfillment after submission; do not show an issued voucher or delivery confirmation just because a visitor pressed a button. A form that displays vouchers does not guarantee a voucher will be issued for every submission.

Build the surrounding hero, explanation, imagery, and FAQs in Shipyard. Adjust the form's own fields, consent, or fulfillment settings in Nautilus. A React form copied from Nautilus cannot call its server actions from a different app without an explicitly supported integration.

## Checkout

A checkout link identifies a configured purchase flow. Its location/product mappings, discounts, price rules, and eligibility determine what can be bought. Let the hosted checkout collect payment and report the outcome. Do not turn a local success screen into proof of a charge or membership creation.

The Mojo `EmbeddedPromoFlow` implementation illustrates the sequence: branded offer, searchable location picker, then checkout scoped to the selected site's products. It excludes locations without a matching product. Its drawer can skip product selection for a single offer and combine contact and payment on one screen. These are capabilities of the Nautilus checkout, not props to pass to the Shipyard iframe wrapper.

Keep recurring price, introductory price, offer duration, and terms consistent with the selected checkout. A location selector must choose an eligible resource rather than merely changing the displayed location name. General storefront links support `?locationId={siteId}`; confirm other campaign query parameters individually.

## Mojo campaign behavior

The shared Nautilus `PromoPage` handles location → wash tier → customer details and consent → result. It filters participating brands, skips the tier screen when only one tier applies, and submits through `submitMojoPromoLeadForPortal`. The free-wash variant collects email. Referral variants also carry sender and share-token information; those tokens can expire or be used, so retain the existing hosted claim flow.

The paid Protect campaigns use `EmbeddedPromoFlow` and the configured checkout. Other campaigns use verified brand-specific destinations. A free-wash form, a discount-voucher request, and a paid membership purchase have different completion behavior. Select the matching resource before designing the call to action.

Current source routes include `/c/mojobrands/promo/free-wash` and `/c/mojobrands/promo/2-off`. Brand-specific route families include `/c/mojobrands/promo/10-off/{brand}` and `/c/mojobrands/promo/25-protect/{brand}`. Resolve valid brand segments from the campaign implementation; do not construct a URL from a display name. The catalog lists source route templates for reference, not an assertion that every brand or campaign is available.

## Reusable components in this project

These components are present on the latest working branch, `session-b4c1f478`. The default branch may contain only the starter and this guidance.

| Component | Role |
| --- | --- |
| `components/nautilus-embed.tsx` | Official loader wrapper for a hosted form, promo, checkout, or storefront |
| `components/promo/promo-shell.tsx` | Shared campaign page frame |
| `brand-card.tsx` | Brand presentation |
| `location-picker.tsx`, `branded-location-picker.tsx` | Location search and selection presentation |
| `tier-picker.tsx` | Wash-tier selection presentation |
| `stage-progress.tsx`, `back-button.tsx` | Progress and back navigation |
| `consent-block.tsx`, `branded-consent-block.tsx` | Sample consent presentation; use the campaign's real terms and submission contract |
| `success-screen.tsx`, `branded-success-screen.tsx` | Sample result layouts; render real success only after backend confirmation |
| `components/ui/*` | Existing buttons, inputs, cards, dialogs, and other shared UI primitives |

The `$2 off` page already uses the live `NautilusEmbed` component. The free-wash, Protect, Coastal, and LuLu's local flows still include simulated interactions. Use their visual structure as a reference and connect the appropriate hosted resource before presenting them as working campaigns. Removing a label does not implement submission.

## Embed integration

Reuse `NautilusEmbed` on the working branch. Its required props are `type`, `dataSrc`, and an accessible `title`; `height` defaults to `800px`, and `onSuccess` is optional. Use a stable key based on `dataSrc` if a selection changes the embedded resource so React remounts the marker.

```tsx
<NautilusEmbed
  key={selectedResource.dataSrc}
  type="checkout"
  dataSrc={selectedResource.dataSrc}
  title={selectedResource.title}
/>
```

`selectedResource` must come from a verified active entry in the catalog or a fresh lookup. For the existing `$2 off` campaign:

```tsx
<NautilusEmbed
  type="promo"
  dataSrc="/c/mojobrands/promo/2-off"
  title="$2 off wash offer"
/>
```

On a branch without the wrapper, the official loader contract is:

```html
<div data-nautilus-embed="promo"
     data-src="/c/mojobrands/promo/2-off"
     data-height="800px"></div>
<script>
  window.NautilusEmbedConfig = { baseUrl: 'https://www.nautilus-app.com' };
</script>
<script defer src="https://www.nautilus-app.com/embed/loader.js"></script>
```

In React, keep the marker childless and load the script once after mount. Call `window.NautilusEmbed.init()` when a new marker mounts after the script is loaded. The loader owns `embedded=true`, iframe sizing, and query-parameter forwarding. Give the embed room to grow; avoid a fixed-height clipping container. Keep attribution parameters on navigation links. A page-wide `onSuccess` URL applies to every embed on that page and relies on the hosted flow's completion message; verify that behavior for the chosen flow.

Use the resource's `directUrl` for hero or pricing buttons when a link is more appropriate. Use its verified short URL for QR codes or printed campaigns. Never insert an arbitrary UUID to make an example look complete.

## Building a page

1. Choose the brand, offer, audience, eligible locations, and live resource. Confirm that advertised terms match it.
2. Compose the hero, offer details, location context, form or checkout, FAQs, and footer using the existing components. Keep one clear primary action.
3. Use the real resource's form and completion behavior. Preserve consent, attribution, eligibility, and error handling.
4. Verify desktop and mobile rendering, keyboard access, location changes, back navigation, and loader behavior after client navigation. Check that the embed resolves instead of showing a blank or unavailable page.
5. Run typecheck. Use an authorized test environment for submission and payment verification; normal visual QA should not submit real leads, issue vouchers, or charge a card.

Use normal campaign language for connected pages. Label any remaining simulated interaction as an example and state what it does. Do not apply a blanket sample restriction to the project or to new pages built with real Nautilus integrations.

## Source references

Behavior was checked against the Nautilus source on 2026-09-08:

- `apps/web/app/client/form/[id]/page.tsx` and `form-renderer.tsx`
- `apps/web/app/client/checkout/components/drawer/`
- `apps/web/app/client/mojobrands/promo/components/promo-page.tsx`
- `apps/web/app/client/mojobrands/promo/components/embedded-promo-flow.tsx`
- Shipyard `ai/skills/nautilus-embeds/SKILL.md` and `ai/tools/get-nautilus-embeds.ts`

These are implementation references in the parent applications, not importable modules in this site. The resource catalog contains configuration metadata only, with no customer submissions or credentials.
