# xdadik/family-tree architecture

> Architecture diagram of the GitHub repository xdadik/family-tree, 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/xdadik/family-tree
- Repository: https://github.com/xdadik/family-tree

## Overview

This is a family-history web app for browsing and maintaining a shared family record: users enter through sign-in, navigate the home, tree, search, or settings screens, and open member, family, photo, event, and notification views. The app shell selects screens and mounts shared modals; FamilyContext provides the application state and local persistence. The graph also preserves onboarding, admin management, language/support, and relationship-calculation capabilities. Evidence is limited to the README (empty), source index, and shown excerpts; unsampled links are omitted where ownership is uncertain.

Main entry points: [`src/context/FamilyContext.tsx`](https://github.com/xdadik/family-tree/blob/main/src/context/FamilyContext.tsx) (Family state), [`src/App.tsx`](https://github.com/xdadik/family-tree/blob/main/src/App.tsx) (App shell), [`src/components/home/HomeScreen.tsx`](https://github.com/xdadik/family-tree/blob/main/src/components/home/HomeScreen.tsx) (Home screen), [`src/components/common/LanguageModal.tsx`](https://github.com/xdadik/family-tree/blob/main/src/components/common/LanguageModal.tsx) (Language selection)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["App shell"]
  node_app["App shell<br/>[App.tsx]"]
  node_home["Home screen<br/>[HomeScreen.tsx]"]
  node_navigation["Navigation<br/>[Navigation.tsx]"]
  node_onboarding["Onboarding"]
  node_login["Sign-in<br/>[LoginModal.tsx]"]
  node_admins["Admin management"]
end

subgraph group_family["Family records"]
  node_tree["Family tree"]
  node_search["Family search<br/>[SearchScreen.tsx]"]
  node_profile["Member profile"]
  node_memberform["Member editor<br/>[AddMemberModal.tsx]"]
  node_familydetails["Family details"]
end

subgraph group_engagement["Family activity"]
  node_photos["Photo gallery"]
  node_events["Family events<br/>[EventsModal.tsx]"]
  node_notifications["Notifications"]
  node_quickactions["Quick actions"]
end

subgraph group_shared["Shared services"]
  node_settings["Settings<br/>[SettingsScreen.tsx]"]
  node_header["Home header<br/>[Header.tsx]"]
  node_language["Language selection<br/>[LanguageModal.tsx]"]
  node_support["Support<br/>[SupportModal.tsx]"]
  node_context["Family state<br/>[FamilyContext.tsx]"]
  node_initialdata["Starter family data<br/>[initialData.ts]"]
  node_types["Family data types<br/>[family.ts]"]
  node_translations["Translations<br/>[translations.ts]"]
  node_relationships["Relationship calculator"]
end

node_user(("Family user"))

node_user -->|"uses"| node_app
node_app -->|"provides state"| node_context
node_app -->|"shows when signed out"| node_login
node_app -->|"selects screen"| node_home
node_app -->|"selects screen"| node_tree
node_app -->|"selects screen"| node_search
node_app -->|"selects screen"| node_settings
node_app -->|"mounts"| node_navigation
node_app -->|"mounts"| node_profile
node_app -->|"mounts"| node_memberform
node_app -->|"mounts"| node_familydetails
node_app -->|"mounts"| node_photos
node_app -->|"mounts"| node_events
node_app -->|"mounts"| node_notifications
node_app -->|"mounts"| node_quickactions
node_app -->|"mounts"| node_language
node_app -->|"mounts"| node_support
node_home -->|"renders"| node_header
node_home -->|"reads state"| node_context
node_tree -->|"reads state"| node_context
node_search -->|"reads state"| node_context
node_profile -->|"reads state"| node_context
node_memberform -->|"updates records"| node_context
node_familydetails -->|"reads state"| node_context
node_photos -->|"updates records"| node_context
node_events -->|"uses state"| node_context
node_notifications -->|"updates state"| node_context
node_navigation -->|"reads state"| node_context
node_login -->|"uses auth state"| node_context
node_admins -->|"uses admin state"| node_context
node_settings -->|"updates preferences"| node_context
node_language -->|"sets language"| node_context
node_language -->|"uses translations"| node_translations
node_quickactions -->|"uses state"| node_context
node_support -->|"uses state"| node_context
node_context -->|"loads starter data"| node_initialdata
node_context -->|"uses translations"| node_translations
node_initialdata -->|"defines records as"| node_types
node_relationships -->|"calculates from"| node_types
node_context -->|"stores typed records"| node_types

click node_app "https://github.com/xdadik/family-tree/blob/main/src/App.tsx"
click node_home "https://github.com/xdadik/family-tree/blob/main/src/components/home/HomeScreen.tsx"
click node_navigation "https://github.com/xdadik/family-tree/blob/main/src/components/common/Navigation.tsx"
click node_onboarding "https://github.com/xdadik/family-tree/blob/main/src/components/onboarding/OnboardingScreen.tsx"
click node_login "https://github.com/xdadik/family-tree/blob/main/src/components/auth/LoginModal.tsx"
click node_admins "https://github.com/xdadik/family-tree/blob/main/src/components/auth/ManageAdminsModal.tsx"
click node_tree "https://github.com/xdadik/family-tree/blob/main/src/components/tree/FamilyTreeScreen.tsx"
click node_search "https://github.com/xdadik/family-tree/blob/main/src/components/search/SearchScreen.tsx"
click node_profile "https://github.com/xdadik/family-tree/blob/main/src/components/profile/MemberProfileModal.tsx"
click node_memberform "https://github.com/xdadik/family-tree/blob/main/src/components/forms/AddMemberModal.tsx"
click node_familydetails "https://github.com/xdadik/family-tree/blob/main/src/components/family/FamilyDetailsModal.tsx"
click node_photos "https://github.com/xdadik/family-tree/blob/main/src/components/photos/PhotoGalleryModal.tsx"
click node_events "https://github.com/xdadik/family-tree/blob/main/src/components/events/EventsModal.tsx"
click node_notifications "https://github.com/xdadik/family-tree/blob/main/src/components/notifications/NotificationCenterModal.tsx"
click node_quickactions "https://github.com/xdadik/family-tree/blob/main/src/components/common/QuickActionSheet.tsx"
click node_settings "https://github.com/xdadik/family-tree/blob/main/src/components/settings/SettingsScreen.tsx"
click node_header "https://github.com/xdadik/family-tree/blob/main/src/components/common/Header.tsx"
click node_language "https://github.com/xdadik/family-tree/blob/main/src/components/common/LanguageModal.tsx"
click node_support "https://github.com/xdadik/family-tree/blob/main/src/components/common/SupportModal.tsx"
click node_context "https://github.com/xdadik/family-tree/blob/main/src/context/FamilyContext.tsx"
click node_initialdata "https://github.com/xdadik/family-tree/blob/main/src/data/initialData.ts"
click node_types "https://github.com/xdadik/family-tree/blob/main/src/types/family.ts"
click node_translations "https://github.com/xdadik/family-tree/blob/main/src/utils/translations.ts"
click node_relationships "https://github.com/xdadik/family-tree/blob/main/src/utils/relationshipEngine.ts"

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_home,node_navigation,node_onboarding,node_login,node_admins,node_user toneBlue
class node_tree,node_search,node_profile,node_memberform,node_familydetails toneAmber
class node_photos,node_events,node_notifications,node_quickactions toneMint
class node_settings,node_header,node_language,node_support,node_context,node_initialdata,node_types,node_translations,node_relationships toneRose
```

## Components

### App shell

- [App shell](https://github.com/xdadik/family-tree/blob/main/src/App.tsx): `src/App.tsx`
- [Home screen](https://github.com/xdadik/family-tree/blob/main/src/components/home/HomeScreen.tsx): `src/components/home/HomeScreen.tsx`
- [Navigation](https://github.com/xdadik/family-tree/blob/main/src/components/common/Navigation.tsx): `src/components/common/Navigation.tsx`
- [Onboarding](https://github.com/xdadik/family-tree/blob/main/src/components/onboarding/OnboardingScreen.tsx): `src/components/onboarding/OnboardingScreen.tsx`
- [Sign-in](https://github.com/xdadik/family-tree/blob/main/src/components/auth/LoginModal.tsx): `src/components/auth/LoginModal.tsx`
- [Admin management](https://github.com/xdadik/family-tree/blob/main/src/components/auth/ManageAdminsModal.tsx): `src/components/auth/ManageAdminsModal.tsx`

### Family records

- [Family tree](https://github.com/xdadik/family-tree/blob/main/src/components/tree/FamilyTreeScreen.tsx): `src/components/tree/FamilyTreeScreen.tsx`
- [Family search](https://github.com/xdadik/family-tree/blob/main/src/components/search/SearchScreen.tsx): `src/components/search/SearchScreen.tsx`
- [Member profile](https://github.com/xdadik/family-tree/blob/main/src/components/profile/MemberProfileModal.tsx): `src/components/profile/MemberProfileModal.tsx`
- [Member editor](https://github.com/xdadik/family-tree/blob/main/src/components/forms/AddMemberModal.tsx): `src/components/forms/AddMemberModal.tsx`
- [Family details](https://github.com/xdadik/family-tree/blob/main/src/components/family/FamilyDetailsModal.tsx): `src/components/family/FamilyDetailsModal.tsx`

### Family activity

- [Photo gallery](https://github.com/xdadik/family-tree/blob/main/src/components/photos/PhotoGalleryModal.tsx): `src/components/photos/PhotoGalleryModal.tsx`
- [Family events](https://github.com/xdadik/family-tree/blob/main/src/components/events/EventsModal.tsx): `src/components/events/EventsModal.tsx`
- [Notifications](https://github.com/xdadik/family-tree/blob/main/src/components/notifications/NotificationCenterModal.tsx): `src/components/notifications/NotificationCenterModal.tsx`
- [Quick actions](https://github.com/xdadik/family-tree/blob/main/src/components/common/QuickActionSheet.tsx): `src/components/common/QuickActionSheet.tsx`

### Shared services

- [Settings](https://github.com/xdadik/family-tree/blob/main/src/components/settings/SettingsScreen.tsx): `src/components/settings/SettingsScreen.tsx`
- [Home header](https://github.com/xdadik/family-tree/blob/main/src/components/common/Header.tsx): `src/components/common/Header.tsx`
- [Language selection](https://github.com/xdadik/family-tree/blob/main/src/components/common/LanguageModal.tsx): `src/components/common/LanguageModal.tsx`
- [Support](https://github.com/xdadik/family-tree/blob/main/src/components/common/SupportModal.tsx): `src/components/common/SupportModal.tsx`
- [Family state](https://github.com/xdadik/family-tree/blob/main/src/context/FamilyContext.tsx): `src/context/FamilyContext.tsx`
- [Starter family data](https://github.com/xdadik/family-tree/blob/main/src/data/initialData.ts): `src/data/initialData.ts`
- [Family data types](https://github.com/xdadik/family-tree/blob/main/src/types/family.ts): `src/types/family.ts`
- [Translations](https://github.com/xdadik/family-tree/blob/main/src/utils/translations.ts): `src/utils/translations.ts`
- [Relationship calculator](https://github.com/xdadik/family-tree/blob/main/src/utils/relationshipEngine.ts): `src/utils/relationshipEngine.ts`

### Other components

- **Family user**

## Connections

- Family user → App shell: uses
- App shell → Family state: provides state (evidence: `src/App.tsx`)
- App shell → Sign-in: shows when signed out (evidence: `src/App.tsx`)
- App shell → Home screen: selects screen (evidence: `src/App.tsx`)
- App shell → Family tree: selects screen (evidence: `src/App.tsx`)
- App shell → Family search: selects screen (evidence: `src/App.tsx`)
- App shell → Settings: selects screen (evidence: `src/App.tsx`)
- App shell → Navigation: mounts (evidence: `src/App.tsx`)
- App shell → Member profile: mounts (evidence: `src/App.tsx`)
- App shell → Member editor: mounts (evidence: `src/App.tsx`)
- App shell → Family details: mounts (evidence: `src/App.tsx`)
- App shell → Photo gallery: mounts (evidence: `src/App.tsx`)
- App shell → Family events: mounts (evidence: `src/App.tsx`)
- App shell → Notifications: mounts (evidence: `src/App.tsx`)
- App shell → Quick actions: mounts (evidence: `src/App.tsx`)
- App shell → Language selection: mounts (evidence: `src/App.tsx`)
- App shell → Support: mounts (evidence: `src/App.tsx`)
- Home screen → Home header: renders (evidence: `src/components/home/HomeScreen.tsx`)
- Home screen → Family state: reads state (evidence: `src/components/home/HomeScreen.tsx`)
- Family tree → Family state: reads state (evidence: `src/components/tree/FamilyTreeScreen.tsx`)
- Family search → Family state: reads state (evidence: `src/components/search/SearchScreen.tsx`)
- Member profile → Family state: reads state (evidence: `src/components/profile/MemberProfileModal.tsx`)
- Member editor → Family state: updates records (evidence: `src/components/forms/AddMemberModal.tsx`)
- Family details → Family state: reads state (evidence: `src/components/family/FamilyDetailsModal.tsx`)
- Photo gallery → Family state: updates records (evidence: `src/components/photos/PhotoGalleryModal.tsx`)
- Family events → Family state: uses state (evidence: `src/components/events/EventsModal.tsx`)
- Notifications → Family state: updates state (evidence: `src/components/notifications/NotificationCenterModal.tsx`)
- Navigation → Family state: reads state (evidence: `src/components/common/Navigation.tsx`)
- Sign-in → Family state: uses auth state (evidence: `src/components/auth/LoginModal.tsx`)
- Admin management → Family state: uses admin state (evidence: `src/components/auth/ManageAdminsModal.tsx`)
- Settings → Family state: updates preferences (evidence: `src/components/settings/SettingsScreen.tsx`)
- Language selection → Family state: sets language (evidence: `src/components/common/LanguageModal.tsx`)
- Language selection → Translations: uses translations (evidence: `src/components/common/LanguageModal.tsx`)
- Quick actions → Family state: uses state (evidence: `src/components/common/QuickActionSheet.tsx`)
- Support → Family state: uses state (evidence: `src/components/common/SupportModal.tsx`)
- Family state → Starter family data: loads starter data (evidence: `src/context/FamilyContext.tsx`)
- Family state → Translations: uses translations (evidence: `src/context/FamilyContext.tsx`)
- Starter family data → Family data types: defines records as (evidence: `src/data/initialData.ts`)
- Relationship calculator → Family data types: calculates from (evidence: `src/utils/relationshipEngine.ts`)
- Family state → Family data types: stores typed records (evidence: `src/context/FamilyContext.tsx`)
