Skip to content

feat(summon): add react application, route, and wrapper generators#603

Open
advl wants to merge 1 commit intofeat/router-boilerplatefrom
feat/summon-generator
Open

feat(summon): add react application, route, and wrapper generators#603
advl wants to merge 1 commit intofeat/router-boilerplatefrom
feat/summon-generator

Conversation

@advl
Copy link
Copy Markdown
Contributor

@advl advl commented Apr 6, 2026

Done

  • Add @canonical/summon-application with three generators:
    • summon application react --ssr --router: scaffolds a full React SSR app with router integration, grouped routes via wrapper() + group(), withI18n middleware, and working SSR entry points
    • summon route <path>: generates a route module and appends its export
    • summon wrapper <name>: generates a wrapper module and appends its export
  • Generator templates emit declare module augmentation, RouteMiddleware-typed middleware, proper RouterDehydratedState usage, single RouterProvider
  • Replace relative cross-package imports with @canonical/summon-core, @canonical/task
  • Fix peer dep ranges to ^0.22.0
  • Register generators in packages/cli/summon/generators/

Depends on #601 and #602

QA

  • bun run --filter @canonical/summon-application test — 7 tests pass
  • Verify summon application react --ssr --router --app-path=test-app generates a valid project

PR readiness check

  • PR should have one of the following labels:
    • Feature 🎁
  • PR title follows the Conventional Commits format.
  • The code follows the appropriate code standards
  • All packages define the required scripts in package.json:
    • All packages: check, check:fix, and test.
  • If this PR introduces a new package: first-time publish has been done manually from inside the package directory using npm publish --access public.

@advl advl force-pushed the feat/summon-generator branch from 54916be to 02f928c Compare April 6, 2026 18:26
@advl advl changed the base branch from main to feat/router-react April 6, 2026 18:26
@advl advl force-pushed the feat/summon-generator branch from 02f928c to 5fb4040 Compare April 6, 2026 18:33
@advl advl force-pushed the feat/router-react branch 2 times, most recently from 44e7cee to 45fa718 Compare April 6, 2026 19:50
@advl advl force-pushed the feat/summon-generator branch from 5fb4040 to 27c5c2f Compare April 6, 2026 19:50
@advl advl force-pushed the feat/router-react branch from 45fa718 to aaa7fe9 Compare April 6, 2026 19:56
@advl advl force-pushed the feat/summon-generator branch 3 times, most recently from e80e830 to f93bdf3 Compare April 6, 2026 20:15
@advl advl force-pushed the feat/router-react branch from aaa7fe9 to 4e195ab Compare April 6, 2026 21:28
@advl advl force-pushed the feat/summon-generator branch 2 times, most recently from 4f96081 to 502f460 Compare April 6, 2026 21:49
@advl advl force-pushed the feat/router-react branch from 4e195ab to d92c1c3 Compare April 6, 2026 21:49
@advl advl changed the base branch from feat/router-react to feat/router-boilerplate April 6, 2026 21:49
@advl advl force-pushed the feat/summon-generator branch from 502f460 to c1446ba Compare April 6, 2026 21:51
@advl advl force-pushed the feat/router-boilerplate branch 2 times, most recently from 69db414 to ff89ea4 Compare April 6, 2026 21:58
@advl advl force-pushed the feat/summon-generator branch from c1446ba to fea093f Compare April 6, 2026 21:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant