# darkwaqar/pet-adoption-clone architecture

> Architecture diagram of the GitHub repository darkwaqar/pet-adoption-clone, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-04-28). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/darkwaqar/pet-adoption-clone
- Repository: https://github.com/darkwaqar/pet-adoption-clone

## Overview

##### Project type and purpose
- This is a front-end mobile (and web) application built with React Native / Expo in TypeScript.
- It’s a “Real Estate Clone” intended to display a landing page, a home listings screen, property details, and a user profile, with drawer- and stack-based navigation.

##### File structure
- Entry points:
- index.js – Expo’s bootstrap for native & web
- App.tsx – root component, wraps NavigationContainer
- Configuration:
- app.json – Expo manifest
- babel.config.js – includes Reanimated plugin
- tsconfig.json – TypeScript compiler settings
- metro.config.js – Metro bundler settings
- Navigation layer:
- navigation/DrawerNavigator.tsx
- navigation/StackNavigator.tsx
- UI screens:
- screens/HomeScreen.tsx
- screens/DetailsScreen.tsx
- screens/ProfileScreen.tsx
- Reusable components:
- components/CustomDrawerContent.tsx
- components/DrawerScreenContainer.tsx
- Static resources and data:
- constants/pets.js – mock data for listings
- Package manifests:
- package.json / package-lock.json – dependencies and scripts

##### README for additional insights
- Uses Expo template for blank TypeScript
- Adds web support via react-native-web
- Employs React Navigation (native, stack, drawer, bottom-tabs)
- Integrates gesture-handler, react-native-screens, safe-area-context
- Uses react-native-reanimated with a Babel plugin
- No backend code is present—data is mocked in constants/pets.js

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Runtime & Build Tools
    subgraph "Build & Tooling"
        Babel["babel.config.js"]:::build
        Metro["metro.config.js"]:::build
        TSConfig["tsconfig.json"]:::build
        PackageJSON["package.json"]:::build
        PackageLock["package-lock.json"]:::build
    end

    %% Expo Host
    subgraph "Expo Host"
        Index["index.js"]:::runtime
        AppJSON["app.json"]:::runtime
    end

    %% App Shell
    subgraph "App Shell"
        App["App.tsx"]:::shell
    end

    %% Navigation Layer
    subgraph "Navigation Layer"
        DrawerNav["DrawerNavigator"]:::nav
        StackNav["StackNavigator"]:::nav
    end

    %% Presentation Layer
    subgraph "Presentation Layer"
        subgraph "Screens"
            Home["HomeScreen"]:::screen
            Details["DetailsScreen"]:::screen
            Profile["ProfileScreen"]:::screen
        end
        subgraph "Shared Components"
            CustomDrawer["CustomDrawerContent"]:::component
            DrawerContainer["DrawerScreenContainer"]:::component
        end
    end

    %% Data & Config
    subgraph "Data / Constants"
        Pets["constants/pets.js"]:::data
        Colors["constants/colors.js"]:::data
    end

    %% Static Assets
    StaticAssets["assets/"]:::assets

    %% Connections
    Babel --> Index
    Metro --> Index
    TSConfig --> Index
    PackageJSON --> Index
    PackageLock --> Index

    Index --> App
    AppJSON --> Index

    App --> DrawerNav
    DrawerNav --> StackNav

    StackNav --> Home
    StackNav --> Details
    StackNav --> Profile

    DrawerNav --> CustomDrawer
    DrawerNav --> DrawerContainer

    Home --> Pets
    Details --> Pets
    Profile --> Pets

    Home --> Colors
    Details --> Colors
    Profile --> Colors

    Home --> StaticAssets
    Details --> StaticAssets
    Profile --> StaticAssets

    %% Click Events
    click Babel "https://github.com/darkwaqar/pet-adoption-clone/blob/main/babel.config.js"
    click Metro "https://github.com/darkwaqar/pet-adoption-clone/blob/main/metro.config.js"
    click TSConfig "https://github.com/darkwaqar/pet-adoption-clone/blob/main/tsconfig.json"
    click PackageJSON "https://github.com/darkwaqar/pet-adoption-clone/blob/main/package.json"
    click PackageLock "https://github.com/darkwaqar/pet-adoption-clone/blob/main/package-lock.json"
    click Index "https://github.com/darkwaqar/pet-adoption-clone/blob/main/index.js"
    click AppJSON "https://github.com/darkwaqar/pet-adoption-clone/blob/main/app.json"
    click App "https://github.com/darkwaqar/pet-adoption-clone/blob/main/App.tsx"
    click DrawerNav "https://github.com/darkwaqar/pet-adoption-clone/blob/main/navigation/DrawerNavigator.tsx"
    click StackNav "https://github.com/darkwaqar/pet-adoption-clone/blob/main/navigation/StackNavigator.tsx"
    click Home "https://github.com/darkwaqar/pet-adoption-clone/blob/main/screens/HomeScreen.tsx"
    click Details "https://github.com/darkwaqar/pet-adoption-clone/blob/main/screens/DetailsScreen.tsx"
    click Profile "https://github.com/darkwaqar/pet-adoption-clone/blob/main/screens/ProfileScreen.tsx"
    click CustomDrawer "https://github.com/darkwaqar/pet-adoption-clone/blob/main/components/CustomDrawerContent.tsx"
    click DrawerContainer "https://github.com/darkwaqar/pet-adoption-clone/blob/main/components/DrawerScreenContainer.tsx"
    click Pets "https://github.com/darkwaqar/pet-adoption-clone/blob/main/constants/pets.js"
    click Colors "https://github.com/darkwaqar/pet-adoption-clone/blob/main/constants/colors.js"
    click StaticAssets "https://github.com/darkwaqar/pet-adoption-clone/tree/main/assets/"

    %% Styles
    classDef runtime fill:#D3D3D3,stroke:#333,stroke-width:1px
    classDef build fill:#A9A9A9,stroke:#333,stroke-width:1px
    classDef shell fill:#D8BFD8,stroke:#333,stroke-width:1px
    classDef nav fill:#ADD8E6,stroke:#333,stroke-width:1px
    classDef screen fill:#90EE90,stroke:#333,stroke-width:1px
    classDef component fill:#98FB98,stroke:#333,stroke-width:1px
    classDef data fill:#FFA500,stroke:#333,stroke-width:1px
    classDef assets fill:#DEB887,stroke:#333,stroke-width:1px
```
