# cassidyjames/vibes architecture

> Architecture diagram of the GitHub repository cassidyjames/vibes, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-08-24). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/cassidyjames/vibes
- Repository: https://github.com/cassidyjames/vibes

## Overview

#### Purpose and Delivery Model
Vibes is a GNOME/GTK wallpaper application for browsing a curated bundled collection and eventually applying selections through desktop portals. It is structured as a native Vala application, intended for Flatpak/Flathub distribution rather than a web service.

Core application metadata and desktop integration live in `data/metainfo.xml`, `data/launcher.desktop`, and `com.cassidyjames.vibes.json`.

#### Application Entry and Lifecycle
`src/App.vala` is the likely application entry point and owns GTK/Adwaita application startup, activation, and resource initialization. `src/Config.vala.in` supplies build-generated application constants such as IDs, paths, or version data.

The app’s primary control path is: process launch → application initialization → main window presentation → wallpaper browsing/selection.

#### Main Window and User Interaction
`src/MainWindow.vala` defines the top-level UI controller/window. It is the architectural boundary between application lifecycle code and wallpaper-facing UI behavior: loading the main UI, displaying the wallpaper collection, and handling user actions such as selecting a wallpaper.

The stated product direction is a wallpaper grid, potentially with combined light/dark previews, followed by a user-driven wallpaper application action.

#### UI Resources
The primary interface definition is `data/ui/main.blp`, a Blueprint UI resource compiled into the application rather than loaded from an arbitrary external location. `data/gresource.xml` defines the packaged resource bundle that makes UI, icons, and likely wallpaper assets available at runtime.

This resource boundary keeps the installed app self-contained: Vala code consumes stable resource paths, while visual assets remain under `data/`.

#### Wallpaper Content Pipeline
Bundled wallpaper media is stored in `data/wallpapers`. The intended flow is packaged wallpaper assets → resource or installed-data lookup → grid/preview presentation → selected asset passed to desktop wallpaper-setting integration.

The repository currently favors shipping curated assets over depending on an online Unsplash backend. No network service or content API is represented in the tree.

#### Desktop and Portal Boundary
Wallpaper application is intended to cross a FreeDesktop portal boundary, allowing a sandboxed Flatpak app to request wallpaper changes through the host desktop. This is the material external integration point; the app should not assume direct filesystem or desktop-settings access.

GNOME and elementary OS are the primary desktop targets, with GTK/Adwaita as the UI runtime.

#### Build, Packaging, and Installation
Meson is the native build system, rooted at `meson.build`, with component build definitions in `src/meson.build` and `data/meson.build`. Build output compiles Vala sources and packages the GResource bundle, desktop launcher, metadata, icons, and wallpapers.

`com.cassidyjames.vibes.json` provides Flatpak manifest/infrastructure definition for sandboxed distribution, while `data/launcher.desktop` and `data/metainfo.xml` integrate the installed application with desktop launchers and software catalogs.

