# balumuriraj/limbo architecture

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

- Interactive diagram: https://gitdiagram.com/balumuriraj/limbo
- Repository: https://github.com/balumuriraj/limbo

## Overview

##### Project Type and Purpose
- This project is a React Native mobile application supporting both Android and iOS. The presence of files like App.tsx, index.js, and directories for both ios and android, together with platform-specific native modules, indicate that the purpose of the project is to provide a mobile app with custom native functionality (for example, Lottie animations via modules such as MyLottieModule).
- The existence of an api directory (with both Firestore and REST endpoints) as well as multiple screens and components suggests that the app interacts with back-end services (likely Firebase as hinted by firebaseUtils.ts) and supports content such as “clips” in different screens like Home, Clip, Create, and Face.

##### Analyzing the File Structure
- Top-Level Components:
– Root files and configuration: App.tsx, index.js, babel.config.js, tsconfig.json, package.json, etc.
– Android and iOS directories: Full native builds for Android (with Gradle scripts, Java code, AndroidManifest.xml) and iOS (with Xcode project files, Podfiles).
– src directory: Contains important subfolders for API integration (both Firestore and REST), UI components (Editor, Menu), screens (Clip, Create, Face, Home), utility functions, and native modules.
- Native Modules:
– There is a dedicated src/nativeModules folder and relevant Java files in the android directory (MyLottieModule, MyLottieManager, MyLottiePackage, etc.) indicating that custom bridging has been implemented to handle Lottie animations through native code.
- Testing:
– __tests__ folder for testing application components.

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Mobile Application
    subgraph "Mobile Application"
        %% React Native UI Layer
        subgraph "React Native UI Layer"
            subgraph "Screens"
                RN_Home["Home Screen"]:::screen
                RN_Clip["Clip Screen"]:::screen
                RN_Create["Create Screen"]:::screen
                RN_Face["Face Screen"]:::screen
            end
            subgraph "Components"
                RN_Editor["Editor Component"]:::component
                RN_Menu["Menu Component"]:::component
            end
        end

        %% API Integration Layer
        subgraph "API Integration Layer"
            API_Firestore["Firestore Endpoint"]:::api
            API_REST["REST Endpoint"]:::api
            API_FirebaseUtils["Firebase Utils"]:::api
        end

        %% Native Module Layer
        subgraph "Native Module Layer"
            JSBridge["Custom Lottie Module (JS Bridge)"]:::native
            subgraph "Android Lottie Implementation"
                Native_Module["MyLottieModule"]:::native
                Native_Manager["MyLottieManager"]:::native
                Native_Package["MyLottiePackage"]:::native
                Native_View["MyLottieView"]:::native
            end
        end

        %% Platform Specific Layers
        subgraph "Platform Specific Layers"
            Android_Platform["Android Platform"]:::platform
            iOS_Platform["iOS Platform"]:::platform
        end

        %% External Services
        subgraph "External Services"
            Firebase_FS["Firebase Firestore"]:::external
        end
    end

    %% Connections between React Native UI Layer and API Integration
    RN_Home -->|"triggers"| API_Firestore
    RN_Home -->|"calls"| JSBridge
    RN_Clip -->|"calls"| API_REST
    RN_Face -->|"utilizes"| API_FirebaseUtils

    %% Connections from Components to Screens (illustrative embedding)
    RN_Editor -->|"embeddedIn"| RN_Home
    RN_Menu -->|"embeddedIn"| RN_Home

    %% API Integration Layer to External Services
    API_Firestore -->|"syncsWith"| Firebase_FS
    API_REST -->|"syncsWith"| Firebase_FS
    API_FirebaseUtils -->|"utilizes"| Firebase_FS

    %% JS Bridge communicates with Android Lottie Native Implementation
    JSBridge -->|"bridgesTo"| Native_Module
    Native_Module -->|"managedBy"| Native_Manager
    Native_Module -->|"packagedBy"| Native_Package
    Native_Module -->|"rendersVia"| Native_View

    %% Android Lottie Implementation runs on Android Platform
    Native_Module -->|"runsOn"| Android_Platform

    %% JS Bridge also binds with iOS Platform
    JSBridge -->|"bindsWith"| iOS_Platform

    %% Click Events for React Native UI Layer (Screens)
    click RN_Home "https://github.com/balumuriraj/limbo/blob/master/src/screens/Home.tsx"
    click RN_Clip "https://github.com/balumuriraj/limbo/blob/master/src/screens/Clip.tsx"
    click RN_Create "https://github.com/balumuriraj/limbo/blob/master/src/screens/Create.tsx"
    click RN_Face "https://github.com/balumuriraj/limbo/blob/master/src/screens/Face.tsx"

    %% Click Events for React Native UI Layer (Components)
    click RN_Editor "https://github.com/balumuriraj/limbo/blob/master/src/components/Editor.tsx"
    click RN_Menu "https://github.com/balumuriraj/limbo/blob/master/src/components/Menu.tsx"

    %% Click Events for API Integration Layer
    click API_Firestore "https://github.com/balumuriraj/limbo/blob/master/src/api/firestore/clips.ts"
    click API_REST "https://github.com/balumuriraj/limbo/blob/master/src/api/rest/clips.ts"
    click API_FirebaseUtils "https://github.com/balumuriraj/limbo/blob/master/src/utils/firebaseUtils.ts"

    %% Click Event for Native Module Layer (JS Bridge)
    click JSBridge "https://github.com/balumuriraj/limbo/blob/master/src/nativeModules/MyLottieModule.ts"

    %% Click Events for Android Lottie Implementation
    click Native_Module "https://github.com/balumuriraj/limbo/blob/master/android/app/src/main/java/com/limbo/MyLottieModule.java"
    click Native_Manager "https://github.com/balumuriraj/limbo/blob/master/android/app/src/main/java/com/limbo/MyLottieManager.java"
    click Native_Package "https://github.com/balumuriraj/limbo/blob/master/android/app/src/main/java/com/limbo/MyLottiePackage.java"
    click Native_View "https://github.com/balumuriraj/limbo/blob/master/android/app/src/main/java/com/limbo/MyLottieView.java"

    %% Click Events for Platform Specific Layers
    click Android_Platform "https://github.com/balumuriraj/limbo/tree/master/android/"
    click iOS_Platform "https://github.com/balumuriraj/limbo/tree/master/ios/"

    %% Styles
    classDef screen fill:#f9c,stroke:#333,stroke-width:2px;
    classDef component fill:#c9f,stroke:#333,stroke-width:2px;
    classDef api fill:#fc9,stroke:#333,stroke-width:2px;
    classDef native fill:#9cf,stroke:#333,stroke-width:2px;
    classDef platform fill:#cf9,stroke:#333,stroke-width:2px;
    classDef external fill:#f99,stroke:#333,stroke-width:2px;
```
