Skip to content

Support multiple app entry points for repos with distinct UI surfaces #41

@DeDuckProject

Description

@DeDuckProject

Problem

Today git-glimpse has a single app.readyWhen.url (or app.previewUrl) that acts as the global base URL for all demos. This works for simple apps but breaks down for repos that serve multiple distinct UI surfaces — for example:

  • An admin dashboard at https://admin.myapp.com and a customer storefront at https://myapp.com
  • A Shopify app where the admin routes live on a local Remix dev server and the storefront extension lives on a live Shopify store
  • A monorepo with a marketing site, a web app, and a docs site, each at a different origin

When files from different surfaces change in the same PR, git-glimpse can only demo one of them — it uses the same base URL for every route in routeMap.

Desired behaviour

Allow configuring multiple named entry points, each with its own URL (and optionally its own startCommand). routeMap entries can then declare which entry point they belong to:

const config: GitGlimpseConfig = {
  app: [
    {
      name: 'storefront',
      readyWhen: { url: process.env.TEST_STORE_URL },
    },
    {
      name: 'admin',
      startCommand: 'npm run dev:server',
      readyWhen: { url: 'http://localhost:3000' },
    },
  ],

  routeMap: {
    'extensions/virtual-tryon-block/**': { entry: 'storefront', route: '/products/ring' },
    'app/routes/**':                     { entry: 'admin',      route: '/' },
  },
};

git-glimpse would then start only the entry points needed for the changed files in a given PR, and record each surface separately (or stitch them into a single demo).

Notes

  • Single-entry-point configs should remain fully backward-compatible
  • Starting multiple local servers in parallel is a natural extension of the existing startCommand mechanism
  • The LLM script generator would need to know which base URL to use per route
  • Could also be useful for multi-step flows that cross surfaces (e.g. merchant enables a product in admin → customer sees the try-on button on storefront)

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