# nexthrive/nexademyv2mobile architecture

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

- Interactive diagram: https://gitdiagram.com/nexthrive/nexademyv2mobile
- Repository: https://github.com/nexthrive/nexademyv2mobile

## Overview

##### Detailed Component Breakdown

Create sub-sections showing:

a) Navigation Flow:
- Relationships between:
- Main tabs (index.tsx, explore.tsx, etc.)
- Layout components (_layout.tsx)
- Error handling (+not-found.tsx)

b) Component Architecture:
- Components by type:
- Core UI Components (ThemedText, ThemedView)
- Interactive Components (HapticTab, Collapsible)
- Platform-Specific Components (IconSymbol.ios.tsx vs IconSymbol.tsx)

##### Cross-Cutting Concerns

Separate sections for:

a) Styling & Theming:
- Relationship between:
- TailwindCSS configuration
- Theme hooks (useThemeColor, useColorScheme)

b) Context & State Management:
- AuthContext and its scope
- Hook system integration

##### Important Relationships to Highlight

- How the AuthContext provides authentication state to the app
- How the tab navigation integrates with the file-based routing
- Platform-specific component variations (iOS vs Android)

##### Technical Details

Annotations for:
- Expo framework integration
- TailwindCSS/NativeWind styling system
- React Native foundation
- File-based routing system
- Platform-specific implementations

##### Development Workflow

A small section showing:
- Development environment setup
- Build process
- Development tools integration

- Component relationships
- Data flow
- Authentication flow
- Theme system integration
- Platform-specific considerations

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph Client["Mobile Application"]
        direction TB
        
        subgraph Nav["Navigation Layer"]
            direction TB
            Layout["Tab Layout"]:::nav
            Routes["Tab Routes"]:::nav
            Error["Error Handler"]:::nav
            Layout --> Routes
            Layout --> Error
        end

        subgraph Core["Core Architecture"]
            direction TB
            Auth["Authentication Context"]:::auth
            Theme["Theme System"]:::theme
            Router["File-based Router"]:::system
            CompLib["Component Library"]:::ui
        end

        subgraph Components["Component Architecture"]
            direction TB
            
            subgraph UI["Core UI"]
                direction TB
                TText["ThemedText"]:::ui
                TView["ThemedView"]:::ui
            end
            
            subgraph Interactive["Interactive Components"]
                direction TB
                HTab["HapticTab"]:::ui
                Collapse["Collapsible"]:::ui
                Parallax["ParallaxScrollView"]:::ui
            end
            
            subgraph Platform["Platform-Specific"]
                direction TB
                IconIOS["IconSymbol.ios"]:::platform
                IconBase["IconSymbol"]:::platform
                TabBgIOS["TabBarBackground.ios"]:::platform
                TabBgBase["TabBarBackground"]:::platform
            end
        end

        subgraph Style["Styling & Theming"]
            direction TB
            Colors["Color System"]:::theme
            TWConfig["Tailwind Config"]:::config
            ThemeHook["Theme Hooks"]:::theme
        end

        subgraph State["State Management"]
            direction TB
            AuthContext["Auth Context"]:::auth
            Login["Login Screen"]:::ui
        end

        RootLayout["Root Layout"]:::system
    end

    %% Relationships
    Auth --> State
    Theme --> Style
    Style --> Components
    Core --> Nav
    State --> Components
    RootLayout --> Nav

    %% Click Events
    click Layout "https://github.com/Nexthrive/NexademyV2MOBILE/blob/main/app/(tabs)/_layout.tsx"
    click Routes "https://github.com/Nexthrive/NexademyV2MOBILE/tree/main/app/(tabs)"
    click Error "https://github.com/Nexthrive/NexademyV2MOBILE/blob/main/app/+not-found.tsx"
    click Auth "https://github.com/Nexthrive/NexademyV2MOBILE/blob/main/context/AuthContext.tsx"
    click Theme "https://github.com/Nexthrive/NexademyV2MOBILE/blob/main/constants/Colors.ts"
    click ThemeHook "https://github.com/Nexthrive/NexademyV2MOBILE/blob/main/hooks/useThemeColor.ts"
    click TText "https://github.com/Nexthrive/NexademyV2MOBILE/blob/main/components/ThemedText.tsx"
    click TView "https://github.com/Nexthrive/NexademyV2MOBILE/blob/main/components/ThemedView.tsx"
    click HTab "https://github.com/Nexthrive/NexademyV2MOBILE/blob/main/components/HapticTab.tsx"
    click Collapse "https://github.com/Nexthrive/NexademyV2MOBILE/blob/main/components/Collapsible.tsx"
    click Parallax "https://github.com/Nexthrive/NexademyV2MOBILE/blob/main/components/ParallaxScrollView.tsx"
    click IconIOS "https://github.com/Nexthrive/NexademyV2MOBILE/blob/main/components/ui/IconSymbol.ios.tsx"
    click IconBase "https://github.com/Nexthrive/NexademyV2MOBILE/blob/main/components/ui/IconSymbol.tsx"
    click TabBgIOS "https://github.com/Nexthrive/NexademyV2MOBILE/blob/main/components/ui/TabBarBackground.ios.tsx"
    click TabBgBase "https://github.com/Nexthrive/NexademyV2MOBILE/blob/main/components/ui/TabBarBackground.tsx"
    click Login "https://github.com/Nexthrive/NexademyV2MOBILE/blob/main/components/LoginScreen.tsx"
    click TWConfig "https://github.com/Nexthrive/NexademyV2MOBILE/blob/main/tailwind.config.js"
    click RootLayout "https://github.com/Nexthrive/NexademyV2MOBILE/blob/main/app/_layout.tsx"

    %% Styles
    classDef nav fill:#2196F3,color:white
    classDef auth fill:#FFC107,color:black
    classDef theme fill:#9C27B0,color:white
    classDef ui fill:#4CAF50,color:white
    classDef system fill:#607D8B,color:white
    classDef platform fill:#FF5722,color:white
    classDef config fill:#795548,color:white
```
