How alainm23/planify works
1. Repository shape: one shared core, multiple frontends
Planify is a Vala/GTK4 desktop application split into a reusable core layer and several entry-point frontends: the main GUI in src, a lightweight quick-add app, a cli tool, and a GNOME Shell search-provider. The architecture is centered on sharing the same task/domain logic across these surfaces.
2. Domain model lives in core/Objects
The core layer defines the application’s main entities: tasks/items, projects, sections, labels, reminders, attachments, due dates, sources/accounts, release metadata, and filter objects such as Today, Inbox, Scheduled, Completed, etc. These objects are the canonical data shape used by both UI and service code.
3. Core services provide the application’s backend
core/Services contains the non-UI logic that underpins the app: database access, settings, event bus, logging, backup export, calendar-event calculations, color scheme handling, and provider-specific sync clients. This layer is the boundary between UI and persistence/networking.
4. Local state is database-backed and settings-driven
The app persists its task data locally through core/Services/Database and Store, with application preferences handled through GSettings (data/io.github.alainm23.planify.gschema.xml and core/Services/Settings). The diagram should show local storage as a first-class backend, not just an in-memory model.
5. Sync integrations are separate provider subsystems
Sync is split into two provider families:
- Todoist under core/Services/Todoist
- CalDAV/Nextcloud under core/Services/CalDAV
These modules handle authentication, transport, and item/project synchronization. libsecret is used where credentials need secure storage, and libsoup/WebDAV-style clients are used for HTTP sync traffic.
6. The main GUI in src is a shell around the core
src/App.vala and src/MainWindow.vala build the GTK4/libadwaita desktop experience: sidebar navigation, project/label/filter views, scheduled/today views, dialogs, and editing flows. The UI is organized into layouts, views, dialogs, and reusable widgets, all consuming the shared core objects and services.
7. UI is componentized into reusable views and widgets
The src/Views, src/Layouts, and src/Widgets directories contain the presentation layer. Views represent major pages like Today, Scheduled, Project, and Labels; layouts arrange app-level containers like sidebar and item boards; widgets provide task editors, pickers, reminders, labels, attachments, and status controls. This is where most interaction logic sits, but it delegates data/state operations to core services.
8. There is an internal event/command flow
src/Services/ActionManager, DBusServer, Api, Notification, TimeMonitor, and related classes coordinate app actions, background updates, notifications, and inter-process communication. The flow is generally: UI action → service layer → core/store/database → event bus → UI refresh/notifications.
9. Multiple external entry points reuse the same backend concepts
- cli provides a terminal interface for task creation and validation, backed by D-Bus connectivity and shared parsing/formatting code.
- quick-add is a small app for fast task entry, also using D-Bus.
- search-provider exposes tasks/projects to GNOME Shell search through a repository/search adapter.
These are separate binaries, but they rely on the same task model and local/backend state.
10. Calendar and date scheduling are a distinct subsystem
Date handling is not just UI decoration: core/Services/CalendarEvents and the calendar widgets in both core and src support recurring schedules, due dates, reminders, and date-range views. This subsystem is what powers scheduled/today/tomorrow-style filtering and calendar displays.
11. Resources, theming, and translations are bundled at build time
The project uses GTK resource bundles (data/io.github.alainm23.planify.gresource.xml) for icons, images, CSS, sounds, and UI definitions, plus GNOME application metadata and desktop/service files. Translation catalogs under po/ are a significant part of the build and are surfaced in CI and release workflows.
12. Build and test structure mirrors the architecture
Meson is the build system, with separate targets for the main app, CLI, quick-add, and search provider. Tests are organized under test/ with coverage for CLI behavior and CalDAV integration, reinforcing that the critical boundaries are parsing/validation, sync, and shared backend behavior rather than only UI rendering.
Main entry points: Objects Domain model · meson.build Meson build · Database.vala Database · Views Views
Components 21
Core
Shared domain model and backend services
- Domain model · Tasks, projects, sections, labels, reminders, attachments, filters, and related entities
core/Objects - Store · Application-facing state and data access coordination
core/Services/Store.vala - Database · Database-backed storage for task data and sync state
core/Services/Database.vala - Settings · Application preferences and configuration access
core/Services/Settings.vala - Event bus · Shared notification and refresh signaling between components
core/Services/EventBus.vala - Calendar logic · Due dates, recurrence, date ranges, and calendar event calculations
core/Services/CalendarEvents - Todoist sync · Todoist authentication and item/project synchronization
core/Services/Todoist - CalDAV sync · CalDAV/Nextcloud authentication, WebDAV transport, and synchronization
core/Services/CalDAV - Shared widgets · Calendar, pickers, editors, and other UI controls reused across surfaces
core/Widgets
Main app
GTK desktop shell and presentation layer
- Desktop shell · Main GTK4/libadwaita application entry and window
src/App.vala - Main window · Primary navigation and application window composition
src/MainWindow.vala - Views · Today, scheduled, project, label, and filter pages
src/Views - Layouts · Sidebar, boards, rows, and other app-level layout components
src/Layouts - Widgets · Task editors, attachment rows, sync controls, and reusable interaction widgets
src/Widgets - App services · Action dispatch, DBus server, notifications, migrations, export, and time monitoring
src/Services
Entry points
Secondary binaries and adapters
- CLI · Command-line task creation and validation tool
cli - Quick add · Fast task entry window using shared backend and DBus
quick-add - Search provider · GNOME Shell search integration over tasks and projects
search-provider
Build assets
Resources, translations, and packaging
- Data assets · Desktop file, GResource bundle, schema, icons, sounds, and app metadata
data - Translations · Translation catalogs and extraction inputs used across builds
po - Meson build · Build definitions for app targets, resources, and packaging
meson.build
Connections 32
- Desktop shell → Main window: creates · Bootstraps the main application shell
- Main window → Views: navigates · Hosts the major pages and filter views
- Main window → Layouts: composes · Uses sidebar and board layouts to arrange the UI
- Views → Widgets: uses · Pages embed reusable interaction widgets
- Layouts → Widgets: uses · Layouts reuse shared row and picker widgets
- Views → Domain model: renders · Displays domain entities and filter objects
- Views → Calendar logic: filters by date · Scheduled and today-style pages depend on calendar calculations
- Widgets → Domain model: edits · Editors and pickers manipulate shared task data
- Widgets → Calendar logic: picks dates · Date and reminder widgets use scheduling logic
- App services → Store: orchestrates · Coordinates application actions against shared state
- App services → Event bus: publishes · Sends refresh and notification events
- App services → Database: persists · Reads and writes local task state
- Store → Database: backed by · Store state is persisted in the database
- Store → Domain model: hosts · Keeps canonical domain objects in memory
- Database → Settings: configured by · Storage behavior depends on application settings
- Calendar logic → Domain model: interprets · Builds scheduled views and date objects from domain data
- Todoist sync → Domain model: syncs · Maps Todoist remote data onto shared entities
- CalDAV sync → Domain model: syncs · Maps CalDAV/Nextcloud data onto shared entities
- Todoist sync → Database: reads/writes · Synchronizes remote state with local storage
- CalDAV sync → Database: reads/writes · Synchronizes remote state with local storage
- CLI → Domain model: uses · Command parsing works with the shared task model
- CLI → Database: connects · CLI actions operate against the local backend
- Quick add → Domain model: creates · Quick add builds new task entities
- Quick add → Event bus: signals · Uses DBus/event flow to hand off task creation
- Search provider → Domain model: indexes · Search provider exposes tasks and projects
- Search provider → Store: queries · Search adapter reads shared app state
- Meson build → Desktop shell: builds · Defines the main desktop target
- Meson build → CLI: builds · Defines the CLI target
- Meson build → Quick add: builds · Defines the quick-add target
- Meson build → Search provider: builds · Defines the search provider target
- Meson build → Data assets: packages · Bundles resources, schema, icons, and metadata
- Meson build → Translations: compiles · Builds translation catalogs and language assets