# jusaaatin/locket architecture

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

- Interactive diagram: https://gitdiagram.com/jusaaatin/locket
- Repository: https://github.com/jusaaatin/locket

## Overview

Locket is an iOS app for keeping photos, personal details, and memories about close contacts. The main workflow starts at the home grid, where users can search, filter, and select people; they can open a profile or add/edit one, then view the saved information in profile screens. Settings manages the user's own profile. The graph follows the documented app flow and source-index references; several view implementations are only partially excerpted, so unverified storage and subview wiring is omitted.

Main entry points: [`Locket/HomeView/HomeView.swift`](https://github.com/jusaaatin/locket/blob/main/Locket/HomeView/HomeView.swift) (People home), [`Locket/ProfileView/ProfileView.swift`](https://github.com/jusaaatin/locket/blob/main/Locket/ProfileView/ProfileView.swift) (Contact profile), [`Locket/AddProfileView/EditProfileView.swift`](https://github.com/jusaaatin/locket/blob/main/Locket/AddProfileView/EditProfileView.swift) (Edit profile), [`Locket/AddProfileView/AddProfileView.swift`](https://github.com/jusaaatin/locket/blob/main/Locket/AddProfileView/AddProfileView.swift) (Add profile)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_navigation["App navigation"]
  node_app["App launch<br/>[LocketApp.swift]"]
  node_root["Root view<br/>[ContentView.swift]"]
  node_home["People home<br/>[HomeView.swift]"]
  node_search["Search and filters"]
  node_preview["Profile preview"]
  node_settings["Settings<br/>[SettingsView.swift]"]
end

subgraph group_profiles["Profile management"]
  node_add["Add profile"]
  node_edit["Edit profile"]
  node_person_fields["Personal details"]
  node_image_fields["Photos"]
  node_social_fields["Social accounts"]
  node_relationship_fields["Relationship details"]
  node_notes_fields["Notes"]
  node_self_add["Create self profile"]
end

subgraph group_views["Profile presentation"]
  node_detail["Contact profile<br/>[ProfileView.swift]"]
  node_self_detail["Self profile"]
  node_profile_header["Profile header"]
  node_profile_images["Profile photos"]
  node_profile_socials["Profile socials"]
  node_profile_relationship["Relationship display"]
  node_profile_description["Profile description"]
end

subgraph group_data["Profile data"]
  node_person_model[("Person model<br/>[Models.swift]")]
end

node_user(("User"))

node_user -->|"launches"| node_app
node_app -->|"shows"| node_root
node_root -->|"shows"| node_home
node_user -.->|"uses"| node_home
node_home -->|"shows"| node_search
node_home -->|"renders"| node_preview
node_home -->|"opens"| node_detail
node_home -->|"presents"| node_add
node_home -->|"opens"| node_settings
node_search -->|"filters"| node_home
node_add -->|"renders"| node_person_fields
node_add -->|"renders"| node_image_fields
node_add -->|"renders"| node_social_fields
node_add -->|"renders"| node_relationship_fields
node_add -->|"renders"| node_notes_fields
node_edit -->|"renders"| node_person_fields
node_edit -->|"renders"| node_image_fields
node_edit -->|"renders"| node_social_fields
node_edit -->|"renders"| node_relationship_fields
node_edit -.->|"renders"| node_notes_fields
node_detail -->|"renders"| node_profile_header
node_detail -->|"renders"| node_profile_images
node_detail -->|"renders"| node_profile_socials
node_detail -->|"renders"| node_profile_relationship
node_detail -->|"renders"| node_profile_description
node_detail -->|"opens editor"| node_edit
node_settings -->|"opens"| node_self_detail
node_settings -->|"presents"| node_self_add
node_home -->|"queries profiles"| node_person_model
node_detail -->|"deletes profile"| node_person_model
node_edit -.->|"updates profile"| node_person_model

click node_app "https://github.com/jusaaatin/locket/blob/main/Locket/LocketApp.swift"
click node_root "https://github.com/jusaaatin/locket/blob/main/Locket/ContentView.swift"
click node_home "https://github.com/jusaaatin/locket/blob/main/Locket/HomeView/HomeView.swift"
click node_search "https://github.com/jusaaatin/locket/blob/main/Locket/HomeView/HomeViewSearchFilter.swift"
click node_preview "https://github.com/jusaaatin/locket/blob/main/Locket/HomeView/HomeViewProfilePreview.swift"
click node_add "https://github.com/jusaaatin/locket/blob/main/Locket/AddProfileView/AddProfileView.swift"
click node_edit "https://github.com/jusaaatin/locket/blob/main/Locket/AddProfileView/EditProfileView.swift"
click node_person_fields "https://github.com/jusaaatin/locket/blob/main/Locket/AddProfileView/AddProfileViewPerson.swift"
click node_image_fields "https://github.com/jusaaatin/locket/blob/main/Locket/AddProfileView/AddProfileViewImages.swift"
click node_social_fields "https://github.com/jusaaatin/locket/blob/main/Locket/AddProfileView/AddProfileViewSocials.swift"
click node_relationship_fields "https://github.com/jusaaatin/locket/blob/main/Locket/AddProfileView/AddProfileViewRelationships.swift"
click node_notes_fields "https://github.com/jusaaatin/locket/blob/main/Locket/AddProfileView/AddProfileViewNotes.swift"
click node_self_add "https://github.com/jusaaatin/locket/blob/main/Locket/AddProfileView/AddSelfProfileView.swift"
click node_detail "https://github.com/jusaaatin/locket/blob/main/Locket/ProfileView/ProfileView.swift"
click node_self_detail "https://github.com/jusaaatin/locket/blob/main/Locket/ProfileView/SelfProfileView.swift"
click node_profile_header "https://github.com/jusaaatin/locket/blob/main/Locket/ProfileView/ProfileViewHeader.swift"
click node_profile_images "https://github.com/jusaaatin/locket/blob/main/Locket/ProfileView/ProfileViewImages.swift"
click node_profile_socials "https://github.com/jusaaatin/locket/blob/main/Locket/ProfileView/ProfileViewSocials.swift"
click node_profile_relationship "https://github.com/jusaaatin/locket/blob/main/Locket/ProfileView/ProfileViewRelationship.swift"
click node_profile_description "https://github.com/jusaaatin/locket/blob/main/Locket/ProfileView/ProfileViewDescription.swift"
click node_settings "https://github.com/jusaaatin/locket/blob/main/Locket/SettingsView/SettingsView.swift"
click node_person_model "https://github.com/jusaaatin/locket/blob/main/Locket/Global/Models.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_app,node_root,node_home,node_search,node_preview,node_settings,node_user toneBlue
class node_add,node_edit,node_person_fields,node_image_fields,node_social_fields,node_relationship_fields,node_notes_fields,node_self_add toneAmber
class node_detail,node_self_detail,node_profile_header,node_profile_images,node_profile_socials,node_profile_relationship,node_profile_description toneMint
class node_person_model toneRose
```

## Components

### App navigation

- [App launch](https://github.com/jusaaatin/locket/blob/main/Locket/LocketApp.swift): `Locket/LocketApp.swift`
- [Root view](https://github.com/jusaaatin/locket/blob/main/Locket/ContentView.swift): `Locket/ContentView.swift`
- [People home](https://github.com/jusaaatin/locket/blob/main/Locket/HomeView/HomeView.swift): `Locket/HomeView/HomeView.swift`
- [Search and filters](https://github.com/jusaaatin/locket/blob/main/Locket/HomeView/HomeViewSearchFilter.swift): `Locket/HomeView/HomeViewSearchFilter.swift`
- [Profile preview](https://github.com/jusaaatin/locket/blob/main/Locket/HomeView/HomeViewProfilePreview.swift): `Locket/HomeView/HomeViewProfilePreview.swift`
- [Settings](https://github.com/jusaaatin/locket/blob/main/Locket/SettingsView/SettingsView.swift): `Locket/SettingsView/SettingsView.swift`

### Profile management

- [Add profile](https://github.com/jusaaatin/locket/blob/main/Locket/AddProfileView/AddProfileView.swift): `Locket/AddProfileView/AddProfileView.swift`
- [Edit profile](https://github.com/jusaaatin/locket/blob/main/Locket/AddProfileView/EditProfileView.swift): `Locket/AddProfileView/EditProfileView.swift`
- [Personal details](https://github.com/jusaaatin/locket/blob/main/Locket/AddProfileView/AddProfileViewPerson.swift): `Locket/AddProfileView/AddProfileViewPerson.swift`
- [Photos](https://github.com/jusaaatin/locket/blob/main/Locket/AddProfileView/AddProfileViewImages.swift): `Locket/AddProfileView/AddProfileViewImages.swift`
- [Social accounts](https://github.com/jusaaatin/locket/blob/main/Locket/AddProfileView/AddProfileViewSocials.swift): `Locket/AddProfileView/AddProfileViewSocials.swift`
- [Relationship details](https://github.com/jusaaatin/locket/blob/main/Locket/AddProfileView/AddProfileViewRelationships.swift): `Locket/AddProfileView/AddProfileViewRelationships.swift`
- [Notes](https://github.com/jusaaatin/locket/blob/main/Locket/AddProfileView/AddProfileViewNotes.swift): `Locket/AddProfileView/AddProfileViewNotes.swift`
- [Create self profile](https://github.com/jusaaatin/locket/blob/main/Locket/AddProfileView/AddSelfProfileView.swift): `Locket/AddProfileView/AddSelfProfileView.swift`

### Profile presentation

- [Contact profile](https://github.com/jusaaatin/locket/blob/main/Locket/ProfileView/ProfileView.swift): `Locket/ProfileView/ProfileView.swift`
- [Self profile](https://github.com/jusaaatin/locket/blob/main/Locket/ProfileView/SelfProfileView.swift): `Locket/ProfileView/SelfProfileView.swift`
- [Profile header](https://github.com/jusaaatin/locket/blob/main/Locket/ProfileView/ProfileViewHeader.swift): `Locket/ProfileView/ProfileViewHeader.swift`
- [Profile photos](https://github.com/jusaaatin/locket/blob/main/Locket/ProfileView/ProfileViewImages.swift): `Locket/ProfileView/ProfileViewImages.swift`
- [Profile socials](https://github.com/jusaaatin/locket/blob/main/Locket/ProfileView/ProfileViewSocials.swift): `Locket/ProfileView/ProfileViewSocials.swift`
- [Relationship display](https://github.com/jusaaatin/locket/blob/main/Locket/ProfileView/ProfileViewRelationship.swift): `Locket/ProfileView/ProfileViewRelationship.swift`
- [Profile description](https://github.com/jusaaatin/locket/blob/main/Locket/ProfileView/ProfileViewDescription.swift): `Locket/ProfileView/ProfileViewDescription.swift`

### Profile data

- [Person model](https://github.com/jusaaatin/locket/blob/main/Locket/Global/Models.swift): `Locket/Global/Models.swift`

### Other components

- **User**

## Connections

- User → App launch: launches (evidence: `Locket/LocketApp.swift`)
- App launch → Root view: shows (evidence: `Locket/LocketApp.swift`)
- Root view → People home: shows (evidence: `Locket/ContentView.swift`)
- User → People home: uses
- People home → Search and filters: shows (evidence: `Locket/HomeView/HomeView.swift`)
- People home → Profile preview: renders (evidence: `Locket/HomeView/HomeView.swift`)
- People home → Contact profile: opens (evidence: `Locket/HomeView/HomeView.swift`)
- People home → Add profile: presents (evidence: `Locket/HomeView/HomeView.swift`)
- People home → Settings: opens (evidence: `Locket/HomeView/HomeView.swift`)
- Search and filters → People home: filters (evidence: `Locket/HomeView/HomeViewSearchFilter.swift`)
- Add profile → Personal details: renders (evidence: `Locket/AddProfileView/AddProfileView.swift`)
- Add profile → Photos: renders (evidence: `Locket/AddProfileView/AddProfileView.swift`)
- Add profile → Social accounts: renders (evidence: `Locket/AddProfileView/AddProfileView.swift`)
- Add profile → Relationship details: renders (evidence: `Locket/AddProfileView/AddProfileView.swift`)
- Add profile → Notes: renders (evidence: `Locket/AddProfileView/AddProfileView.swift`)
- Edit profile → Personal details: renders (evidence: `Locket/AddProfileView/EditProfileView.swift`)
- Edit profile → Photos: renders (evidence: `Locket/AddProfileView/EditProfileView.swift`)
- Edit profile → Social accounts: renders (evidence: `Locket/AddProfileView/EditProfileView.swift`)
- Edit profile → Relationship details: renders (evidence: `Locket/AddProfileView/EditProfileView.swift`)
- Edit profile → Notes: renders (evidence: `Locket/AddProfileView/EditProfileView.swift`)
- Contact profile → Profile header: renders (evidence: `Locket/ProfileView/ProfileView.swift`)
- Contact profile → Profile photos: renders (evidence: `Locket/ProfileView/ProfileView.swift`)
- Contact profile → Profile socials: renders (evidence: `Locket/ProfileView/ProfileView.swift`)
- Contact profile → Relationship display: renders (evidence: `Locket/ProfileView/ProfileView.swift`)
- Contact profile → Profile description: renders (evidence: `Locket/ProfileView/ProfileView.swift`)
- Contact profile → Edit profile: opens editor (evidence: `Locket/ProfileView/ProfileView.swift`)
- Settings → Self profile: opens (evidence: `Locket/SettingsView/SettingsView.swift`)
- Settings → Create self profile: presents (evidence: `Locket/SettingsView/SettingsView.swift`)
- People home → Person model: queries profiles (evidence: `Locket/HomeView/HomeView.swift`)
- Contact profile → Person model: deletes profile (evidence: `Locket/ProfileView/ProfileView.swift`)
- Edit profile → Person model: updates profile
