How vaadin/hilla-crm-tutorial works
Project Type and Purpose
• This is a full-stack CRM (Customer Relationship Management) application built with Hilla, combining a Spring Boot backend and a React/TypeScript frontend.
• The README confirms it is a tutorial/example app demonstrating Hilla’s integration of server-side Java services with a client-side React UI.
High-Level Architecture Components
a. Frontend
• TypeScript/React UI in src/main/frontend
• Vite development server (vite.config.ts) and tsconfig.json for bundling
• Themes and static assets under src/main/frontend/themes and src/main/resources/META-INF/resources
b. Backend
• Spring Boot application (Application.java)
• Hilla-powered endpoints auto-exposed to the client
• JPA entities and repositories (data package)
• Service layer (CRMService) containing business logic
c. Database
• In-memory or external relational database configured via application.properties
• Schema/data initialized from data.sql
d. Build & Deployment
• Maven wrapper (.mvn, mvnw) drives both Java and frontend build
• Production bundle in target/hilla-crm-1.0-SNAPSHOT.jar
• Static resources packaged into the JAR under META-INF/resources
Relationships and Data Flow
• User interacts with the browser UI (React/Hilla components).
• UI calls backend endpoints generated by Hilla (over HTTP/JSON, using the Connect library).
• Backend endpoints delegate to CRMService.
• CRMService uses JPA repositories (CompanyRepository, ContactRepository) to read/write the database.
• Results flow back through the same chain to update the UI.
Architectural Patterns & Design Principles
• Layered architecture (Controller/Endpoint → Service → Repository → Database)
• Convention-over-configuration via Spring Boot and Hilla
• Single-Page Application pattern on the frontend with routing under src/main/frontend/views
• Resource bundling: frontend assets compiled by Vite, then served from META-INF/resources
Key Technologies & Frameworks
• Java, Spring Boot, Spring Data JPA, Hilla (Vaadin Connect)
• React, TypeScript, Vite, Node.js (via package.json)
• Maven for multi-module build and packaging