Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Publish examples
name: Publish recipes

on:
pull_request:
Expand All @@ -20,7 +20,7 @@ on:
workflow_dispatch:
inputs:
only:
description: "Publish only this example slug (optional)"
description: "Publish only this recipe slug (optional)"
required: false

permissions:
Expand All @@ -38,7 +38,7 @@ jobs:
steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v2
- run: bun scripts/build-manifest.mjs
- run: bun test scripts/catalog.test.mjs
- uses: actions/configure-pages@v5
if: github.event_name != 'pull_request'
- uses: actions/upload-pages-artifact@v3
Expand Down
44 changes: 23 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# Spacefast Examples
# Spacefast Recipes

Forty-seven real, buildable example websites — a band site, a calorie tracker, a
playable game, a restaurant menu, an internal sales dashboard, and more. Each one
is self-contained and ships with the exact prompt that produces it.
Forty-eight polished, copy-paste recipes — for a band site, a calorie tracker, a
playable game, a restaurant menu, a technical plan, and more. Each recipe ships
with the live website its prompt produces.

Every example exists to answer one question: _given the prompt, can any AI agent
build this site and publish it to Spacefast?_ They also power the public gallery
at [spacefast.com/examples](https://spacefast.com/examples).
Every recipe exists to answer one question: _given the prompt, can any AI agent
build my version and publish it to Spacefast?_ They power the public recipe gallery
at [spacefast.com/recipes](https://spacefast.com/recipes).

## Layout

Expand All @@ -19,41 +19,43 @@ examples/
README.md ← implementation notes and live link
```

This repository is the canonical source for the gallery. Prompts and metadata
This historically named repository is the canonical source for Recipes. Prompts and metadata
are compiled into a public JSON feed by GitHub Actions:

<https://spacefast.github.io/examples/manifest.json>

The Spacefast website and the badges on the live examples read that feed. Do not
The Spacefast website and the badges on live recipe outputs read that feed. Do not
copy prompts or gallery metadata into another repository.

## The badge

Every published example loads the shared Spacefast badge. The panel is always
Every published recipe output loads the shared Spacefast badge. The panel is always
open, and the shared script reads the current prompt from the canonical feed:

```html
<script src="https://spacefast.com/badge.js" data-example="<slug>"></script>
```

Do not vendor `badge.js` or embed a prompt in an example build. Keeping the badge
shared means a prompt or badge improvement reaches every example without another
47-site publish.
Do not vendor `badge.js` or embed a prompt in a recipe build. Keeping the badge
shared means a prompt or badge improvement reaches every output without another
site publish. The catalog intentionally retains the historical `data-example`
attribute until the production shared badge deploys `data-recipe` support; this keeps
new and already-published outputs functional throughout the rollout.

## Publishing

GitHub Actions (`.github/workflows/publish.yml`) validates the full catalog,
publishes the JSON feed to GitHub Pages, and rebuilds and publishes changed
examples to their existing Spacefast spaces. It authenticates with the
team-owned `SPACEFAST_DEPLOY_KEY` repository secret. Static examples are
published as-is; examples with a `package.json` are built first.
recipe outputs to their existing Spacefast spaces. It authenticates with the
team-owned `SPACEFAST_DEPLOY_KEY` repository secret. Static recipe outputs are
published as-is; recipes with a `package.json` are built first.

To add an example: copy `TEMPLATE.md` into `examples/<slug>/prompt.md`, fill it in,
To add a recipe: copy `TEMPLATE.md` into `examples/<slug>/prompt.md`, fill it in,
drop the site in `examples/<slug>/site/`, and add `meta.json` using
`meta.example.json` as the schema. Run `bun scripts/build-manifest.mjs` locally;
CI does the same validation and handles the rest.
`meta.example.json` as the schema. Run `bun test scripts/catalog.test.mjs` locally;
CI runs the same catalog and output validation and handles the rest.

The directory slug is also the Spacefast space slug by default. If that hostname
is reserved or the example deliberately publishes elsewhere, add `publish_slug`
to `meta.json` and make `live_url` match it. The gallery route and badge continue
is reserved or the recipe deliberately publishes elsewhere, add `publish_slug`
to `meta.json` and make `live_url` match it. The recipe route and badge continue
to use the directory slug.
8 changes: 4 additions & 4 deletions TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ account, install, or extra instructions needed:**
**Optional shortcuts and reference only:** if the `sf` CLI is already installed,
`sf publish ./dist --wait` does the same job. A zip of the publish folder is also
supported, but neither the CLI nor a zip is required. Docs:
[direct agent/API publishing](https://spacefast.com/docs/agents) ·
[files and folders](https://spacefast.com/docs/publishing) ·
[claiming](https://spacefast.com/docs/anonymous-publish) ·
[updates and rollback](https://spacefast.com/docs/rollback)
[agent setup](https://spacefast.com/setup) ·
[files and folders](https://spacefast.com/help/publishing) ·
[claiming](https://spacefast.com/help/anonymous-publish) ·
[updates and rollback](https://spacefast.com/help/versions)
2 changes: 1 addition & 1 deletion examples/2048/prompt.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,4 +56,4 @@ Build me a **fully playable 2048 sliding-tile puzzle game** as a vanilla-JS app
```
If an update after claiming returns `space_claimed_credential_available`, exchange the saved claim token once at `POST https://api.spacefast.com/v1/anonymous-claim/exchange`, save `data.credential.accessToken`, and retry with that access token.

**Optional shortcuts and reference only:** if the `sf` CLI is already installed, `sf publish ./site --wait` does the same job. A zip of the publish folder is also supported, but neither the CLI nor a zip is required. Docs: [direct agent/API publishing](https://spacefast.com/docs/agents) · [files and folders](https://spacefast.com/docs/publishing) · [claiming](https://spacefast.com/docs/anonymous-publish) · [updates and rollback](https://spacefast.com/docs/rollback)
**Optional shortcuts and reference only:** if the `sf` CLI is already installed, `sf publish ./site --wait` does the same job. A zip of the publish folder is also supported, but neither the CLI nor a zip is required. Docs: [direct agent/API publishing](https://spacefast.com/setup) · [files and folders](https://spacefast.com/help/publishing) · [claiming](https://spacefast.com/help/anonymous-publish) · [updates and rollback](https://spacefast.com/help/versions)
2 changes: 1 addition & 1 deletion examples/app/prompt.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,4 +88,4 @@ browser (no backend, no accounts, all state in `localStorage`).
```
If an update after claiming returns `space_claimed_credential_available`, exchange the saved claim token once at `POST https://api.spacefast.com/v1/anonymous-claim/exchange`, save `data.credential.accessToken`, and retry with that access token.

**Optional shortcuts and reference only:** if the `sf` CLI is already installed, `sf publish ./dist --wait` does the same job. A zip of the publish folder is also supported, but neither the CLI nor a zip is required. Docs: [direct agent/API publishing](https://spacefast.com/docs/agents) · [files and folders](https://spacefast.com/docs/publishing) · [claiming](https://spacefast.com/docs/anonymous-publish) · [updates and rollback](https://spacefast.com/docs/rollback)
**Optional shortcuts and reference only:** if the `sf` CLI is already installed, `sf publish ./dist --wait` does the same job. A zip of the publish folder is also supported, but neither the CLI nor a zip is required. Docs: [direct agent/API publishing](https://spacefast.com/setup) · [files and folders](https://spacefast.com/help/publishing) · [claiming](https://spacefast.com/help/anonymous-publish) · [updates and rollback](https://spacefast.com/help/versions)
2 changes: 1 addition & 1 deletion examples/arcade/prompt.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,4 +56,4 @@ Build me a **website for my retro arcade bar, with a playable mini-game as the h
```
If an update after claiming returns `space_claimed_credential_available`, exchange the saved claim token once at `POST https://api.spacefast.com/v1/anonymous-claim/exchange`, save `data.credential.accessToken`, and retry with that access token.

**Optional shortcuts and reference only:** if the `sf` CLI is already installed, `sf publish ./site --wait` does the same job. A zip of the publish folder is also supported, but neither the CLI nor a zip is required. Docs: [direct agent/API publishing](https://spacefast.com/docs/agents) · [files and folders](https://spacefast.com/docs/publishing) · [claiming](https://spacefast.com/docs/anonymous-publish) · [updates and rollback](https://spacefast.com/docs/rollback)
**Optional shortcuts and reference only:** if the `sf` CLI is already installed, `sf publish ./site --wait` does the same job. A zip of the publish folder is also supported, but neither the CLI nor a zip is required. Docs: [direct agent/API publishing](https://spacefast.com/setup) · [files and folders](https://spacefast.com/help/publishing) · [claiming](https://spacefast.com/help/anonymous-publish) · [updates and rollback](https://spacefast.com/help/versions)
2 changes: 1 addition & 1 deletion examples/band/prompt.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,4 +59,4 @@ Build me a **bold, full-bleed one-page website for my band** as a vanilla-JS app
```
If an update after claiming returns `space_claimed_credential_available`, exchange the saved claim token once at `POST https://api.spacefast.com/v1/anonymous-claim/exchange`, save `data.credential.accessToken`, and retry with that access token.

**Optional shortcuts and reference only:** if the `sf` CLI is already installed, `sf publish ./site --wait` does the same job. A zip of the publish folder is also supported, but neither the CLI nor a zip is required. Docs: [direct agent/API publishing](https://spacefast.com/docs/agents) · [files and folders](https://spacefast.com/docs/publishing) · [claiming](https://spacefast.com/docs/anonymous-publish) · [updates and rollback](https://spacefast.com/docs/rollback)
**Optional shortcuts and reference only:** if the `sf` CLI is already installed, `sf publish ./site --wait` does the same job. A zip of the publish folder is also supported, but neither the CLI nor a zip is required. Docs: [direct agent/API publishing](https://spacefast.com/setup) · [files and folders](https://spacefast.com/help/publishing) · [claiming](https://spacefast.com/help/anonymous-publish) · [updates and rollback](https://spacefast.com/help/versions)
2 changes: 1 addition & 1 deletion examples/barber/prompt.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,4 +70,4 @@ build step, no framework — just `index.html`, `styles.css`, and a little `scri
```
If an update after claiming returns `space_claimed_credential_available`, exchange the saved claim token once at `POST https://api.spacefast.com/v1/anonymous-claim/exchange`, save `data.credential.accessToken`, and retry with that access token.

**Optional shortcuts and reference only:** if the `sf` CLI is already installed, `sf publish ./site --wait` does the same job. A zip of the publish folder is also supported, but neither the CLI nor a zip is required. Docs: [direct agent/API publishing](https://spacefast.com/docs/agents) · [files and folders](https://spacefast.com/docs/publishing) · [claiming](https://spacefast.com/docs/anonymous-publish) · [updates and rollback](https://spacefast.com/docs/rollback)
**Optional shortcuts and reference only:** if the `sf` CLI is already installed, `sf publish ./site --wait` does the same job. A zip of the publish folder is also supported, but neither the CLI nor a zip is required. Docs: [direct agent/API publishing](https://spacefast.com/setup) · [files and folders](https://spacefast.com/help/publishing) · [claiming](https://spacefast.com/help/anonymous-publish) · [updates and rollback](https://spacefast.com/help/versions)
2 changes: 1 addition & 1 deletion examples/blog/prompt.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,4 +79,4 @@ feed (run `bun install && bun run build` at the end and confirm `dist/` exists).
```
If an update after claiming returns `space_claimed_credential_available`, exchange the saved claim token once at `POST https://api.spacefast.com/v1/anonymous-claim/exchange`, save `data.credential.accessToken`, and retry with that access token.

**Optional shortcuts and reference only:** if the `sf` CLI is already installed, `sf publish ./dist --wait` does the same job. A zip of the publish folder is also supported, but neither the CLI nor a zip is required. Docs: [direct agent/API publishing](https://spacefast.com/docs/agents) · [files and folders](https://spacefast.com/docs/publishing) · [claiming](https://spacefast.com/docs/anonymous-publish) · [updates and rollback](https://spacefast.com/docs/rollback)
**Optional shortcuts and reference only:** if the `sf` CLI is already installed, `sf publish ./dist --wait` does the same job. A zip of the publish folder is also supported, but neither the CLI nor a zip is required. Docs: [direct agent/API publishing](https://spacefast.com/setup) · [files and folders](https://spacefast.com/help/publishing) · [claiming](https://spacefast.com/help/anonymous-publish) · [updates and rollback](https://spacefast.com/help/versions)
2 changes: 1 addition & 1 deletion examples/calories/prompt.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,4 +80,4 @@ everything in `localStorage` so my diary is still there when I come back.
```
If an update after claiming returns `space_claimed_credential_available`, exchange the saved claim token once at `POST https://api.spacefast.com/v1/anonymous-claim/exchange`, save `data.credential.accessToken`, and retry with that access token.

**Optional shortcuts and reference only:** if the `sf` CLI is already installed, `sf publish ./site --wait` does the same job. A zip of the publish folder is also supported, but neither the CLI nor a zip is required. Docs: [direct agent/API publishing](https://spacefast.com/docs/agents) · [files and folders](https://spacefast.com/docs/publishing) · [claiming](https://spacefast.com/docs/anonymous-publish) · [updates and rollback](https://spacefast.com/docs/rollback)
**Optional shortcuts and reference only:** if the `sf` CLI is already installed, `sf publish ./site --wait` does the same job. A zip of the publish folder is also supported, but neither the CLI nor a zip is required. Docs: [direct agent/API publishing](https://spacefast.com/setup) · [files and folders](https://spacefast.com/help/publishing) · [claiming](https://spacefast.com/help/anonymous-publish) · [updates and rollback](https://spacefast.com/help/versions)
2 changes: 1 addition & 1 deletion examples/changelog/prompt.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,4 +81,4 @@ and a `feed.xml`, no build step, no framework).
```
If an update after claiming returns `space_claimed_credential_available`, exchange the saved claim token once at `POST https://api.spacefast.com/v1/anonymous-claim/exchange`, save `data.credential.accessToken`, and retry with that access token.

**Optional shortcuts and reference only:** if the `sf` CLI is already installed, `sf publish ./site --wait` does the same job. A zip of the publish folder is also supported, but neither the CLI nor a zip is required. Docs: [direct agent/API publishing](https://spacefast.com/docs/agents) · [files and folders](https://spacefast.com/docs/publishing) · [claiming](https://spacefast.com/docs/anonymous-publish) · [updates and rollback](https://spacefast.com/docs/rollback)
**Optional shortcuts and reference only:** if the `sf` CLI is already installed, `sf publish ./site --wait` does the same job. A zip of the publish folder is also supported, but neither the CLI nor a zip is required. Docs: [direct agent/API publishing](https://spacefast.com/setup) · [files and folders](https://spacefast.com/help/publishing) · [claiming](https://spacefast.com/help/anonymous-publish) · [updates and rollback](https://spacefast.com/help/versions)
2 changes: 1 addition & 1 deletion examples/cli/prompt.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,4 +83,4 @@ install command, a star badge, and syntax-highlighted code samples — as a smal
```
If an update after claiming returns `space_claimed_credential_available`, exchange the saved claim token once at `POST https://api.spacefast.com/v1/anonymous-claim/exchange`, save `data.credential.accessToken`, and retry with that access token.

**Optional shortcuts and reference only:** if the `sf` CLI is already installed, `sf publish ./dist --wait` does the same job. A zip of the publish folder is also supported, but neither the CLI nor a zip is required. Docs: [direct agent/API publishing](https://spacefast.com/docs/agents) · [files and folders](https://spacefast.com/docs/publishing) · [claiming](https://spacefast.com/docs/anonymous-publish) · [updates and rollback](https://spacefast.com/docs/rollback)
**Optional shortcuts and reference only:** if the `sf` CLI is already installed, `sf publish ./dist --wait` does the same job. A zip of the publish folder is also supported, but neither the CLI nor a zip is required. Docs: [direct agent/API publishing](https://spacefast.com/setup) · [files and folders](https://spacefast.com/help/publishing) · [claiming](https://spacefast.com/help/anonymous-publish) · [updates and rollback](https://spacefast.com/help/versions)
2 changes: 1 addition & 1 deletion examples/conference/prompt.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,4 +76,4 @@ conference** as an **Astro site** (static output, no SSR, no backend).
```
If an update after claiming returns `space_claimed_credential_available`, exchange the saved claim token once at `POST https://api.spacefast.com/v1/anonymous-claim/exchange`, save `data.credential.accessToken`, and retry with that access token.

**Optional shortcuts and reference only:** if the `sf` CLI is already installed, `sf publish ./dist --wait` does the same job. A zip of the publish folder is also supported, but neither the CLI nor a zip is required. Docs: [direct agent/API publishing](https://spacefast.com/docs/agents) · [files and folders](https://spacefast.com/docs/publishing) · [claiming](https://spacefast.com/docs/anonymous-publish) · [updates and rollback](https://spacefast.com/docs/rollback)
**Optional shortcuts and reference only:** if the `sf` CLI is already installed, `sf publish ./dist --wait` does the same job. A zip of the publish folder is also supported, but neither the CLI nor a zip is required. Docs: [direct agent/API publishing](https://spacefast.com/setup) · [files and folders](https://spacefast.com/help/publishing) · [claiming](https://spacefast.com/help/anonymous-publish) · [updates and rollback](https://spacefast.com/help/versions)
2 changes: 1 addition & 1 deletion examples/dashboard/prompt.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,4 +74,4 @@ team pins to the office TV and glances at all day — as a self-contained static
```
If an update after claiming returns `space_claimed_credential_available`, exchange the saved claim token once at `POST https://api.spacefast.com/v1/anonymous-claim/exchange`, save `data.credential.accessToken`, and retry with that access token.

**Optional shortcuts and reference only:** if the `sf` CLI is already installed, `sf publish ./site --wait` does the same job. A zip of the publish folder is also supported, but neither the CLI nor a zip is required. Docs: [direct agent/API publishing](https://spacefast.com/docs/agents) · [files and folders](https://spacefast.com/docs/publishing) · [claiming](https://spacefast.com/docs/anonymous-publish) · [updates and rollback](https://spacefast.com/docs/rollback)
**Optional shortcuts and reference only:** if the `sf` CLI is already installed, `sf publish ./site --wait` does the same job. A zip of the publish folder is also supported, but neither the CLI nor a zip is required. Docs: [direct agent/API publishing](https://spacefast.com/setup) · [files and folders](https://spacefast.com/help/publishing) · [claiming](https://spacefast.com/help/anonymous-publish) · [updates and rollback](https://spacefast.com/help/versions)
Loading
Loading