How isaaceindhoven/plantuml-styler works
Project type and purpose
• PlantUML-styler is a single-page application (SPA) built with Angular.
File structure
• Top-level: Angular config (angular.json, tsconfig*), e2e tests, Dockerfile, CI/CD (Netlify badge), README.
• /src/app: the Angular app, organized into
• services/ (generate, styling, zip, import/export, utility, autonumber)
• core/helpers (HTTP interceptor)
• interfaces (typing for zip tasks, entries)
• /src/assets/lib/zip: client-side deflate/inflate & z-worker libraries.
• Environments for server URLs.
Extract architectural hints from the README
• Built entirely in the browser.
• Communicates with a PlantUML render server over HTTP.
• Uses themes (JSON + CSS/SCSS) stored or downloaded in a ZIP file.
• Hosted as static assets (e.g. Netlify).
Main components & relationships
a. Browser / Client (Angular SPA)
• UI Components:
– EditorComponent (text input for PlantUML code)
– DiagramComponent (renders image preview)
– NavbarComponent (theme selector, download/import buttons)
– TextAreaComponent (extended editor UI)
• Angular Module: AppModule + AppRoutingModule
• Services:
– GenerateService – orchestrates HTTP calls to PlantUML server
– ZipService – uses assets/lib/zip to package PNGs + metadata into a ZIP
– ImportExportService – unpacks imported ZIP into code + theme
– UtilityService & AutonumberService – helper logic
– JWTInterceptor – (configured but optional) intercepts HTTP for auth headers
b. External PlantUML Server
– Configurable via environment.ts
c. Hosting / Delivery
– Static asset host (e.g. Netlify, Dockerfile hints) serves index.html + bundle
d. Build Pipeline (Angular CLI & Webpack)
– Transpile TS → JS, bundle SCSS + assets, output /dist
Architectural patterns & design principles
• Component-Service separation (UI vs. business logic)
• Dependency Injection for services
• Single HTTP layer via interceptor
• Lazy loading (if added later) via Angular routing
• Asset bundling for third-party libs (zip-inflate/deflate)
Essential elements
• Angular module boundary
• Component → Service dependencies
• HTTP layer → external PlantUML server
• Client-side ZIP library integration
• Hosting layer that delivers the SPA
• Configurable environment switch for the render server