# gwtmaterialdesign/gwt-material-demo architecture

> Architecture diagram of the GitHub repository gwtmaterialdesign/gwt-material-demo, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-26). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/gwtmaterialdesign/gwt-material-demo
- Repository: https://github.com/gwtmaterialdesign/gwt-material-demo

## Overview

This repository is primarily a GWT Material demo application: users browse examples of the library’s components, add-ins, animations, charts, and applications. Its Java tree organizes these examples into sections, but the sampled source does not show the application’s routing or presenter-to-view wiring, so those relationships are not asserted. Separately, the repository includes a service-worker generator and template, plus a GWT UiBinder XML element helper. The generator-to-template relationship is visible; other links between these distinct areas are not shown in the excerpts.

Main entry points: [`src/main/java/gwt/material/design/demo/client/application/ApplicationModule.java`](https://github.com/gwtmaterialdesign/gwt-material-demo/blob/master/src/main/java/gwt/material/design/demo/client/application/ApplicationModule.java) (Application section), [`bin/sw-template.js`](https://github.com/gwtmaterialdesign/gwt-material-demo/blob/master/bin/sw-template.js) (Worker template), [`src/main/java/gwt/material/design/demo/client/Application.java`](https://github.com/gwtmaterialdesign/gwt-material-demo/blob/master/src/main/java/gwt/material/design/demo/client/Application.java) (Demo shell), [`bin/sw-builder.js`](https://github.com/gwtmaterialdesign/gwt-material-demo/blob/master/bin/sw-builder.js) (Cache-file scanner)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_demo["Demo application"]
  node_app["Demo shell<br/>[Application.java]"]
  node_app_module["Application section"]
  node_about["About section"]
  node_theme["Theme control<br/>[ThemeManager.java]"]
end

subgraph group_examples["Feature examples"]
  node_components["UI components"]
  node_addins["Add-in demos"]
  node_animations["Animations"]
  node_charts["Charts"]
  node_apps["App demos<br/>[AppsPresenter.java]"]
end

subgraph group_offline["Service worker"]
  node_sw_builder["Cache-file scanner<br/>[sw-builder.js]"]
  node_sw_template["Worker template<br/>[sw-template.js]"]
  node_browser_cache[("Browser cache")]
  node_browser_fetch["Network fetch"]
  node_push_service["Push events"]
  node_notifications["Browser notifications"]
end

subgraph group_uibinder["UiBinder support"]
  node_xml_element["XML element parser<br/>[XMLElement.java]"]
end

node_visitor(("Demo visitor"))

node_visitor -->|"browses demo"| node_app
node_app -.->|"opens section"| node_app_module
node_app_module -.->|"offers about"| node_about
node_app_module -.->|"offers examples"| node_components
node_app_module -.->|"offers examples"| node_addins
node_app_module -.->|"offers examples"| node_animations
node_app_module -.->|"offers examples"| node_charts
node_app_module -.->|"offers examples"| node_apps
node_sw_builder -->|"renders template"| node_sw_template
node_sw_template -->|"caches assets"| node_browser_cache
node_sw_template -->|"serves cache match"| node_browser_cache
node_sw_template -->|"fetches on miss"| node_browser_fetch
node_push_service -->|"dispatches push"| node_sw_template
node_sw_template -->|"shows notification"| node_notifications

click node_app "https://github.com/gwtmaterialdesign/gwt-material-demo/blob/master/src/main/java/gwt/material/design/demo/client/Application.java"
click node_app_module "https://github.com/gwtmaterialdesign/gwt-material-demo/blob/master/src/main/java/gwt/material/design/demo/client/application/ApplicationModule.java"
click node_about "https://github.com/gwtmaterialdesign/gwt-material-demo/blob/master/src/main/java/gwt/material/design/demo/client/application/about/AboutPresenter.java"
click node_components "https://github.com/gwtmaterialdesign/gwt-material-demo/tree/master/src/main/java/gwt/material/design/demo/client/application/components"
click node_addins "https://github.com/gwtmaterialdesign/gwt-material-demo/tree/master/src/main/java/gwt/material/design/demo/client/application/addins"
click node_animations "https://github.com/gwtmaterialdesign/gwt-material-demo/tree/master/src/main/java/gwt/material/design/demo/client/application/animations"
click node_charts "https://github.com/gwtmaterialdesign/gwt-material-demo/blob/master/src/main/java/gwt/material/design/demo/client/application/charts/ChartsPresenter.java"
click node_apps "https://github.com/gwtmaterialdesign/gwt-material-demo/blob/master/src/main/java/gwt/material/design/demo/client/application/apps/AppsPresenter.java"
click node_theme "https://github.com/gwtmaterialdesign/gwt-material-demo/blob/master/src/main/java/gwt/material/design/demo/client/ThemeManager.java"
click node_sw_builder "https://github.com/gwtmaterialdesign/gwt-material-demo/blob/master/bin/sw-builder.js"
click node_sw_template "https://github.com/gwtmaterialdesign/gwt-material-demo/blob/master/bin/sw-template.js"
click node_xml_element "https://github.com/gwtmaterialdesign/gwt-material-demo/blob/master/src/main/java/com/google/gwt/uibinder/rebind/XMLElement.java"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_app,node_app_module,node_about,node_theme toneBlue
class node_components,node_addins,node_animations,node_charts,node_apps toneAmber
class node_sw_builder,node_sw_template,node_browser_cache,node_browser_fetch,node_push_service,node_notifications toneMint
class node_xml_element toneRose
class node_visitor toneIndigo
```

## Components

### Demo application

- [Demo shell](https://github.com/gwtmaterialdesign/gwt-material-demo/blob/master/src/main/java/gwt/material/design/demo/client/Application.java): `src/main/java/gwt/material/design/demo/client/Application.java`
- [Application section](https://github.com/gwtmaterialdesign/gwt-material-demo/blob/master/src/main/java/gwt/material/design/demo/client/application/ApplicationModule.java): `src/main/java/gwt/material/design/demo/client/application/ApplicationModule.java`
- [About section](https://github.com/gwtmaterialdesign/gwt-material-demo/blob/master/src/main/java/gwt/material/design/demo/client/application/about/AboutPresenter.java): `src/main/java/gwt/material/design/demo/client/application/about/AboutPresenter.java`
- [Theme control](https://github.com/gwtmaterialdesign/gwt-material-demo/blob/master/src/main/java/gwt/material/design/demo/client/ThemeManager.java): `src/main/java/gwt/material/design/demo/client/ThemeManager.java`

### Feature examples

- [UI components](https://github.com/gwtmaterialdesign/gwt-material-demo/tree/master/src/main/java/gwt/material/design/demo/client/application/components): `src/main/java/gwt/material/design/demo/client/application/components`
- [Add-in demos](https://github.com/gwtmaterialdesign/gwt-material-demo/tree/master/src/main/java/gwt/material/design/demo/client/application/addins): `src/main/java/gwt/material/design/demo/client/application/addins`
- [Animations](https://github.com/gwtmaterialdesign/gwt-material-demo/tree/master/src/main/java/gwt/material/design/demo/client/application/animations): `src/main/java/gwt/material/design/demo/client/application/animations`
- [Charts](https://github.com/gwtmaterialdesign/gwt-material-demo/blob/master/src/main/java/gwt/material/design/demo/client/application/charts/ChartsPresenter.java): `src/main/java/gwt/material/design/demo/client/application/charts/ChartsPresenter.java`
- [App demos](https://github.com/gwtmaterialdesign/gwt-material-demo/blob/master/src/main/java/gwt/material/design/demo/client/application/apps/AppsPresenter.java): `src/main/java/gwt/material/design/demo/client/application/apps/AppsPresenter.java`

### Service worker

- [Cache-file scanner](https://github.com/gwtmaterialdesign/gwt-material-demo/blob/master/bin/sw-builder.js): `bin/sw-builder.js`
- [Worker template](https://github.com/gwtmaterialdesign/gwt-material-demo/blob/master/bin/sw-template.js): `bin/sw-template.js`
- **Browser cache**
- **Network fetch**
- **Push events**
- **Browser notifications**

### UiBinder support

- [XML element parser](https://github.com/gwtmaterialdesign/gwt-material-demo/blob/master/src/main/java/com/google/gwt/uibinder/rebind/XMLElement.java): `src/main/java/com/google/gwt/uibinder/rebind/XMLElement.java`

### Other components

- **Demo visitor**

## Connections

- Demo visitor → Demo shell: browses demo (evidence: `README.md`)
- Demo shell → Application section: opens section
- Application section → About section: offers about
- Application section → UI components: offers examples
- Application section → Add-in demos: offers examples
- Application section → Animations: offers examples
- Application section → Charts: offers examples
- Application section → App demos: offers examples
- Cache-file scanner → Worker template: renders template (evidence: `bin/sw-builder.js`)
- Worker template → Browser cache: caches assets (evidence: `bin/sw-template.js`)
- Worker template → Browser cache: serves cache match (evidence: `bin/sw-template.js`)
- Worker template → Network fetch: fetches on miss (evidence: `bin/sw-template.js`)
- Push events → Worker template: dispatches push (evidence: `bin/sw-template.js`)
- Worker template → Browser notifications: shows notification (evidence: `bin/sw-template.js`)
