# forgedevbros/tracknest-mobile architecture

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

- Interactive diagram: https://gitdiagram.com/forgedevbros/tracknest-mobile
- Repository: https://github.com/forgedevbros/tracknest-mobile

## Overview

##### Main Application Components

A. Client Layer (Frontend)
- Inside this container, create sub-sections for:
- Navigation System (based on the (tabs) directory)
- Core Features (expenses, explore, pennyChat)
- Authentication Flows
- Settings Management
- UI Components Library

B. State Management & Business Logic Layer (Middle)
- Hooks Management (useColorScheme, useStorageState)
- Utils & Helpers section

C. Backend Services Layer (Bottom)
- Supabase Integration (shown by lib/supabase.ts)

##### Detailed Breakdown

a. Authentication Module
- ┌─ Auth Flow ─────┐
- Login         │
- Signup        │
- Security      │
- ┘

b. Main Features
- ┌─ Core Features ──┐
- Expenses      │
- Explore       │
- PennyChat     │
- ┘

c. Settings & Account
- ┌─ User Management ┐
- Profile       │
- Notifications │
- Help Center   │
- ┘

##### Technical Stack Indicators
- Expo Framework
- React Native
- Supabase
- TypeScript
- File-based Routing

##### Cross-Cutting Concerns
Horizontal layers for:
- Styles
- Component Library
- Testing Infrastructure

## Diagram (Mermaid)

```mermaid
flowchart TB
    subgraph Client["Client Layer"]
        direction TB
        Nav["Navigation System"]
        
        subgraph Features["Core Features"]
            direction TB
            Expenses["Expenses"]
            Explore["Explore"]
            PennyChat["PennyChat"]
        end

        subgraph Auth["Authentication"]
            direction TB
            Login["Login"]
            Signup["Signup"]
            Security["Security"]
        end

        subgraph Settings["Settings & Account"]
            direction TB
            Profile["Profile"]
            Notif["Notifications"]
            Help["Help Center"]
            Contact["Contact"]
        end

        subgraph UI["UI Components"]
            direction TB
            Base["Base Components"]
            Themed["Themed Components"]
            Platform["Platform Specific"]
        end
    end

    subgraph Logic["State Management & Business Logic"]
        direction TB
        AuthContext["Auth Context"]
        ColorScheme["Color Scheme"]
        StorageState["Storage State"]
        ThemeColor["Theme Color"]
    end

    subgraph Backend["Backend Services"]
        direction TB
        Supabase["Supabase Client"]
    end

    %% Relationships
    Nav --> Features
    Features --> Logic
    Auth --> AuthContext
    Settings --> Logic
    UI --> Logic
    Logic --> Supabase
    
    %% Click events
    click Nav "https://github.com/ForgeDevBros/tracknest-mobile/blob/main/app/(tabs)/_layout.tsx"
    click Expenses "https://github.com/ForgeDevBros/tracknest-mobile/blob/main/app/(tabs)/expenses.tsx"
    click Explore "https://github.com/ForgeDevBros/tracknest-mobile/blob/main/app/(tabs)/explore.tsx"
    click PennyChat "https://github.com/ForgeDevBros/tracknest-mobile/blob/main/app/(tabs)/pennyChat.tsx"
    click Login "https://github.com/ForgeDevBros/tracknest-mobile/blob/main/app/auth/login.tsx"
    click Signup "https://github.com/ForgeDevBros/tracknest-mobile/blob/main/app/auth/signup.tsx"
    click Security "https://github.com/ForgeDevBros/tracknest-mobile/blob/main/app/settings/security.tsx"
    click Profile "https://github.com/ForgeDevBros/tracknest-mobile/blob/main/app/settings/edit-profile.tsx"
    click Notif "https://github.com/ForgeDevBros/tracknest-mobile/blob/main/app/settings/notification.tsx"
    click Help "https://github.com/ForgeDevBros/tracknest-mobile/blob/main/app/settings/help-center.tsx"
    click Contact "https://github.com/ForgeDevBros/tracknest-mobile/blob/main/app/settings/contact-us.tsx"
    click Base "https://github.com/ForgeDevBros/tracknest-mobile/tree/main/components/ui/"
    click Themed "https://github.com/ForgeDevBros/tracknest-mobile/blob/main/components/ThemedText.tsx"
    click Platform "https://github.com/ForgeDevBros/tracknest-mobile/blob/main/components/ui/IconSymbol.ios.tsx"
    click AuthContext "https://github.com/ForgeDevBros/tracknest-mobile/blob/main/context/AuthContext.tsx"
    click ColorScheme "https://github.com/ForgeDevBros/tracknest-mobile/blob/main/hooks/useColorScheme.ts"
    click StorageState "https://github.com/ForgeDevBros/tracknest-mobile/blob/main/hooks/useStorageState.tsx"
    click ThemeColor "https://github.com/ForgeDevBros/tracknest-mobile/blob/main/hooks/useThemeColor.ts"
    click Supabase "https://github.com/ForgeDevBros/tracknest-mobile/blob/main/lib/supabase.ts"

    %% Styling
    classDef frontend fill:#a8d1ff,stroke:#333
    classDef logic fill:#ffd7a8,stroke:#333
    classDef backend fill:#c9a8ff,stroke:#333
    
    class Nav,Features,Auth,Settings,UI frontend
    class Logic,AuthContext,ColorScheme,StorageState,ThemeColor logic
    class Backend,Supabase backend
```
