Skip to content

feat(microfrontend): server-side view:/classpath: resolution for MicroFrontend entries - #78

Merged
marioserrano09 merged 5 commits into
mainfrom
feature/microfrontend-mvc-view
Sep 4, 2026
Merged

feat(microfrontend): server-side view:/classpath: resolution for MicroFrontend entries#78
marioserrano09 merged 5 commits into
mainfrom
feature/microfrontend-mvc-view

Conversation

@marioserrano09

Copy link
Copy Markdown
Contributor

Summary

  • MicroFrontend#setApp now accepts view: or classpath: prefixed entries, resolved server-side by the new MicroFrontendView, so a microfrontend bundle no longer needs its index.html copied into src/main/resources/static/.
    • view:someapp/index resolves through the app's registered Spring ViewResolver chain (e.g. ClassPathViewResolver).
    • classpath:microfrontends/someapp/index.html reads a classpath resource directly.
    • Both resolve within the current request/security context — no dedicated HTTP endpoint.
  • dynamiaMountMicrofrontend skips its own fetch-based discovery when config.src is already populated by the server.
  • Added MicroFrontendViewTest coverage.
  • Reworked .claude/ repo structure map and validated dynamia-tools skill.
  • Added <dynamia-embed> web component for type-agnostic embeds.
  • Version bump to 26.8.0; dependency bumps (Spring Boot, ZK, AWS SDK, in-range TS workspace deps).

Test plan

  • MicroFrontendViewTest added and passing
  • Manual smoke test of microfrontend mount via view:/classpath: entries in a running app

🤖 Generated with Claude Code

https://claude.ai/code/session_01F8jzLAqiSJjwVc4d1SUr14

marioserrano09 and others added 5 commits September 3, 2026 23:45
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UeR9rN9UEmgyNpzMBctyV4
MicroFrontend#setApp now accepts a "view:" or "classpath:" prefixed
entry, resolved in-process by the new MicroFrontendView instead of
requiring the bundle's index.html to be copied into
src/main/resources/static/:

- "view:someapp/index" resolves through the application's registered
  Spring ViewResolver chain (e.g. ClassPathViewResolver), so the
  bundle can ship inside any module's jar.
- "classpath:microfrontends/someapp/index.html" reads a classpath
  resource directly, bypassing the ViewResolver chain.

Both resolve within the current request/security context, so there is
no dedicated HTTP endpoint. The resolved src/css/bodyHtml are sent to
the client already populated, so dynamiaMountMicrofrontend skips its
own fetch-based discovery when config.src is present.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UeR9rN9UEmgyNpzMBctyV4
Covers isServerResolved's prefix detection, the classpath: happy path
(src/css/bodyHtml extraction) and its failure modes (missing resource,
relative script src, no <script type="module">), the view: path
through a registered ViewResolver (including no resolver matching),
and the unsupported-prefix rejection.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UeR9rN9UEmgyNpzMBctyV4
- Spring Boot 4.1.0 -> 4.1.1 (also the hardcoded parent version in
  examples/demo-zk-books, which doesn't inherit springboot.version).
- ZK 10.2.1-jakarta -> 10.3.0.1-jakarta.
- AWS SDK 2.44.5 -> 2.54.7.

Verified with `mvn dependency:resolve` on platform/ui/zk (ZK/Spring)
and extensions/entity-files/sources/s3 (AWS SDK).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UeR9rN9UEmgyNpzMBctyV4
pnpm update -r within currently declared semver ranges (patch/minor
only, no package.json range changes): @types/node, @vitest/coverage-v8,
eslint, prettier, vite, vite-plugin-dts, vitest, @inquirer/prompts, vue.

Left out (require a major bump + testing, not done here): chalk 5->6,
execa 9->10, typescript 6->7, vue-tsc 2->3.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UeR9rN9UEmgyNpzMBctyV4
@marioserrano09
marioserrano09 merged commit c59a7ea into main Sep 4, 2026
1 check failed
marioserrano09 added a commit that referenced this pull request Sep 4, 2026
Pre-existing on main since #78 (microfrontend-mvc-view), predating
this branch's rebase. Same JUnit4->JUnit5 import breakage as the
actions module fix in this branch - fixing it here since it blocks
any -am reactor build that includes platform/core/web (a dependency
of platform/app, needed to verify the #83 controller fix below).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01N3MNM7KKfEtqMjVkwe1dXU
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.

1 participant