# fabianbeltran96/singapp architecture

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

- Interactive diagram: https://gitdiagram.com/fabianbeltran96/singapp
- Repository: https://github.com/fabianbeltran96/singapp

## Overview

- UI Layer → Navigation Layer → Business Logic → Services Layer

##### Detailed Component Breakdown

a) UI Layer (Components):
- Themed Components (ThemedText, ThemedView)
- UI Elements (IconSymbol, TabBarBackground)
- Custom Components (HelloWave, Collapsible, ParallaxScrollView)
- Input Components (InputField, SignatureModal)

b) Navigation & Routing:
- Tab-based Navigation (/app/(tabs))
- Item Details Navigation (/app/(item-details))
- Root Layout (_layout.tsx)
- Error Handling (+not-found.tsx)

c) Services Layer:
- API Service (api.ts)
- Authentication Service (auth.ts)
- General Services (services.ts)

d) Platform-Specific Implementation:
- Create two parallel containers:
- iOS Implementation
- Android Implementation (showing native modules)

##### Data Flow Visualization

- User interaction flow
- Authentication flow
- API communication flow
- Platform-specific implementations

##### Technical Stack Highlights

- Expo Framework
- React Native
- TypeScript
- Native Platform SDKs

##### Key Design Elements

- Blue: Core application components
- Green: Services and API layers
- Orange: Platform-specific implementations
- Purple: Navigation and routing
- Gray: Supporting utilities and hooks

b) Symbols for:
- External dependencies
- Internal modules
- Platform-specific features
- Shared components

##### Implementation Notes

- Notes for important configuration files (babel.config.js, tsconfig.json)

- File-based routing system
- Component hierarchy
- Service layer architecture
- Platform-specific implementations
- Type system integration

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph "Mobile Application"
        subgraph "UI Layer"
            direction TB
            UI[UI Components]
            
            subgraph "Themed Components"
                TC1[ThemedText]
                TC2[ThemedView]
            end
            
            subgraph "UI Elements"
                UIE1[IconSymbol]
                UIE2[TabBarBackground]
            end
            
            subgraph "Custom Components"
                CC1[HelloWave]
                CC2[Collapsible]
                CC3[ParallaxScrollView]
            end
            
            subgraph "Input Components"
                IC1[InputField]
                IC2[SignatureModal]
            end
        end

        subgraph "Navigation Layer"
            NL[Router]
            TN[Tab Navigation]
            IDN[Item Details Navigation]
            RL[Root Layout]
            EH[Error Handling]
        end

        subgraph "Services Layer"
            API[API Service]
            Auth[Authentication Service]
            GS[General Services]
        end

        subgraph "Platform Implementation"
            direction TB
            subgraph "iOS"
                IOS1[iOS IconSymbol]
                IOS2[iOS TabBarBackground]
            end
            
            subgraph "Android"
                AND[Native Modules]
            end
        end

        subgraph "Supporting Systems"
            TD[Type Definitions]
            TS[Theme System]
            Hooks[Custom Hooks]
        end
    end

    %% Relationships
    UI --> NL
    NL --> API
    NL --> Auth
    API --> GS
    Auth --> GS
    UI --> TS
    TS --> Hooks
    TD --> UI
    TD --> API

    %% Click Events
    click TC1 "https://github.com/FabianBeltran96/singapp/blob/master/components/ThemedText.tsx"
    click TC2 "https://github.com/FabianBeltran96/singapp/blob/master/components/ThemedView.tsx"
    click UIE1 "https://github.com/FabianBeltran96/singapp/blob/master/components/ui/IconSymbol.tsx"
    click UIE2 "https://github.com/FabianBeltran96/singapp/blob/master/components/ui/TabBarBackground.tsx"
    click CC1 "https://github.com/FabianBeltran96/singapp/blob/master/components/HelloWave.tsx"
    click CC2 "https://github.com/FabianBeltran96/singapp/blob/master/components/Collapsible.tsx"
    click CC3 "https://github.com/FabianBeltran96/singapp/blob/master/components/ParallaxScrollView.tsx"
    click IC1 "https://github.com/FabianBeltran96/singapp/blob/master/src/components/InputField.tsx"
    click IC2 "https://github.com/FabianBeltran96/singapp/blob/master/src/components/SignatureModal.tsx"
    click TN "https://github.com/FabianBeltran96/singapp/blob/master/app/(tabs)/_layout.tsx"
    click IDN "https://github.com/FabianBeltran96/singapp/blob/master/app/(item-details)/_layout.tsx"
    click RL "https://github.com/FabianBeltran96/singapp/blob/master/app/_layout.tsx"
    click EH "https://github.com/FabianBeltran96/singapp/blob/master/app/+not-found.tsx"
    click API "https://github.com/FabianBeltran96/singapp/blob/master/src/services/api.ts"
    click Auth "https://github.com/FabianBeltran96/singapp/blob/master/src/services/auth.ts"
    click GS "https://github.com/FabianBeltran96/singapp/blob/master/src/services/services.ts"
    click IOS1 "https://github.com/FabianBeltran96/singapp/blob/master/components/ui/IconSymbol.ios.tsx"
    click IOS2 "https://github.com/FabianBeltran96/singapp/blob/master/components/ui/TabBarBackground.ios.tsx"
    click AND "https://github.com/FabianBeltran96/singapp/tree/master/android/app/src/main/java/fabianbeltran/SingApp"
    click TD "https://github.com/FabianBeltran96/singapp/tree/master/src/types"
    click Hooks "https://github.com/FabianBeltran96/singapp/tree/master/hooks"

    %% Styling
    classDef default fill:#f9f9f9,stroke:#333,stroke-width:2px
    classDef service fill:#90EE90,stroke:#333
    classDef ui fill:#ADD8E6,stroke:#333
    classDef nav fill:#DDA0DD,stroke:#333
    classDef platform fill:#FFA07A,stroke:#333
    classDef support fill:#D3D3D3,stroke:#333

    class API,Auth,GS service
    class UI,TC1,TC2,UIE1,UIE2,CC1,CC2,CC3,IC1,IC2 ui
    class NL,TN,IDN,RL,EH nav
    class IOS1,IOS2,AND platform
    class TD,TS,Hooks support
```
