Skip to content

Separate application examples from extension installation scaffolds #711

Closed

Description

@jimhoyd

Observed gap

Several generic add-ons install application behavior rather than only the package integration:

  • store creates a writable /api/todos collection and route.
  • ui creates a /todos screen when store is present.
  • forms creates a /contact flow.
  • auth creates /account/*, /private, and a default {member, admin} role model.
  • admin assumes those default auth paths in its scaffold notes.

The examples are useful, but urlcode extensions add writes them directly into the application's reviewed YAML/routes. They therefore become deployment surface and force a user to modify or remove example-specific endpoints after installing an otherwise reusable capability.

Desired direction

Keep examples executable, but make default installation capability-only or require an explicit --example <name>/--with-example choice. Examples should live in a named example fixture/recipe and use neutral names or clearly be opt-in. Preserve safety acknowledgements and the current no-overwrite behavior.

Make the generic default route/mount configurable where an extension needs one, and add integration tests for a blank install that adds no sample application endpoint.

Evidence

  • packages/store/src/extension.ts (todos, /api/todos).
  • packages/ui/src/host/scaffold.ts (/todos).
  • packages/forms/src/extension.ts (contact, /contact).
  • packages/auth/src/extension.ts (member, admin, /account, /private).
  • packages/admin/src/extension.ts (/admin, default auth-path guidance).

Activity

  1. added
    enhancement
    needs-decision
    extension
    on Sep 25, 2026
  2. jimhoyd commented on Sep 25, 2026

    @jimhoyd
    CollaboratorAuthor

    Decision (owner, 2026-09-25): blank install by default, examples on request.

    • urlcode extensions add <name> installs only the capability: no sample application endpoints (/api/todos, /todos, /contact, /private, …).
    • --example (one flag across all extensions) adds the named example fixture/recipe on top.
    • Where an extension genuinely needs a setting to function (e.g. auth's mount path or a minimal role model), keep a documented, configurable default. That is capability configuration, not an example.
    • The standalone starter and getting-started docs pass --example, so new users still get working demos. Update those guides in the same PR.
    • Keep the safety acknowledgements and the no-overwrite behaviour. Add integration tests showing a blank install adds no sample endpoint, and that --example reproduces today's output.
    • This changes existing default behaviour, so call it out in the release notes.

    Removing needs-decision.


    Generated by Claude Code

  3. removed
    needs-decision
    on Sep 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementextension

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions