# Deployment and social loop v1.8

## What was added

Step Away now treats a finished case as a shareable product moment, not just a private result screen.

At the end of a case, players can publish the outcome as a public archive page. The page reads like a short case story, shows the interventions played, shows the final outcome, and links back to the main app and official deck.

## Why this matters

The table's result becomes the marketing object:

- People can understand the premise from a shared outcome.
- The cards visually sell the physical deck.
- The case writing shows that premium case packs can be valuable.
- Anonymous play still creates a public-facing artefact.
- No login is required for the viewer.

## Hosted mode

PHP hosting gives the best result.

When the user taps Create share link:

1. The app builds an outcome snapshot.
2. It posts to `api.php?endpoint=share`.
3. PHP saves the snapshot in `data/saves/<id>.json`.
4. The app returns a public URL: `share.php?id=<id>`.
5. Anyone with the link can read the story.

## Static fallback

If PHP sharing fails, the app creates a fallback link using `share.html#story=...`.

This is useful for testing, but the link can be long. Use PHP hosting for deployment.

## Pre-launch hosting checks

- Change the admin password in `admin.php`.
- Make sure `data/saves/` is writable.
- Make sure `data/community.json` and `data/global-log.json` are writable.
- Test one finished case and publish a share link.
- Open that link in a private/incognito browser.
- Share the link in a chat app and check the preview title/description.
- Confirm the public page links back to the main app and official deck.

## Privacy note

Shared pages contain fictional game outcome data only. They do not require player names, email addresses or accounts.
