Repository navigation
Description
Describe your motivation
Count monthly active users (MAU) statistics for Flow and Hilla in Vaadin 24.4+ based on which routing-related entry points are present in the application.
The new definitions are based on which routing entry points are present in the application:
- A MAU is counted as a Flow user if they have a non-empty route registry and/or exported web component registry. The typical ways of triggering this is through a
@Route-annotated class or a class extendingWebComponentExporter. - A MAU is counted as a Hilla user if they have files in
frontend/viewsthat are picked up by the new file-system router and/or if they have a custom client-side router configuration infrontend/routes.tsorfrontend/routes.tsx.
Describe the solution you'd like
Data is collected from two different categories: what type of application is developed and what features are actively used.
For the application type the parameters are tracked during project build and statistics tracker look on what the project configuration is in the end, taking into account the content of output build, config and various generated files. Here is a list of them:
-
has-flow-routeif RouteRegistry is non-empty. -
has-hilla-fs-routeif the Vite plugin finds something that looks like a view infrontend/views. -
has-hilla-custom-routeif the application has a customroutes.tsxorroutes.tsfile (i.e. not counting the one infrontend/generated). -
has-hybrid-routingifhas-flow-route&& (has-hilla-fs-route||has-hilla-custom-route) -
has-exported-wcif at least oneWebComponentExporterorWebComponentExporterFactoryis present in a project. -
has-endpointif at least one@Endpointor@BrowserCallableclass is present in the project. -
has-litif there's Vaadin-managed Lit components inpackage.json. -
has-reactif there's a Vaadin-managed React components inpackage.json.
For the used features the tracking is based on the actual instantiation of objects related to a feature:
-
flow-routerif a Flow route has been rendered (ignoring error views), i.e. anyRoute-annotated Java class is instantiated -
endpoint-activeif there's been at least one call to an endpoint method (cannot useendpointas the name here since that name has a different meaning in older Hilla versions) -
exported-wcif an exported web component has been rendered, i.e. aWebComponentExporterJava class is instantiated -
ReactAdapterElementif a React component wrapper is rendered, i.e.ReactAdapterElementobject is instantiated -
createMenuItemsif the automatic main menu in Hilla is rendered, i.e. called at least once.
Describe alternatives you've considered
No response
Additional context
Targets Vaadin 24.4.0
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone
Activity
feat: Add MAU tracking for routing
feat: Add MAU tracking for routing
feat: Add MAU tracking for routing
feat: Add MAU tracking for routing
feat: Add MAU tracking for routing
feat: Add MAU tracking for routing (#19400)
feat: Add MAU tracking for routing (#19400)
feat: Add MAU tracking for routing (#19400) (#19417)