# lucaswithboots/price_track_app architecture

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

- Interactive diagram: https://gitdiagram.com/lucaswithboots/price_track_app
- Repository: https://github.com/lucaswithboots/price_track_app

## Overview

##### Project type and purpose
- This is a cross-platform mobile application (“Price Track App”) built with Expo and React Native.
- It tracks item prices locally on the device (no server/backend code present).
- The presence of an `android/` folder indicates a native Android wrapper, and the rest of the UI/routes live under `src/` using Expo Router’s file-based routing.

##### File structure
Top-level:
- android/          ← Native Android project (Gradle, manifests, native code)
- app.json          ← Expo configuration
- package.json      ← JS dependencies & scripts
- babel.config.js   ← JS transpilation rules
- metro.config.js   ← bundler config for React Native
- src/              ← Application source
– app/            ← Screens & routes (file-based, e.g. `index.tsx`, `[id].tsx`, `_layout.tsx`)
– components/     ← Reusable UI components (Buttons, Forms, Grids, etc.)
– interfaces/     ← TypeScript interfaces (IItem, IItemPrices, etc.)
– services/       ← Business logic & persistence (items-storage.ts)
- assets/, public/  ← Static assets (images, screenshots)
- config files: tsconfig.json, tailwind.config.js, eslint.config.js

##### README
- Confirms Expo-based React Native project

