Skip to content

Add multi-entry-point support for monorepo and multi-app deployments#53

Open
DeDuckProject wants to merge 1 commit intomainfrom
claude/multiple-app-entry-points-KHglr
Open

Add multi-entry-point support for monorepo and multi-app deployments#53
DeDuckProject wants to merge 1 commit intomainfrom
claude/multiple-app-entry-points-KHglr

Conversation

@DeDuckProject
Copy link
Owner

Summary

This PR adds support for applications with multiple entry points (e.g., admin and storefront in a monorepo, or multiple deployments), allowing git-glimpse to generate demos that span different URLs and entry points.

Key Changes

  • Config Schema Enhancement: Extended GitGlimpseConfig to accept either a single AppConfig or an array of EntryPoint objects, each with a name and configuration. Added RouteMapValueSchema to support both string routes and object routes with explicit entry point mapping.

  • Route Detection Refactoring: Updated detectRoutes() to track which entry point each route belongs to. Routes are now deduplicated by entry:route key instead of just route. The RouteMapping interface now includes an entry field.

  • Config Normalization: Introduced normalizeConfig() function that:

    • Converts single-app configs to a single-entry-point array
    • Normalizes routeMap values (string routes default to the first entry point)
    • Ensures all downstream code works with a consistent NormalizedConfig structure
  • Pipeline Updates: Changed runPipeline() to accept entryPoints: EntryPointUrl[] instead of a single baseUrl. Entry points are resolved before pipeline execution and passed through to all downstream functions.

  • Prompt Generation: Updated LLM prompts to:

    • Display multiple entry points when present
    • Tag routes with their entry point name in square brackets for multi-entry scenarios
    • Include navigation instructions for multi-entry apps
  • Script Generation: Modified generateDemoScript() to accept entry points and collect hints from all entry points in multi-entry configs.

  • Recording & Fallback: Updated runScriptAndRecord() and takeScreenshots() to handle multiple entry points, using a URL map to resolve the correct base URL for each route.

  • Action & CLI Updates:

    • Action now supports multi-entry configs and applies input overrides to the first entry point
    • CLI --url option now supports both plain URLs and name=url format for named entry points
    • Both resolve entry point URLs before calling the pipeline
  • Tests: Added comprehensive tests for normalizeConfig(), resolveEntryPointUrls(), and multi-entry route detection scenarios.

Implementation Details

  • Entry points are identified by a required name field, allowing routes to be mapped to specific deployments
  • The first entry point is treated as the default for backward compatibility
  • Route deduplication now uses a composite key (entry:route) to allow the same route path on different entry points
  • All URL resolution happens early in the pipeline, before script generation and recording

https://claude.ai/code/session_01Cb3fgZ9bbvF1aowmZvMkVd

…rfaces

Allow configuring multiple named entry points, each with its own URL,
startCommand, and hint. The routeMap now accepts both string values
(backward-compatible) and { entry, route } objects to associate routes
with specific entry points.

Key changes:
- Config schema: `app` accepts either AppConfig or EntryPoint[] array
- New normalizeConfig() converts any config to canonical internal form
- RouteMapping gains `entry` field linking routes to entry points
- Pipeline uses `entryPoints: EntryPointUrl[]` instead of `baseUrl: string`
- LLM prompts list all entry points and tag routes with entry names
- Action starts multiple app processes in parallel
- CLI supports `--url name=http://...` for named entry points
- All 86 tests pass including new normalize and multi-entry tests

Closes #41

https://claude.ai/code/session_01Cb3fgZ9bbvF1aowmZvMkVd
@DeDuckProject DeDuckProject force-pushed the claude/multiple-app-entry-points-KHglr branch from 0d53ea0 to c1dd435 Compare March 15, 2026 21:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants