How parttio/theme-addons works
Project type and purpose
• This is a multi-module Maven project combining a Vaadin 24 frontend with a Spring Boot backend, plus a reusable “theme” module packaging CSS into a JAR.
• The “theme” module provides styling resources, while the “demo” module is the runnable Vaadin application showcasing components and hot-deployable theme changes.
File structure
• Root:
• pom.xml: parent POM defining modules “theme” and “demo”
• theme module:
• pom.xml: builds a JAR containing CSS under META-INF/resources/themes/themestarter
• src/main/resources/META-INF/resources/themes/themestarter/... (component-level CSS, theme.json, typography.css)
• demo module:
• pom.xml, mvnw wrappers, package.json/tsconfig.json/vite.config.ts: config for frontend tooling
• src/main/java/com/example/application: Spring Boot Application.java, data/entities, views (Vaadin Flow Java code)
• src/main/resources: Spring properties, feature flags, banner
• src/main/dev-bundle/webapp/VAADIN/build: prebuilt Vaadin Flow client bundles for development
• demo/frontend: a minimal index.html and theme-editor assets for theming UI
Extract insights from README
• Two modules: theme (CSS JAR) and demo (runnable app)
• Build sequence: mvn install builds the theme JAR; mvn spring-boot:run -pl demo starts the server
• Hot-deploy of CSS changes via vaadin.frontend.hotdeploy=true
a. Main components
• Maven Parent (root POM)
• Theme Module (CSS JAR)
• Demo Module
• Spring Boot Application (Java server)
• Vaadin Flow Engine (server-side UI component framework)
• Dev-bundle / Frontend build (JavaScript/CSS resources)
• Browser (end user)
• External services (none in this starter; could add DB or REST if extended)
b. Relationships and interactions
• Maven Parent orchestrates builds for Theme and Demo
• Theme module → produces JAR → injected onto classpath of Demo
• Demo Spring Boot startup → Vaadin Flow compiles Java views to HTML/JS → serves through embedded web server
• Browser requests → Spring Boot serves HTML + JS bundles + theme CSS (from JAR’s META-INF/resources)
• Hot-deploy watches theme sources and updates served CSS without restart
c. Architectural patterns / design principles
• Multi-module Maven architecture for clear separation of styling vs application logic
• Server-side UI (Vaadin Flow) with client resource bundling
• Hot-deploy for rapid iteration
d. Relevant technologies
• Maven, Java 17, Spring Boot, Vaadin 24, Node/Vite (frontend tooling), CSS theme packaging
Be detailed and exhaustive
• Break out sub-components (e.g., CSS packaging in theme, Java packages in demo)
• Hot-deploy watcher on theme CSS feeding into Dev-bundle at runtime
• Configuration files (application.properties, vaadin-featureflags) as part of the Spring Boot node