##### Final reminder
- Be detailed: break down each layer into its subcomponents (e.g., list out `src/app`, `src/components`, `items-storage.ts`)
- Essential elements: file-based routing, service abstraction, native bridge, local storage
- Do not overpopulate with trivial files—focus on architectural boundaries and data flows

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Device Layer
    subgraph "Device Layer"
        MD["Mobile Device (iOS & Android)"]:::native
        EXPO["Expo Go / Standalone App"]:::native
    end

    MD -->|runs on| EXPO

    %% Application Layer
    subgraph "Application Layer"
        direction TB

        subgraph "Presentation Layer (UI & Navigation)"
            direction TB
            SCREENS["UI / Screens (src/app/)"]:::presentation
            COMPONENTS["Reusable UI Components (src/components/)"]:::presentation
        end

        subgraph "Business Logic (Services)"
            direction TB
            SERVICE["Items Storage Service\n(src/services/items-storage.ts)"]:::business
        end

        subgraph "Data Models"
            direction TB
            MODELS["TypeScript Interfaces (src/interfaces/)"]:::data
        end

        subgraph "Local Storage"
            direction TB
            STORAGE["AsyncStorage (Local)"]:::data
        end
    end

    %% Native Bridge & Modules
    subgraph "Native Bridge & Modules"
        RNBRIDGE["React Native Bridge"]:::native
        ANDROID["Native Android Project\n(android/)"]:::native
        MA["MainActivity.kt"]:::native
        MAPPL["MainApplication.kt"]:::native
    end

    %% Build & Toolchain
    subgraph "Build & Toolchain"
        direction TB
        METRO["Metro Bundler\n(metro.config.js)"]:::toolchain
        BABEL["Babel\n(babel.config.js)"]:::toolchain
        GRADLE["Gradle\n(android/*.gradle)"]:::toolchain
        NPM["NPM/Yarn Scripts & Dependencies\n(package.json)"]:::toolchain
        TS["TypeScript Config\n(tsconfig.json)"]:::toolchain
    end

    %% Other configs
    APPJSON["Expo Config\n(app.json)"]:::toolchain
    TAILWIND["Tailwind Config\n(tailwind.config.js)"]:::toolchain
    ESLINT["ESLint Config\n(eslint.config.js)"]:::toolchain

    %% Connections
    EXPO -->|"loads JS bundle"| SCREENS
    EXPO --> SCREENS
    EXPO --> COMPONENTS
    SCREENS -->|invokes| SERVICE
    COMPONENTS -->|uses| SERVICE
    SERVICE -->|reads/writes| STORAGE
    SERVICE -->|uses| MODELS

    SCREENS -->|imports| MODELS

    SCREENS -->|JS calls| RNBRIDGE
    COMPONENTS -->|JS calls| RNBRIDGE
    SERVICE -->|JS calls| RNBRIDGE

    RNBRIDGE --> ANDROID
    ANDROID --> MA
    ANDROID --> MAPPL

    METRO --> EXPO
    BABEL --> EXPO
    NPM --> EXPO
    TS --> EXPO
    APPJSON --> EXPO
    TAILWIND --> EXPO
    ESLINT --> EXPO

    %% Click Events
    click ANDROID "https://github.com/lucaswithboots/price_track_app/tree/master/android/"
    click MA "https://github.com/lucaswithboots/price_track_app/blob/master/android/app/src/main/java/com/luwucaz/price_track_app/MainActivity.kt"
    click MAPPL "https://github.com/lucaswithboots/price_track_app/blob/master/android/app/src/main/java/com/luwucaz/price_track_app/MainApplication.kt"
    click APPJSON "https://github.com/lucaswithboots/price_track_app/blob/master/app.json"
    click METRO "https://github.com/lucaswithboots/price_track_app/blob/master/metro.config.js"
    click BABEL "https://github.com/lucaswithboots/price_track_app/blob/master/babel.config.js"
    click NPM "https://github.com/lucaswithboots/price_track_app/blob/master/package.json"
    click TS "https://github.com/lucaswithboots/price_track_app/blob/master/tsconfig.json"
    click SCREENS "https://github.com/lucaswithboots/price_track_app/tree/master/src/app/"
    click SCREENS "https://github.com/lucaswithboots/price_track_app/blob/master/src/app/_layout.tsx"
    click SCREENS "https://github.com/lucaswithboots/price_track_app/blob/master/src/app/index.tsx"
    click SCREENS "https://github.com/lucaswithboots/price_track_app/blob/master/src/app/AddItem/index.tsx"
    click SCREENS "https://github.com/lucaswithboots/price_track_app/blob/master/src/app/ListItems/index.tsx"
    click SCREENS "https://github.com/lucaswithboots/price_track_app/blob/master/src/app/ListItems/[id].tsx"
    click COMPONENTS "https://github.com/lucaswithboots/price_track_app/tree/master/src/components/"
    click COMPONENTS "https://github.com/lucaswithboots/price_track_app/blob/master/src/components/AddItem/ButtonPrimary.tsx"
    click COMPONENTS "https://github.com/lucaswithboots/price_track_app/blob/master/src/components/AddItem/ButtonSecondary.tsx"
    click COMPONENTS "https://github.com/lucaswithboots/price_track_app/blob/master/src/components/AddItem/FormsTextInput.tsx"
    click COMPONENTS "https://github.com/lucaswithboots/price_track_app/blob/master/src/components/ListItems/Item.tsx"
    click COMPONENTS "https://github.com/lucaswithboots/price_track_app/blob/master/src/components/home/MenuButton.tsx"
    click COMPONENTS "https://github.com/lucaswithboots/price_track_app/blob/master/src/components/home/MenuSelectionBar.tsx"
    click COMPONENTS "https://github.com/lucaswithboots/price_track_app/blob/master/src/components/home/SearchInput.tsx"
    click COMPONENTS "https://github.com/lucaswithboots/price_track_app/blob/master/src/components/layout/BackgroundGradient.tsx"
    click COMPONENTS "https://github.com/lucaswithboots/price_track_app/blob/master/src/components/layout/RegularGrid.tsx"
    click SERVICE "https://github.com/lucaswithboots/price_track_app/blob/master/src/services/items-storage.ts"
    click MODELS "https://github.com/lucaswithboots/price_track_app/tree/master/src/interfaces/"
    click MODELS "https://github.com/lucaswithboots/price_track_app/blob/master/src/interfaces/IItem/IItem.ts"
    click MODELS "https://github.com/lucaswithboots/price_track_app/blob/master/src/interfaces/IItem/IItemPrices.ts"
    click MODELS "https://github.com/lucaswithboots/price_track_app/blob/master/src/interfaces/IMenuSelectionBar/IMenuSelectionBarItem.ts"
    click APPJSON "https://github.com/lucaswithboots/price_track_app/blob/master/app.json"
    click TAILWIND "https://github.com/lucaswithboots/price_track_app/blob/master/tailwind.config.js"
    click ESLINT "https://github.com/lucaswithboots/price_track_app/blob/master/eslint.config.js"

    %% Styles
    classDef presentation fill:#D0E8FF,stroke:#0B71EB,color:#000
    classDef data fill:#DBFFD6,stroke:#28A828,color:#000
    classDef business fill:#F5D0FF,stroke:#A128A8,color:#000
    classDef native fill:#FFE4B3,stroke:#E08A00,color:#000
    classDef toolchain fill:#E0E0E0,stroke:#666,color:#000
```
