# prakasitj/we-are-the-world architecture

> Architecture diagram of the GitHub repository prakasitj/we-are-the-world, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-06-03). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/prakasitj/we-are-the-world
- Repository: https://github.com/prakasitj/we-are-the-world

## Overview

##### Project type and purpose
- This is a React-Native “universal” mobile app built with Expo (iOS, Android, Web) using file-based routing.
- Purpose: a client‐side mobile UI with multiple tabs (“explore”, “map”, etc.), theming, and custom components — no backend code included.

##### File structure
- Top-level:
- app/ – all screens, layouts, file-based router
- components/ – reusable UI building blocks (Collapsible, ParallaxScrollView, ThemedText, etc.)
- assets/ – fonts, images
- configuration: metro.config.js, babel.config.js, tailwind.config.js, tsconfig.json, app.json
- scripts/reset-project.js for scaffolding
- Patterns:
- Expo file-based routing under app/(tabs)
- Theming via nativewind + custom hooks
- Unit tests under components/__tests__

##### README for additional insights
- Confirms Expo “create-expo-app” starter
- Uses file-based routing
- No mention of backend or external APIs—focus is on client UI and local logic

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Build & Bundling
    subgraph "Build & Bundling" 
        direction TB
        Babel["Babel Config"]:::build
        Metro["Metro Bundler"]:::build
        TailwindCfg["Tailwind Config"]:::build
    end

    %% Runtime Configuration
    subgraph "Runtime Configuration"
        direction TB
        AppJson["app.json"]:::runtime
        RNConfig["react-native.config.js"]:::runtime
        TSConfig["tsconfig.json"]:::runtime
        NativewindEnv["nativewind-env.d.ts"]:::runtime
    end

    %% App Code
    subgraph "App Code"
        direction TB

        subgraph "Routing & Navigation"
            direction TB
            RouterLayout["_layout.tsx"]:::app
            NotFound["+not-found.tsx"]:::app
            TabsLayout["(tabs)/_layout.tsx"]:::app
            TabsIndex["(tabs)/index.tsx"]:::app
            Explore["(tabs)/explore.tsx"]:::app
            Map["(tabs)/map.tsx"]:::app
            TailwindEntry["(tabs)/tailwind.tsx"]:::app
            FontsApp["fonts.tsx"]:::app
            TailwindCSS["tailwind.css"]:::app
        end

        subgraph "Theming Layer"
            direction TB
            Colors["constants/Colors.ts"]:::app
            UseCS["hooks/useColorScheme.ts"]:::app
            UseCSWeb["hooks/useColorScheme.web.ts"]:::app
            UseThemeColor["hooks/useThemeColor.ts"]:::app
        end

        subgraph "UI Component Library"
            direction TB
            Collapsible["components/Collapsible.tsx"]:::app
            ExternalLink["components/ExternalLink.tsx"]:::app
            HapticTab["components/HapticTab.tsx"]:::app
            HelloWave["components/HelloWave.tsx"]:::app
            Parallax["components/ParallaxScrollView.tsx"]:::app
            ThemedText["components/ThemedText.tsx"]:::app
            ThemedView["components/ThemedView.tsx"]:::app
            IconSymbol["components/ui/IconSymbol.tsx"]:::app
            IconSymbolIOs["components/ui/IconSymbol.ios.tsx"]:::app
            TabBarBG["components/ui/TabBarBackground.tsx"]:::app
            TabBarBGIOs["components/ui/TabBarBackground.ios.tsx"]:::app
        end

        subgraph "Static Assets"
            direction TB
            AssetsFonts["assets/fonts/"]:::assets
            AssetsImages["assets/images/"]:::assets
        end

        subgraph "Utility Scripts"
            direction TB
            ScriptReset["scripts/reset-project.js"]:::utils
        end

        subgraph "Unit Tests"
            direction TB
            Test1["components/__tests__/ThemedText-test.tsx"]:::tests
            TestSnap["components/__tests__/__snapshots__/ThemedText-test.tsx.snap"]:::tests
        end
    end

    %% Runtime Layers
    subgraph "Runtime Execution"
        direction TB
        ExpoRuntime["Expo Runtime"]:::runtime
        JSEngine["JS Engine\n(Hermes/JSC)"]:::runtime
        NativeBridge["Native Bridge"]:::runtime
    end

    %% Connections
    Babel --> Metro
    TailwindCfg --> Metro
    AppJson --> Metro
    RNConfig --> Metro
    TSConfig --> Metro
    NativewindEnv --> Metro

    Metro -->|"bundles JS" | ExpoRuntime
    ExpoRuntime --> JSEngine
    JSEngine --> NativeBridge

    %% App Code to Build
    RouterLayout --> Metro
    NotFound --> Metro
    TabsLayout --> Metro
    TabsIndex --> Metro
    Explore --> Metro
    Map --> Metro
    TailwindEntry --> Metro
    FontsApp --> Metro
    TailwindCSS --> Metro
    Colors --> Metro
    UseCS --> Metro
    UseCSWeb --> Metro
    UseThemeColor --> Metro
    Collapsible --> Metro
    ExternalLink --> Metro
    HapticTab --> Metro
    HelloWave --> Metro
    Parallax --> Metro
    ThemedText --> Metro
    ThemedView --> Metro
    IconSymbol --> Metro
    IconSymbolIOs --> Metro
    TabBarBG --> Metro
    TabBarBGIOs --> Metro
    AssetsFonts --> Metro
    AssetsImages --> Metro

    %% Theming to UI components
    Colors --> ThemedText
    UseCS --> ThemedText
    UseThemeColor --> ThemedText
    Colors --> ThemedView
    UseCS --> ThemedView
    UseThemeColor --> ThemedView

    %% Assets to UI
    AssetsFonts --> ThemedText
    AssetsImages --> HelloWave

    %% Tests coverage
    Test1 --> ThemedText
    TestSnap --> Test1

    %% Click events
    click Babel "https://github.com/prakasitj/we-are-the-world/blob/main/babel.config.js"
    click Metro "https://github.com/prakasitj/we-are-the-world/blob/main/metro.config.js"
    click TailwindCfg "https://github.com/prakasitj/we-are-the-world/blob/main/tailwind.config.js"
    click AppJson "https://github.com/prakasitj/we-are-the-world/blob/main/app.json"
    click RNConfig "https://github.com/prakasitj/we-are-the-world/blob/main/react-native.config.js"
    click TSConfig "https://github.com/prakasitj/we-are-the-world/blob/main/tsconfig.json"
    click NativewindEnv "https://github.com/prakasitj/we-are-the-world/blob/main/nativewind-env.d.ts"
    click RouterLayout "https://github.com/prakasitj/we-are-the-world/blob/main/app/_layout.tsx"
    click NotFound "https://github.com/prakasitj/we-are-the-world/blob/main/app/+not-found.tsx"
    click TabsLayout "https://github.com/prakasitj/we-are-the-world/blob/main/app/(tabs)/_layout.tsx"
    click TabsIndex "https://github.com/prakasitj/we-are-the-world/blob/main/app/(tabs)/index.tsx"
    click Explore "https://github.com/prakasitj/we-are-the-world/blob/main/app/(tabs)/explore.tsx"
    click Map "https://github.com/prakasitj/we-are-the-world/blob/main/app/(tabs)/map.tsx"
    click TailwindEntry "https://github.com/prakasitj/we-are-the-world/blob/main/app/(tabs)/tailwind.tsx"
    click FontsApp "https://github.com/prakasitj/we-are-the-world/blob/main/app/fonts.tsx"
    click TailwindCSS "https://github.com/prakasitj/we-are-the-world/blob/main/app/tailwind.css"
    click Colors "https://github.com/prakasitj/we-are-the-world/blob/main/constants/Colors.ts"
    click UseCS "https://github.com/prakasitj/we-are-the-world/blob/main/hooks/useColorScheme.ts"
    click UseCSWeb "https://github.com/prakasitj/we-are-the-world/blob/main/hooks/useColorScheme.web.ts"
    click UseThemeColor "https://github.com/prakasitj/we-are-the-world/blob/main/hooks/useThemeColor.ts"
    click Collapsible "https://github.com/prakasitj/we-are-the-world/blob/main/components/Collapsible.tsx"
    click ExternalLink "https://github.com/prakasitj/we-are-the-world/blob/main/components/ExternalLink.tsx"
    click HapticTab "https://github.com/prakasitj/we-are-the-world/blob/main/components/HapticTab.tsx"
    click HelloWave "https://github.com/prakasitj/we-are-the-world/blob/main/components/HelloWave.tsx"
    click Parallax "https://github.com/prakasitj/we-are-the-world/blob/main/components/ParallaxScrollView.tsx"
    click ThemedText "https://github.com/prakasitj/we-are-the-world/blob/main/components/ThemedText.tsx"
    click ThemedView "https://github.com/prakasitj/we-are-the-world/blob/main/components/ThemedView.tsx"
    click IconSymbol "https://github.com/prakasitj/we-are-the-world/blob/main/components/ui/IconSymbol.tsx"
    click IconSymbolIOs "https://github.com/prakasitj/we-are-the-world/blob/main/components/ui/IconSymbol.ios.tsx"
    click TabBarBG "https://github.com/prakasitj/we-are-the-world/blob/main/components/ui/TabBarBackground.tsx"
    click TabBarBGIOs "https://github.com/prakasitj/we-are-the-world/blob/main/components/ui/TabBarBackground.ios.tsx"
    click AssetsFonts "https://github.com/prakasitj/we-are-the-world/tree/main/assets/fonts/"
    click AssetsImages "https://github.com/prakasitj/we-are-the-world/tree/main/assets/images/"
    click ScriptReset "https://github.com/prakasitj/we-are-the-world/blob/main/scripts/reset-project.js"
    click Test1 "https://github.com/prakasitj/we-are-the-world/blob/main/components/__tests__/ThemedText-test.tsx"
    click TestSnap "https://github.com/prakasitj/we-are-the-world/blob/main/components/__tests__/__snapshots__/ThemedText-test.tsx.snap"

    %% Styles
    classDef build fill:#dddddd,stroke:#333,stroke-width:1px
    classDef runtime fill:#aaccff,stroke:#333,stroke-width:1px
    classDef app fill:#ccffcc,stroke:#333,stroke-width:1px
    classDef assets fill:#ffcc99,stroke:#333,stroke-width:1px
    classDef utils fill:#ffdddd,stroke:#333,stroke-width:1px
    classDef tests fill:#ffe6e6,stroke:#333,stroke-width:1px
```
