# kennethlaurence58-pixel/leafcheck-ai-system-admin architecture

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

- Interactive diagram: https://gitdiagram.com/kennethlaurence58-pixel/leafcheck-ai-system-admin
- Repository: https://github.com/kennethlaurence58-pixel/leafcheck-ai-system-admin

## Overview

LeafCheck AI is an Expo React Native UI prototype for plant owners and administrators; the README explicitly says backend services and data infrastructure are absent. The user-facing workflow spans plant capture, organizing plants into spaces, and viewing summaries or plant details; the admin interface provides dashboard, user, device, API, and settings screens with prototype interactions. The graph reflects documented capabilities and sampled imports; unsampled routes are represented only at their exact file paths, without inferred call links.

Main entry points: [`app/(tabs)/index.tsx`](https://github.com/kennethlaurence58-pixel/leafcheck-ai-system-admin/blob/main/app/(tabs)/index.tsx) (Home summary), [`app/(tabs)/space-detail.tsx`](https://github.com/kennethlaurence58-pixel/leafcheck-ai-system-admin/blob/main/app/(tabs)/space-detail.tsx) (Space details), [`context/spaces.tsx`](https://github.com/kennethlaurence58-pixel/leafcheck-ai-system-admin/blob/main/context/spaces.tsx) (Spaces state), [`components/admin-ui.tsx`](https://github.com/kennethlaurence58-pixel/leafcheck-ai-system-admin/blob/main/components/admin-ui.tsx) (Admin UI components)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_user["Plant-owner experience"]
  node_home["Home summary<br/>[index.tsx]"]
  node_capture["Plant capture<br/>[camera.tsx]"]
  node_spaces["My spaces<br/>[spaces.tsx]"]
  node_space_detail["Space details<br/>[space-detail.tsx]"]
  node_plant_profile["Plant profile<br/>[plant-profile.tsx]"]
  node_search["Plant search<br/>[search.tsx]"]
  node_alerts_archive["Alerts and archives<br/>[notifications.tsx]"]
end

subgraph group_plants["Plant records and state"]
  node_spaces_state[("Spaces state<br/>[spaces.tsx]")]
  node_app_state[("Plant and alert state<br/>[app-data.tsx]")]
  node_sensor_state[("Sensor state<br/>[plant-data.tsx]")]
  node_profile_state[("Profile state<br/>[profile.tsx]")]
end

subgraph group_admin["Admin interface"]
  node_admin_dashboard["Dashboard<br/>[index.tsx]"]
  node_admin_users["User management<br/>[users.tsx]"]
  node_admin_devices["Device management<br/>[devices.tsx]"]
  node_admin_apis["API management<br/>[apis.tsx]"]
  node_admin_settings["Admin settings<br/>[settings.tsx]"]
end

subgraph group_shared["Shared UI and account"]
  node_auth_routes["Account screens<br/>[login.tsx]"]
  node_admin_ui["Admin UI components<br/>[admin-ui.tsx]"]
  node_bottom_nav["User navigation<br/>[bottom-nav.tsx]"]
  node_plant_card["Plant overview card"]
  node_greeting["Greeting header"]
  node_auth_layout["Auth layout<br/>[auth-layout.tsx]"]
  node_auth_button["Auth button<br/>[auth-button.tsx]"]
end

node_owner(("Plant owner"))
node_admin_actor(("Administrator"))

node_owner -->|"views"| node_home
node_owner -->|"uses"| node_capture
node_owner -->|"manages plants"| node_spaces
node_owner -->|"uses"| node_auth_routes
node_admin_actor -->|"uses"| node_admin_dashboard
node_admin_actor -->|"manages users"| node_admin_users
node_admin_actor -->|"manages devices"| node_admin_devices
node_admin_actor -->|"manages APIs"| node_admin_apis
node_admin_actor -->|"configures"| node_admin_settings
node_home -->|"reads spaces"| node_spaces_state
node_home -->|"reads sensor status"| node_sensor_state
node_home -->|"renders"| node_greeting
node_home -->|"renders"| node_plant_card
node_home -->|"renders"| node_bottom_nav
node_home -->|"navigates to"| node_space_detail
node_spaces -->|"uses"| node_spaces_state
node_spaces -->|"renders"| node_bottom_nav
node_space_detail -->|"uses"| node_spaces_state
node_space_detail -->|"uses"| node_app_state
node_space_detail -->|"renders"| node_bottom_nav
node_plant_profile -->|"uses"| node_app_state
node_search -->|"uses"| node_app_state
node_search -->|"renders"| node_bottom_nav
node_greeting -->|"reads profile"| node_profile_state
node_greeting -->|"reads plant data"| node_sensor_state
node_plant_card -->|"reads spaces"| node_spaces_state
node_plant_card -->|"reads plant data"| node_sensor_state
node_admin_dashboard -->|"uses"| node_admin_ui
node_admin_users -->|"uses"| node_admin_ui
node_admin_devices -->|"uses"| node_admin_ui
node_admin_settings -->|"uses"| node_admin_ui
node_auth_routes -->|"uses"| node_auth_layout
node_auth_routes -->|"uses"| node_auth_button

click node_home "https://github.com/kennethlaurence58-pixel/leafcheck-ai-system-admin/blob/main/app/(tabs)/index.tsx"
click node_capture "https://github.com/kennethlaurence58-pixel/leafcheck-ai-system-admin/blob/main/app/(tabs)/camera.tsx"
click node_spaces "https://github.com/kennethlaurence58-pixel/leafcheck-ai-system-admin/blob/main/app/(tabs)/spaces.tsx"
click node_space_detail "https://github.com/kennethlaurence58-pixel/leafcheck-ai-system-admin/blob/main/app/(tabs)/space-detail.tsx"
click node_plant_profile "https://github.com/kennethlaurence58-pixel/leafcheck-ai-system-admin/blob/main/app/plant-profile.tsx"
click node_search "https://github.com/kennethlaurence58-pixel/leafcheck-ai-system-admin/blob/main/app/search.tsx"
click node_alerts_archive "https://github.com/kennethlaurence58-pixel/leafcheck-ai-system-admin/blob/main/app/notifications.tsx"
click node_auth_routes "https://github.com/kennethlaurence58-pixel/leafcheck-ai-system-admin/blob/main/app/login.tsx"
click node_spaces_state "https://github.com/kennethlaurence58-pixel/leafcheck-ai-system-admin/blob/main/context/spaces.tsx"
click node_app_state "https://github.com/kennethlaurence58-pixel/leafcheck-ai-system-admin/blob/main/context/app-data.tsx"
click node_sensor_state "https://github.com/kennethlaurence58-pixel/leafcheck-ai-system-admin/blob/main/context/plant-data.tsx"
click node_profile_state "https://github.com/kennethlaurence58-pixel/leafcheck-ai-system-admin/blob/main/context/profile.tsx"
click node_admin_dashboard "https://github.com/kennethlaurence58-pixel/leafcheck-ai-system-admin/blob/main/app/admin/index.tsx"
click node_admin_users "https://github.com/kennethlaurence58-pixel/leafcheck-ai-system-admin/blob/main/app/admin/users.tsx"
click node_admin_devices "https://github.com/kennethlaurence58-pixel/leafcheck-ai-system-admin/blob/main/app/admin/devices.tsx"
click node_admin_apis "https://github.com/kennethlaurence58-pixel/leafcheck-ai-system-admin/blob/main/app/admin/apis.tsx"
click node_admin_settings "https://github.com/kennethlaurence58-pixel/leafcheck-ai-system-admin/blob/main/app/admin/settings.tsx"
click node_admin_ui "https://github.com/kennethlaurence58-pixel/leafcheck-ai-system-admin/blob/main/components/admin-ui.tsx"
click node_bottom_nav "https://github.com/kennethlaurence58-pixel/leafcheck-ai-system-admin/blob/main/components/bottom-nav.tsx"
click node_plant_card "https://github.com/kennethlaurence58-pixel/leafcheck-ai-system-admin/blob/main/components/plant-overview-card.tsx"
click node_greeting "https://github.com/kennethlaurence58-pixel/leafcheck-ai-system-admin/blob/main/components/greeting-header.tsx"
click node_auth_layout "https://github.com/kennethlaurence58-pixel/leafcheck-ai-system-admin/blob/main/components/auth-layout.tsx"
click node_auth_button "https://github.com/kennethlaurence58-pixel/leafcheck-ai-system-admin/blob/main/components/auth-button.tsx"

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_home,node_capture,node_spaces,node_space_detail,node_plant_profile,node_search,node_alerts_archive toneBlue
class node_spaces_state,node_app_state,node_sensor_state,node_profile_state toneAmber
class node_admin_dashboard,node_admin_users,node_admin_devices,node_admin_apis,node_admin_settings toneMint
class node_auth_routes,node_admin_ui,node_bottom_nav,node_plant_card,node_greeting,node_auth_layout,node_auth_button toneRose
class node_owner,node_admin_actor toneIndigo
```

## Components

### Plant-owner experience

- [Home summary](https://github.com/kennethlaurence58-pixel/leafcheck-ai-system-admin/blob/main/app/(tabs)/index.tsx): `app/(tabs)/index.tsx`
- [Plant capture](https://github.com/kennethlaurence58-pixel/leafcheck-ai-system-admin/blob/main/app/(tabs)/camera.tsx): `app/(tabs)/camera.tsx`
- [My spaces](https://github.com/kennethlaurence58-pixel/leafcheck-ai-system-admin/blob/main/app/(tabs)/spaces.tsx): `app/(tabs)/spaces.tsx`
- [Space details](https://github.com/kennethlaurence58-pixel/leafcheck-ai-system-admin/blob/main/app/(tabs)/space-detail.tsx): `app/(tabs)/space-detail.tsx`
- [Plant profile](https://github.com/kennethlaurence58-pixel/leafcheck-ai-system-admin/blob/main/app/plant-profile.tsx): `app/plant-profile.tsx`
- [Plant search](https://github.com/kennethlaurence58-pixel/leafcheck-ai-system-admin/blob/main/app/search.tsx): `app/search.tsx`
- [Alerts and archives](https://github.com/kennethlaurence58-pixel/leafcheck-ai-system-admin/blob/main/app/notifications.tsx): `app/notifications.tsx`

### Plant records and state

- [Spaces state](https://github.com/kennethlaurence58-pixel/leafcheck-ai-system-admin/blob/main/context/spaces.tsx): `context/spaces.tsx`
- [Plant and alert state](https://github.com/kennethlaurence58-pixel/leafcheck-ai-system-admin/blob/main/context/app-data.tsx): `context/app-data.tsx`
- [Sensor state](https://github.com/kennethlaurence58-pixel/leafcheck-ai-system-admin/blob/main/context/plant-data.tsx): `context/plant-data.tsx`
- [Profile state](https://github.com/kennethlaurence58-pixel/leafcheck-ai-system-admin/blob/main/context/profile.tsx): `context/profile.tsx`

### Admin interface

- [Dashboard](https://github.com/kennethlaurence58-pixel/leafcheck-ai-system-admin/blob/main/app/admin/index.tsx): `app/admin/index.tsx`
- [User management](https://github.com/kennethlaurence58-pixel/leafcheck-ai-system-admin/blob/main/app/admin/users.tsx): `app/admin/users.tsx`
- [Device management](https://github.com/kennethlaurence58-pixel/leafcheck-ai-system-admin/blob/main/app/admin/devices.tsx): `app/admin/devices.tsx`
- [API management](https://github.com/kennethlaurence58-pixel/leafcheck-ai-system-admin/blob/main/app/admin/apis.tsx): `app/admin/apis.tsx`
- [Admin settings](https://github.com/kennethlaurence58-pixel/leafcheck-ai-system-admin/blob/main/app/admin/settings.tsx): `app/admin/settings.tsx`

### Shared UI and account

- [Account screens](https://github.com/kennethlaurence58-pixel/leafcheck-ai-system-admin/blob/main/app/login.tsx): `app/login.tsx`
- [Admin UI components](https://github.com/kennethlaurence58-pixel/leafcheck-ai-system-admin/blob/main/components/admin-ui.tsx): `components/admin-ui.tsx`
- [User navigation](https://github.com/kennethlaurence58-pixel/leafcheck-ai-system-admin/blob/main/components/bottom-nav.tsx): `components/bottom-nav.tsx`
- [Plant overview card](https://github.com/kennethlaurence58-pixel/leafcheck-ai-system-admin/blob/main/components/plant-overview-card.tsx): `components/plant-overview-card.tsx`
- [Greeting header](https://github.com/kennethlaurence58-pixel/leafcheck-ai-system-admin/blob/main/components/greeting-header.tsx): `components/greeting-header.tsx`
- [Auth layout](https://github.com/kennethlaurence58-pixel/leafcheck-ai-system-admin/blob/main/components/auth-layout.tsx): `components/auth-layout.tsx`
- [Auth button](https://github.com/kennethlaurence58-pixel/leafcheck-ai-system-admin/blob/main/components/auth-button.tsx): `components/auth-button.tsx`

### Other components

- **Plant owner**
- **Administrator**

## Connections

- Plant owner → Home summary: views (evidence: `README.md`)
- Plant owner → Plant capture: uses (evidence: `README.md`)
- Plant owner → My spaces: manages plants (evidence: `README.md`)
- Plant owner → Account screens: uses (evidence: `README.md`)
- Administrator → Dashboard: uses (evidence: `README.md`)
- Administrator → User management: manages users (evidence: `README.md`)
- Administrator → Device management: manages devices (evidence: `README.md`)
- Administrator → API management: manages APIs (evidence: `README.md`)
- Administrator → Admin settings: configures (evidence: `README.md`)
- Home summary → Spaces state: reads spaces (evidence: `app/(tabs)/index.tsx`)
- Home summary → Sensor state: reads sensor status (evidence: `app/(tabs)/index.tsx`)
- Home summary → Greeting header: renders (evidence: `app/(tabs)/index.tsx`)
- Home summary → Plant overview card: renders (evidence: `app/(tabs)/index.tsx`)
- Home summary → User navigation: renders (evidence: `app/(tabs)/index.tsx`)
- Home summary → Space details: navigates to (evidence: `app/(tabs)/index.tsx`)
- My spaces → Spaces state: uses (evidence: `app/(tabs)/spaces.tsx`)
- My spaces → User navigation: renders (evidence: `app/(tabs)/spaces.tsx`)
- Space details → Spaces state: uses (evidence: `app/(tabs)/space-detail.tsx`)
- Space details → Plant and alert state: uses (evidence: `app/(tabs)/space-detail.tsx`)
- Space details → User navigation: renders (evidence: `app/(tabs)/space-detail.tsx`)
- Plant profile → Plant and alert state: uses (evidence: `app/plant-profile.tsx`)
- Plant search → Plant and alert state: uses (evidence: `app/search.tsx`)
- Plant search → User navigation: renders (evidence: `app/search.tsx`)
- Greeting header → Profile state: reads profile (evidence: `components/greeting-header.tsx`)
- Greeting header → Sensor state: reads plant data (evidence: `components/greeting-header.tsx`)
- Plant overview card → Spaces state: reads spaces (evidence: `components/plant-overview-card.tsx`)
- Plant overview card → Sensor state: reads plant data (evidence: `components/plant-overview-card.tsx`)
- Dashboard → Admin UI components: uses (evidence: `app/admin/index.tsx`)
- User management → Admin UI components: uses (evidence: `app/admin/users.tsx`)
- Device management → Admin UI components: uses (evidence: `app/admin/devices.tsx`)
- Admin settings → Admin UI components: uses (evidence: `app/admin/settings.tsx`)
- Account screens → Auth layout: uses
- Account screens → Auth button: uses
