# clairerimel/peticle architecture

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

- Interactive diagram: https://gitdiagram.com/clairerimel/peticle
- Repository: https://github.com/clairerimel/peticle

## Overview

Peticle is an iOS dog-walk tracker built primarily to demonstrate App Intents integrations. Users can log and manage walks in the app or invoke intent-backed actions through Siri and Shortcuts; results are stored as SwiftData records and surfaced in the walk list, snippets, Spotlight, and widgets. A separate timed-walk path drives Live Activities. The graph preserves documented query, Focus, deep-link, and dog-management capabilities. Several intent modules were not sampled, so those subsystem links are limited to README-documented relationships.

Main entry points: [`Peticle/Model/DataModel.swift`](https://github.com/clairerimel/peticle/blob/main/Peticle/Model/DataModel.swift) (SwiftData services), [`Peticle/Intents/DogWalkShortcutsProvider.swift`](https://github.com/clairerimel/peticle/blob/main/Peticle/Intents/DogWalkShortcutsProvider.swift) (Shortcuts registry), [`Peticle/View/DogWalkListView.swift`](https://github.com/clairerimel/peticle/blob/main/Peticle/View/DogWalkListView.swift) (Walk list), [`Peticle/PeticleApp.swift`](https://github.com/clairerimel/peticle/blob/main/Peticle/PeticleApp.swift) (Peticle app)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entrypoints["Entry points"]
  node_shortcuts["Shortcuts registry"]
  node_app["Peticle app<br/>[PeticleApp.swift]"]
  node_dependencies["Dependency manager"]
end

subgraph group_walks["Walk tracking"]
  node_timerintents["Stopwatch intents"]
  node_stopwatch["Walk stopwatch"]
  node_activityattributes["Activity state"]
end

subgraph group_intents["Intent experiences"]
  node_walkintents["Walk intents"]
  node_qualityintent["Rate walk"]
  node_editintents["Edit and delete<br/>[EditIntents.swift]"]
  node_historyintents["Walk history intents"]
  node_dogintents["Dog intents<br/>[AddDogIntent.swift]"]
  node_snippetintent["Walk snippet intent"]
  node_openintent["Open walk intent"]
  node_recommendation["Walk recommendation"]
end

subgraph group_data["Domain and storage"]
  node_dogmodel[("Dog records<br/>[Dog.swift]")]
  node_walkmodel[("Walk records<br/>[DogWalkEntry.swift]")]
  node_datamodel["SwiftData services<br/>[DataModel.swift]"]
  node_dogentity["Dog entity and query<br/>[DogEntity.swift]"]
  node_walkentity["Walk entity and query"]
end

subgraph group_surfaces["App and system surfaces"]
  node_walklist["Walk list"]
  node_entryview["Walk editor"]
  node_snippetview["Walk snippet"]
  node_widget["Quick actions widget"]
  node_livewidget["Live Activity UI"]
  node_navigation["Navigation state"]
end

node_person(("Dog owner"))
node_externalactivity(("ActivityKit"))
node_spotlight(("Spotlight index"))
node_focus(("Focus mode"))

node_person -->|"invokes"| node_shortcuts
node_shortcuts -->|"registers"| node_walkintents
node_shortcuts -->|"registers"| node_qualityintent
node_shortcuts -->|"registers"| node_historyintents
node_shortcuts -->|"registers"| node_snippetintent
node_shortcuts -->|"registers"| node_openintent
node_shortcuts -->|"registers"| node_dogintents
node_person -->|"uses"| node_walklist
node_walkintents -->|"creates walks"| node_datamodel
node_qualityintent -->|"updates walks"| node_datamodel
node_datamodel -->|"persists"| node_walkmodel
node_datamodel -->|"stores"| node_dogmodel
node_walkmodel -->|"adapts to"| node_walkentity
node_dogmodel -->|"adapts to"| node_dogentity
node_walkentity -->|"queries"| node_datamodel
node_walklist -->|"opens editor"| node_entryview
node_walklist -->|"lists"| node_walkmodel
node_snippetintent -->|"shows"| node_snippetview
node_openintent -->|"routes through"| node_navigation
node_app -->|"launches"| node_walklist
node_app -->|"configures"| node_datamodel
node_app -->|"provides"| node_navigation
node_app -->|"provides"| node_dependencies
node_timerintents -.->|"controls"| node_stopwatch
node_stopwatch -->|"updates state"| node_activityattributes
node_stopwatch -->|"manages activities"| node_externalactivity
node_livewidget -->|"renders"| node_activityattributes
node_widget -->|"starts or stops"| node_timerintents
node_walklist -->|"deletes indexed walks"| node_spotlight
node_walkentity -->|"provides indexed data"| node_spotlight
node_focus -->|"filters to today"| node_walklist
node_dependencies -->|"supplies navigation"| node_openintent
node_recommendation -.->|"uses walk history"| node_walkmodel
node_editintents -.->|"manages entries"| node_datamodel
node_historyintents -.->|"reads activity"| node_datamodel
node_dogintents -.->|"manages dogs"| node_dogmodel

click node_shortcuts "https://github.com/clairerimel/peticle/blob/main/Peticle/Intents/DogWalkShortcutsProvider.swift"
click node_walkintents "https://github.com/clairerimel/peticle/blob/main/Peticle/Intents/App%20Intents/AddWalkIntent.swift"
click node_qualityintent "https://github.com/clairerimel/peticle/blob/main/Peticle/Intents/App%20Intents/UpdateWalkQualityIntent.swift"
click node_editintents "https://github.com/clairerimel/peticle/blob/main/Peticle/Intents/App%20Intents/EditIntents.swift"
click node_historyintents "https://github.com/clairerimel/peticle/blob/main/Peticle/Intents/App%20Intents/GetLastActivityIntent.swift"
click node_dogintents "https://github.com/clairerimel/peticle/blob/main/Peticle/Intents/App%20Intents/AddDogIntent.swift"
click node_snippetintent "https://github.com/clairerimel/peticle/blob/main/Peticle/Intents/App%20Intents/ManageLatestWalkEntryIntent.swift"
click node_openintent "https://github.com/clairerimel/peticle/blob/main/Peticle/Intents/App%20Intents/OpenEditEntryIntent.swift"
click node_recommendation "https://github.com/clairerimel/peticle/blob/main/Peticle/Intents/App%20Intents/WalkingRecommendationIntent.swift"
click node_timerintents "https://github.com/clairerimel/peticle/blob/main/Peticle/Intents/App%20Intents/StopwatchIntents.swift"
click node_stopwatch "https://github.com/clairerimel/peticle/blob/main/Peticle/Model/StopwatchViewModel.swift"
click node_activityattributes "https://github.com/clairerimel/peticle/blob/main/Peticle/Model/DogWalkLiveActivityAttributes.swift"
click node_app "https://github.com/clairerimel/peticle/blob/main/Peticle/PeticleApp.swift"
click node_walklist "https://github.com/clairerimel/peticle/blob/main/Peticle/View/DogWalkListView.swift"
click node_entryview "https://github.com/clairerimel/peticle/blob/main/Peticle/View/DogWalkEntryView.swift"
click node_snippetview "https://github.com/clairerimel/peticle/blob/main/Peticle/View/ManageLastWalkEntrySnippetView.swift"
click node_widget "https://github.com/clairerimel/peticle/blob/main/PeticleWidget/PeticleQuickActionsWidget.swift"
click node_livewidget "https://github.com/clairerimel/peticle/blob/main/PeticleWidget/PeticleWidgetLiveActivity.swift"
click node_dogmodel "https://github.com/clairerimel/peticle/blob/main/Peticle/Model/Dog.swift"
click node_walkmodel "https://github.com/clairerimel/peticle/blob/main/Peticle/Model/DogWalkEntry.swift"
click node_datamodel "https://github.com/clairerimel/peticle/blob/main/Peticle/Model/DataModel.swift"
click node_dogentity "https://github.com/clairerimel/peticle/blob/main/Peticle/Model/DogEntity.swift"
click node_walkentity "https://github.com/clairerimel/peticle/blob/main/Peticle/Model/DogWalkEntryEntity.swift"
click node_navigation "https://github.com/clairerimel/peticle/blob/main/Peticle/Manager/NavigationManager.swift"
click node_dependencies "https://github.com/clairerimel/peticle/blob/main/Peticle/Manager/AppDependencyManager.swift"

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_shortcuts,node_app,node_dependencies toneBlue
class node_timerintents,node_stopwatch,node_activityattributes toneAmber
class node_walkintents,node_qualityintent,node_editintents,node_historyintents,node_dogintents,node_snippetintent,node_openintent,node_recommendation toneMint
class node_dogmodel,node_walkmodel,node_datamodel,node_dogentity,node_walkentity toneRose
class node_walklist,node_entryview,node_snippetview,node_widget,node_livewidget,node_navigation,node_person,node_externalactivity,node_spotlight,node_focus toneIndigo
```

## Components

### Entry points

- [Shortcuts registry](https://github.com/clairerimel/peticle/blob/main/Peticle/Intents/DogWalkShortcutsProvider.swift): `Peticle/Intents/DogWalkShortcutsProvider.swift`
- [Peticle app](https://github.com/clairerimel/peticle/blob/main/Peticle/PeticleApp.swift): `Peticle/PeticleApp.swift`
- [Dependency manager](https://github.com/clairerimel/peticle/blob/main/Peticle/Manager/AppDependencyManager.swift): `Peticle/Manager/AppDependencyManager.swift`

### Walk tracking

- [Stopwatch intents](https://github.com/clairerimel/peticle/blob/main/Peticle/Intents/App%20Intents/StopwatchIntents.swift): `Peticle/Intents/App Intents/StopwatchIntents.swift`
- [Walk stopwatch](https://github.com/clairerimel/peticle/blob/main/Peticle/Model/StopwatchViewModel.swift): `Peticle/Model/StopwatchViewModel.swift`
- [Activity state](https://github.com/clairerimel/peticle/blob/main/Peticle/Model/DogWalkLiveActivityAttributes.swift): `Peticle/Model/DogWalkLiveActivityAttributes.swift`

### Intent experiences

- [Walk intents](https://github.com/clairerimel/peticle/blob/main/Peticle/Intents/App%20Intents/AddWalkIntent.swift): `Peticle/Intents/App Intents/AddWalkIntent.swift`
- [Rate walk](https://github.com/clairerimel/peticle/blob/main/Peticle/Intents/App%20Intents/UpdateWalkQualityIntent.swift): `Peticle/Intents/App Intents/UpdateWalkQualityIntent.swift`
- [Edit and delete](https://github.com/clairerimel/peticle/blob/main/Peticle/Intents/App%20Intents/EditIntents.swift): `Peticle/Intents/App Intents/EditIntents.swift`
- [Walk history intents](https://github.com/clairerimel/peticle/blob/main/Peticle/Intents/App%20Intents/GetLastActivityIntent.swift): `Peticle/Intents/App Intents/GetLastActivityIntent.swift`
- [Dog intents](https://github.com/clairerimel/peticle/blob/main/Peticle/Intents/App%20Intents/AddDogIntent.swift): `Peticle/Intents/App Intents/AddDogIntent.swift`
- [Walk snippet intent](https://github.com/clairerimel/peticle/blob/main/Peticle/Intents/App%20Intents/ManageLatestWalkEntryIntent.swift): `Peticle/Intents/App Intents/ManageLatestWalkEntryIntent.swift`
- [Open walk intent](https://github.com/clairerimel/peticle/blob/main/Peticle/Intents/App%20Intents/OpenEditEntryIntent.swift): `Peticle/Intents/App Intents/OpenEditEntryIntent.swift`
- [Walk recommendation](https://github.com/clairerimel/peticle/blob/main/Peticle/Intents/App%20Intents/WalkingRecommendationIntent.swift): `Peticle/Intents/App Intents/WalkingRecommendationIntent.swift`

### Domain and storage

- [Dog records](https://github.com/clairerimel/peticle/blob/main/Peticle/Model/Dog.swift): `Peticle/Model/Dog.swift`
- [Walk records](https://github.com/clairerimel/peticle/blob/main/Peticle/Model/DogWalkEntry.swift): `Peticle/Model/DogWalkEntry.swift`
- [SwiftData services](https://github.com/clairerimel/peticle/blob/main/Peticle/Model/DataModel.swift): `Peticle/Model/DataModel.swift`
- [Dog entity and query](https://github.com/clairerimel/peticle/blob/main/Peticle/Model/DogEntity.swift): `Peticle/Model/DogEntity.swift`
- [Walk entity and query](https://github.com/clairerimel/peticle/blob/main/Peticle/Model/DogWalkEntryEntity.swift): `Peticle/Model/DogWalkEntryEntity.swift`

### App and system surfaces

- [Walk list](https://github.com/clairerimel/peticle/blob/main/Peticle/View/DogWalkListView.swift): `Peticle/View/DogWalkListView.swift`
- [Walk editor](https://github.com/clairerimel/peticle/blob/main/Peticle/View/DogWalkEntryView.swift): `Peticle/View/DogWalkEntryView.swift`
- [Walk snippet](https://github.com/clairerimel/peticle/blob/main/Peticle/View/ManageLastWalkEntrySnippetView.swift): `Peticle/View/ManageLastWalkEntrySnippetView.swift`
- [Quick actions widget](https://github.com/clairerimel/peticle/blob/main/PeticleWidget/PeticleQuickActionsWidget.swift): `PeticleWidget/PeticleQuickActionsWidget.swift`
- [Live Activity UI](https://github.com/clairerimel/peticle/blob/main/PeticleWidget/PeticleWidgetLiveActivity.swift): `PeticleWidget/PeticleWidgetLiveActivity.swift`
- [Navigation state](https://github.com/clairerimel/peticle/blob/main/Peticle/Manager/NavigationManager.swift): `Peticle/Manager/NavigationManager.swift`

### Other components

- **Dog owner**
- **ActivityKit**
- **Spotlight index**
- **Focus mode**

## Connections

- Dog owner → Shortcuts registry: invokes (evidence: `Peticle/Intents/DogWalkShortcutsProvider.swift`)
- Shortcuts registry → Walk intents: registers (evidence: `Peticle/Intents/DogWalkShortcutsProvider.swift`)
- Shortcuts registry → Rate walk: registers (evidence: `Peticle/Intents/DogWalkShortcutsProvider.swift`)
- Shortcuts registry → Walk history intents: registers (evidence: `Peticle/Intents/DogWalkShortcutsProvider.swift`)
- Shortcuts registry → Walk snippet intent: registers (evidence: `Peticle/Intents/DogWalkShortcutsProvider.swift`)
- Shortcuts registry → Open walk intent: registers (evidence: `Peticle/Intents/DogWalkShortcutsProvider.swift`)
- Shortcuts registry → Dog intents: registers (evidence: `Peticle/Intents/DogWalkShortcutsProvider.swift`)
- Dog owner → Walk list: uses (evidence: `README.md`)
- Walk intents → SwiftData services: creates walks (evidence: `Peticle/Model/DataModel.swift`)
- Rate walk → SwiftData services: updates walks (evidence: `Peticle/Intents/App Intents/UpdateWalkQualityIntent.swift`)
- SwiftData services → Walk records: persists (evidence: `Peticle/Model/DataModel.swift`)
- SwiftData services → Dog records: stores (evidence: `Peticle/Model/DataModel.swift`)
- Walk records → Walk entity and query: adapts to (evidence: `Peticle/Model/DogWalkEntry.swift`)
- Dog records → Dog entity and query: adapts to (evidence: `Peticle/Model/Dog.swift`)
- Walk entity and query → SwiftData services: queries (evidence: `Peticle/Model/DogWalkEntryEntity.swift`)
- Walk list → Walk editor: opens editor (evidence: `Peticle/View/DogWalkListView.swift`)
- Walk list → Walk records: lists (evidence: `Peticle/View/DogWalkListView.swift`)
- Walk snippet intent → Walk snippet: shows (evidence: `Peticle/Intents/App Intents/ManageLatestWalkEntryIntent.swift`)
- Open walk intent → Navigation state: routes through (evidence: `Peticle/Intents/App Intents/OpenEditEntryIntent.swift`)
- Peticle app → Walk list: launches (evidence: `Peticle/PeticleApp.swift`)
- Peticle app → SwiftData services: configures (evidence: `Peticle/PeticleApp.swift`)
- Peticle app → Navigation state: provides (evidence: `Peticle/PeticleApp.swift`)
- Peticle app → Dependency manager: provides (evidence: `Peticle/PeticleApp.swift`)
- Stopwatch intents → Walk stopwatch: controls
- Walk stopwatch → Activity state: updates state (evidence: `Peticle/Model/StopwatchViewModel.swift`)
- Walk stopwatch → ActivityKit: manages activities (evidence: `README.md`)
- Live Activity UI → Activity state: renders (evidence: `PeticleWidget/PeticleWidgetLiveActivity.swift`)
- Quick actions widget → Stopwatch intents: starts or stops (evidence: `README.md`)
- Walk list → Spotlight index: deletes indexed walks (evidence: `Peticle/View/DogWalkListView.swift`)
- Walk entity and query → Spotlight index: provides indexed data (evidence: `README.md`)
- Focus mode → Walk list: filters to today (evidence: `README.md`)
- Dependency manager → Open walk intent: supplies navigation (evidence: `Peticle/Intents/App Intents/OpenEditEntryIntent.swift`)
- Walk recommendation → Walk records: uses walk history
- Edit and delete → SwiftData services: manages entries
- Walk history intents → SwiftData services: reads activity
- Dog intents → Dog records: manages dogs (evidence: `Peticle/Intents/App Intents/AddDogIntent.swift`)
