Skip to content

Architecture

Octavio Calleya Garcia edited this page Jul 8, 2026 · 1 revision

Architecture

Musicott is the desktop GUI layer of a three-project ecosystem. It boots Spring Boot in non-web mode, renders its UI with JavaFX, and delegates all domain and persistence work to two libraries maintained alongside it.

See the Glossary for the meaning of terms used on this page.

The three-project ecosystem

Architecture overview

Project Role
lirp Lightweight Reactive Persistence — event-sourced repositories that serialize to JSON and SQLite.
music-commons Persistence-agnostic music domain: audio items, playlists, artists, waveforms, and their JavaFX-observable wrappers.
Musicott This project — the JavaFX desktop app: views, services, events, and Spring/JavaFX wiring.

Audio library state lives in a local SQLite database (audioItems.db) for fast import and startup at large library sizes; playlists and the waveform cache are kept as plain JSON files. All three are stored under ~/.config/musicott/.

Spring Boot + JavaFX integration

Spring provides dependency injection and configuration; JavaFX provides the GUI. The two are bridged by javafx-weaver-spring: FXML controllers are annotated @Controller and @FxmlView, and FxWeaver resolves each FXML file while injecting Spring dependencies into its controller.

Event-driven communication

Components do not hold direct references to one another. Instead they publish and subscribe to Spring ApplicationEvents through the ApplicationEventPublisher. A controller publishes an event (for example, a play request); listeners annotated with @EventListener react to it.

Event-driven communication

Startup lifecycle

On launch a branded splash window appears immediately, while Spring Boot and the library load run on a background thread. Once the main scene is built, the splash fades out and the main window is shown — with an 800 ms minimum display gate so the splash never merely flickers.

Startup lifecycle

Related pages

  • Install — how to get and run the app
  • Import — how music enters the library
  • Browsing — how the library is presented

Clone this wiki locally