Main entry points: [`data/meson.build`](https://github.com/cassidyjames/vibes/blob/main/data/meson.build) (Data build), [`src/App.vala`](https://github.com/cassidyjames/vibes/blob/main/src/App.vala) (Application entry), [`data/gresource.xml`](https://github.com/cassidyjames/vibes/blob/main/data/gresource.xml) (Resource bundle), [`com.cassidyjames.vibes.json`](https://github.com/cassidyjames/vibes/blob/main/com.cassidyjames.vibes.json) (Flatpak manifest)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Native application"]
  node_app_entry["Application entry<br/>Vala application<br/>[App.vala]"]
  node_config["Generated config<br/>build constants<br/>[Config.vala.in]"]
  node_main_window["Main window<br/>GTK/Adwaita UI controller<br/>[MainWindow.vala]"]
  node_wallpaper_grid["Wallpaper browsing<br/>UI flow"]
end

subgraph group_resources["Bundled resources"]
  node_blueprint["Main interface<br/>Blueprint UI<br/>[main.blp]"]
  node_gresource["Resource bundle<br/>GResource manifest<br/>[gresource.xml]"]
  node_wallpapers[("Curated wallpapers<br/>bundled media")]
end

subgraph group_delivery["Build and distribution"]
  node_root_build["Root build<br/>Meson build<br/>[meson.build]"]
  node_src_build["Application build<br/>Meson component<br/>[meson.build]"]
  node_data_build["Data build<br/>Meson component<br/>[meson.build]"]
  node_flatpak["Flatpak manifest<br/>distribution manifest"]
  node_launcher["Desktop launcher<br/>desktop entry<br/>[launcher.desktop]"]
  node_metainfo["App metadata<br/>software catalog metadata<br/>[metainfo.xml]"]
end

node_portal{{"Desktop wallpaper portal<br/>FreeDesktop portal"}}

node_app_entry -->|"uses"| node_config
node_app_entry -->|"initializes"| node_gresource
node_app_entry -->|"presents"| node_main_window
node_main_window -->|"loads"| node_blueprint
node_main_window -->|"drives"| node_wallpaper_grid
node_wallpaper_grid -->|"previews"| node_wallpapers
node_wallpaper_grid -->|"applies selection through"| node_portal
node_gresource -->|"packages"| node_blueprint
node_gresource -->|"packages"| node_wallpapers
node_root_build -->|"includes"| node_src_build
node_root_build -->|"includes"| node_data_build
node_src_build -->|"compiles"| node_app_entry
node_src_build -->|"generates"| node_config
node_data_build -->|"builds"| node_gresource
node_data_build -->|"installs"| node_launcher
node_data_build -->|"installs"| node_metainfo
node_flatpak -->|"builds"| node_root_build
node_flatpak -->|"ships"| node_launcher
node_flatpak -->|"ships"| node_metainfo

click node_app_entry "https://github.com/cassidyjames/vibes/blob/main/src/App.vala"
click node_config "https://github.com/cassidyjames/vibes/blob/main/src/Config.vala.in"
click node_main_window "https://github.com/cassidyjames/vibes/blob/main/src/MainWindow.vala"
click node_blueprint "https://github.com/cassidyjames/vibes/blob/main/data/ui/main.blp"
click node_gresource "https://github.com/cassidyjames/vibes/blob/main/data/gresource.xml"
click node_wallpapers "https://github.com/cassidyjames/vibes/tree/main/data/wallpapers"
click node_root_build "https://github.com/cassidyjames/vibes/blob/main/meson.build"
click node_src_build "https://github.com/cassidyjames/vibes/blob/main/src/meson.build"
click node_data_build "https://github.com/cassidyjames/vibes/blob/main/data/meson.build"
click node_flatpak "https://github.com/cassidyjames/vibes/blob/main/com.cassidyjames.vibes.json"
click node_launcher "https://github.com/cassidyjames/vibes/blob/main/data/launcher.desktop"
click node_metainfo "https://github.com/cassidyjames/vibes/blob/main/data/metainfo.xml"

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_entry,node_config,node_main_window,node_wallpaper_grid toneBlue
class node_blueprint,node_gresource,node_wallpapers toneAmber
class node_root_build,node_src_build,node_data_build,node_flatpak,node_launcher,node_metainfo toneMint
class node_portal toneNeutral
```

## Components

### Native application

- [Application entry](https://github.com/cassidyjames/vibes/blob/main/src/App.vala): Vala application · Owns startup, activation, and resource initialization. · `src/App.vala`
- [Generated config](https://github.com/cassidyjames/vibes/blob/main/src/Config.vala.in): build constants · `src/Config.vala.in`
- [Main window](https://github.com/cassidyjames/vibes/blob/main/src/MainWindow.vala): GTK/Adwaita UI controller · Presents the wallpaper collection and handles selection actions. · `src/MainWindow.vala`
- **Wallpaper browsing**: UI flow · Grid and preview selection behavior within the main window.

### Bundled resources

- [Main interface](https://github.com/cassidyjames/vibes/blob/main/data/ui/main.blp): Blueprint UI · `data/ui/main.blp`
- [Resource bundle](https://github.com/cassidyjames/vibes/blob/main/data/gresource.xml): GResource manifest · Packages UI, icons, and bundled assets for runtime lookup. · `data/gresource.xml`
- [Curated wallpapers](https://github.com/cassidyjames/vibes/tree/main/data/wallpapers): bundled media · `data/wallpapers`

### Build and distribution

- [Root build](https://github.com/cassidyjames/vibes/blob/main/meson.build): Meson build · `meson.build`
- [Application build](https://github.com/cassidyjames/vibes/blob/main/src/meson.build): Meson component · `src/meson.build`
- [Data build](https://github.com/cassidyjames/vibes/blob/main/data/meson.build): Meson component · `data/meson.build`
- [Flatpak manifest](https://github.com/cassidyjames/vibes/blob/main/com.cassidyjames.vibes.json): distribution manifest · Defines sandboxed Flatpak delivery. · `com.cassidyjames.vibes.json`
- [Desktop launcher](https://github.com/cassidyjames/vibes/blob/main/data/launcher.desktop): desktop entry · `data/launcher.desktop`
- [App metadata](https://github.com/cassidyjames/vibes/blob/main/data/metainfo.xml): software catalog metadata · `data/metainfo.xml`

### Other components

- **Desktop wallpaper portal**: FreeDesktop portal · Sandbox boundary for applying a selected wallpaper on the host desktop.

## Connections

- Application entry → Generated config: uses
- Application entry → Resource bundle: initializes
- Application entry → Main window: presents
- Main window → Main interface: loads
- Main window → Wallpaper browsing: drives
- Wallpaper browsing → Curated wallpapers: previews
- Wallpaper browsing → Desktop wallpaper portal: applies selection through
- Resource bundle → Main interface: packages
- Resource bundle → Curated wallpapers: packages
- Root build → Application build: includes
- Root build → Data build: includes
- Application build → Application entry: compiles
- Application build → Generated config: generates
- Data build → Resource bundle: builds
- Data build → Desktop launcher: installs
- Data build → App metadata: installs
- Flatpak manifest → Root build: builds
- Flatpak manifest → Desktop launcher: ships
- Flatpak manifest → App metadata: ships
