# gnome/gnome-calendar architecture

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

- Interactive diagram: https://gitdiagram.com/gnome/gnome-calendar
- Repository: https://github.com/gnome/gnome-calendar

## Overview

GNOME Calendar is a desktop scheduling application. A user opens the calendar, browses events in calendar views, and can create or edit events, manage calendar sources, import calendar files, and search events. The core manager handles calendars and event operations; a timeline supplies date-bounded event data to views and search. The repository index and excerpts support several key connections, but many UI and integration implementations were not sampled, so uncertain wiring is omitted.

Main entry points: [`src/core/gcal-manager.c`](https://github.com/gnome/gnome-calendar/blob/main/src/core/gcal-manager.c) (Calendar manager), [`src/core/gcal-timeline.c`](https://github.com/gnome/gnome-calendar/blob/main/src/core/gcal-timeline.c) (Event timeline), [`src/gui/gcal-window.c`](https://github.com/gnome/gnome-calendar/blob/main/src/gui/gcal-window.c) (Main window), [`src/core/gcal-context.c`](https://github.com/gnome/gnome-calendar/blob/main/src/core/gcal-context.c) (Shared context)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Application"]
  node_entry["Application entry<br/>[main.c]"]
  node_application["Application shell<br/>[gcal-application.c]"]
  node_context["Shared context<br/>[gcal-context.c]"]
end

subgraph group_core["Calendar core"]
  node_manager["Calendar manager<br/>[gcal-manager.c]"]
  node_calendar["Calendar sources<br/>[gcal-calendar.c]"]
  node_event["Events and recurrence<br/>[gcal-event.c]"]
  node_timeline["Event timeline<br/>[gcal-timeline.c]"]
  node_range["Date ranges<br/>[gcal-range.c]"]
end

subgraph group_ui["Calendar interface"]
  node_window["Main window<br/>[gcal-window.c]"]
  node_calendarviews["Calendar views"]
  node_datechooser["Date chooser"]
  node_editor["Event editor"]
  node_calendaradmin["Calendar management"]
  node_importer["Calendar importer<br/>[gcal-importer.c]"]
end

subgraph group_search["Search"]
  node_searchengine["Search engine"]
  node_searchmodel["Search results"]
  node_shellsearch["Shell search provider"]
end

subgraph group_extensions["Integrations"]
  node_discoverer["Source discovery"]
  node_weather["Weather service"]
end

node_user(("Calendar user"))
node_weatherprovider["Weather data provider"]
node_calendarprovider[("Calendar backend")]

node_user -->|"launches"| node_entry
node_entry -->|"creates"| node_application
node_application -.->|"provides context"| node_context
node_context -.->|"owns service"| node_manager
node_context -.->|"owns service"| node_searchengine
node_context -.->|"owns service"| node_weather
node_manager -->|"manages"| node_calendar
node_manager -->|"creates and updates"| node_event
node_manager -->|"provides timeline"| node_timeline
node_timeline -.->|"uses ranges"| node_range
node_application -.->|"opens interface"| node_window
node_window -.->|"displays calendar"| node_calendarviews
node_calendarviews -->|"subscribes to events"| node_timeline
node_calendarviews -->|"uses ranges"| node_range
node_datechooser -.->|"selects dates"| node_calendarviews
node_window -.->|"opens editor"| node_editor
node_editor -->|"edits event data"| node_event
node_editor -.->|"saves changes"| node_manager
node_window -.->|"manages sources"| node_calendaradmin
node_calendaradmin -->|"discovers sources"| node_discoverer
node_calendaradmin -.->|"adds sources"| node_manager
node_window -.->|"imports calendars"| node_importer
node_searchengine -->|"tracks calendars"| node_timeline
node_searchengine -->|"builds results"| node_searchmodel
node_searchmodel -->|"subscribes to events"| node_timeline
node_shellsearch -->|"searches events"| node_timeline
node_manager -.->|"accesses calendars"| node_calendarprovider
node_weather -.->|"fetches forecasts"| node_weatherprovider

click node_entry "https://github.com/gnome/gnome-calendar/blob/main/src/main.c"
click node_application "https://github.com/gnome/gnome-calendar/blob/main/src/gui/gcal-application.c"
click node_context "https://github.com/gnome/gnome-calendar/blob/main/src/core/gcal-context.c"
click node_manager "https://github.com/gnome/gnome-calendar/blob/main/src/core/gcal-manager.c"
click node_calendar "https://github.com/gnome/gnome-calendar/blob/main/src/core/gcal-calendar.c"
click node_event "https://github.com/gnome/gnome-calendar/blob/main/src/core/gcal-event.c"
click node_timeline "https://github.com/gnome/gnome-calendar/blob/main/src/core/gcal-timeline.c"
click node_range "https://github.com/gnome/gnome-calendar/blob/main/src/core/gcal-range.c"
click node_window "https://github.com/gnome/gnome-calendar/blob/main/src/gui/gcal-window.c"
click node_calendarviews "https://github.com/gnome/gnome-calendar/tree/main/src/gui/views"
click node_datechooser "https://github.com/gnome/gnome-calendar/blob/main/src/gui/common/gcal-date-chooser.c"
click node_editor "https://github.com/gnome/gnome-calendar/blob/main/src/gui/event-editor/gcal-event-editor-dialog.c"
click node_calendaradmin "https://github.com/gnome/gnome-calendar/tree/main/src/gui/calendar-management"
click node_importer "https://github.com/gnome/gnome-calendar/blob/main/src/gui/importer/gcal-importer.c"
click node_searchengine "https://github.com/gnome/gnome-calendar/blob/main/src/search/gcal-search-engine.c"
click node_searchmodel "https://github.com/gnome/gnome-calendar/blob/main/src/search/gcal-search-model.c"
click node_shellsearch "https://github.com/gnome/gnome-calendar/blob/main/src/core/gcal-shell-search-provider.c"
click node_discoverer "https://github.com/gnome/gnome-calendar/blob/main/src/utils/gcal-source-discoverer.c"
click node_weather "https://github.com/gnome/gnome-calendar/blob/main/src/weather/gcal-weather-service.c"

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_entry,node_application,node_context,node_user toneBlue
class node_manager,node_calendar,node_event,node_timeline,node_range,node_calendarprovider toneAmber
class node_window,node_calendarviews,node_datechooser,node_editor,node_calendaradmin,node_importer toneMint
class node_searchengine,node_searchmodel,node_shellsearch toneRose
class node_discoverer,node_weather,node_weatherprovider toneIndigo
```

## Components

### Application

- [Application entry](https://github.com/gnome/gnome-calendar/blob/main/src/main.c): `src/main.c`
- [Application shell](https://github.com/gnome/gnome-calendar/blob/main/src/gui/gcal-application.c): `src/gui/gcal-application.c`
- [Shared context](https://github.com/gnome/gnome-calendar/blob/main/src/core/gcal-context.c): `src/core/gcal-context.c`

### Calendar core

- [Calendar manager](https://github.com/gnome/gnome-calendar/blob/main/src/core/gcal-manager.c): `src/core/gcal-manager.c`
- [Calendar sources](https://github.com/gnome/gnome-calendar/blob/main/src/core/gcal-calendar.c): `src/core/gcal-calendar.c`
- [Events and recurrence](https://github.com/gnome/gnome-calendar/blob/main/src/core/gcal-event.c): `src/core/gcal-event.c`
- [Event timeline](https://github.com/gnome/gnome-calendar/blob/main/src/core/gcal-timeline.c): `src/core/gcal-timeline.c`
- [Date ranges](https://github.com/gnome/gnome-calendar/blob/main/src/core/gcal-range.c): `src/core/gcal-range.c`

### Calendar interface

- [Main window](https://github.com/gnome/gnome-calendar/blob/main/src/gui/gcal-window.c): `src/gui/gcal-window.c`
- [Calendar views](https://github.com/gnome/gnome-calendar/tree/main/src/gui/views): `src/gui/views`
- [Date chooser](https://github.com/gnome/gnome-calendar/blob/main/src/gui/common/gcal-date-chooser.c): `src/gui/common/gcal-date-chooser.c`
- [Event editor](https://github.com/gnome/gnome-calendar/blob/main/src/gui/event-editor/gcal-event-editor-dialog.c): `src/gui/event-editor/gcal-event-editor-dialog.c`
- [Calendar management](https://github.com/gnome/gnome-calendar/tree/main/src/gui/calendar-management): `src/gui/calendar-management`
- [Calendar importer](https://github.com/gnome/gnome-calendar/blob/main/src/gui/importer/gcal-importer.c): `src/gui/importer/gcal-importer.c`

### Search

- [Search engine](https://github.com/gnome/gnome-calendar/blob/main/src/search/gcal-search-engine.c): `src/search/gcal-search-engine.c`
- [Search results](https://github.com/gnome/gnome-calendar/blob/main/src/search/gcal-search-model.c): `src/search/gcal-search-model.c`
- [Shell search provider](https://github.com/gnome/gnome-calendar/blob/main/src/core/gcal-shell-search-provider.c): `src/core/gcal-shell-search-provider.c`

### Integrations

- [Source discovery](https://github.com/gnome/gnome-calendar/blob/main/src/utils/gcal-source-discoverer.c): `src/utils/gcal-source-discoverer.c`
- [Weather service](https://github.com/gnome/gnome-calendar/blob/main/src/weather/gcal-weather-service.c): `src/weather/gcal-weather-service.c`

### Other components

- **Calendar user**
- **Weather data provider**
- **Calendar backend**

## Connections

- Calendar user → Application entry: launches (evidence: `src/main.c`)
- Application entry → Application shell: creates (evidence: `src/main.c`)
- Application shell → Shared context: provides context
- Shared context → Calendar manager: owns service
- Shared context → Search engine: owns service
- Shared context → Weather service: owns service
- Calendar manager → Calendar sources: manages
- Calendar manager → Events and recurrence: creates and updates (evidence: `src/core/gcal-manager.c`)
- Calendar manager → Event timeline: provides timeline
- Event timeline → Date ranges: uses ranges
- Application shell → Main window: opens interface
- Main window → Calendar views: displays calendar
- Calendar views → Event timeline: subscribes to events (evidence: `src/gui/views/gcal-month-view.c`)
- Calendar views → Date ranges: uses ranges (evidence: `src/gui/views/gcal-month-view.c`)
- Date chooser → Calendar views: selects dates (evidence: `src/gui/common/gcal-date-chooser.c`)
- Main window → Event editor: opens editor
- Event editor → Events and recurrence: edits event data
- Event editor → Calendar manager: saves changes
- Main window → Calendar management: manages sources
- Calendar management → Source discovery: discovers sources (evidence: `src/gui/calendar-management/gcal-new-online-calendar-page.c`)
- Calendar management → Calendar manager: adds sources
- Main window → Calendar importer: imports calendars
- Search engine → Event timeline: tracks calendars (evidence: `src/search/gcal-search-engine.c`)
- Search engine → Search results: builds results (evidence: `src/search/gcal-search-engine.c`)
- Search results → Event timeline: subscribes to events (evidence: `src/search/gcal-search-model.c`)
- Shell search provider → Event timeline: searches events (evidence: `src/core/gcal-shell-search-provider.c`)
- Calendar manager → Calendar backend: accesses calendars
- Weather service → Weather data provider: fetches forecasts
