Skip to content

[Medium] Build a mascot pack marketplace + re-wire mascot Settings #44

@json9512

Description

@json9512

Background

The mascot sprite GIFs that previously shipped bundled in the app were untracked in #12 because their itch.io licenses don't permit redistribution. As of PR #45 the Settings UI for choosing/managing mascots is hidden (the "Show mascot" toggle and MascotSettingsSection aren't rendered), because there are no built-in packs to choose between.

The supporting code is intentionally left in place:

  • Sources/UI/Sprites/SpritePackManager.swiftinstall(from baseURL: URL) already fetches a manifest + sprite files from any URL and persists the pack to Application Support/SpritePacks/<id>/.
  • Sources/AppUI/SettingsMascotSection.swift — dead but preserved; the grid/variant picker UI is ready to be re-rendered when packs become installable.
  • Sources/Models/TerminalAppearance.showMascotCompanion — preserved so existing user preferences carry across the marketplace launch.

What "marketplace" means

The shape sketched in SpritePackManager.swift:134-140:

https://sprites.sshido.app/packs/cool-robot/manifest.json
https://sprites.sshido.app/packs/cool-robot/idle.png
https://sprites.sshido.app/packs/cool-robot/typing.png
...

A static directory of pack folders served over HTTPS. Each pack folder has a manifest.json (already modelled in SpriteManifest) plus the sprite assets. No dynamic backend needed — Cloud Storage / S3 / a GitHub Pages site all work.

Scope

Server side

  • Decide hosting target (Cloud Storage bucket, S3, GitHub Pages of a public repo, etc.) and stand it up.
  • Build a small index endpoint or static file (e.g. packs/index.json) listing every available pack: {id, name, author, license, previewURL, baseURL}. The iOS app fetches this once and renders a browse UI.
  • Curate the initial set of packs. Source candidates: CC0 art from OpenGameArt, commissioned art with explicit redistribution permission, the existing itch.io packs IF the creators grant written permission for marketplace redistribution (worth asking — RiLi_XL and quipinny may say yes).

iOS side

  • Restore the "Show mascot" toggle and MascotSettingsSection render in SettingsView (revert the relevant chunk of PR Hide mascot Settings until pack marketplace ships #45).
  • Add a "Browse mascot packs" entry to MascotSettingsSection that fetches the index.json and renders a list with previews and Install buttons. Wire SpritePackManager.install(from:) to the selected pack's baseURL.
  • Surface per-pack author and license on the manage screen (already supported by SpriteManifest).

Open questions

  • Hosting and bandwidth cost — keep it free-tier?
  • Submission flow: closed (maintainer-only) or open (community submits via PR)?
  • Versioning: how do users get updates when an installed pack's manifest.json revs?

Related

Acceptance

  • A user can open Settings → Terminal → Show mascot → "Browse packs", select one, install it, and use it in the terminal — all without the maintainer rebuilding the app.
  • Existing pack-management UI (the grid in MascotSettingsSection) is back.
  • Each installed pack surfaces its real author and license from the manifest, not the previous "Community" / "CC0" literals.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions