# meetahmed/secure-todos-list-app-react-native architecture

> Architecture diagram of the GitHub repository meetahmed/secure-todos-list-app-react-native, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-08-02). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/meetahmed/secure-todos-list-app-react-native
- Repository: https://github.com/meetahmed/secure-todos-list-app-react-native

## Overview

##### Project type and purpose
- This is a React Native CLI (bare) mobile application for iOS and Android.
- Purpose: an offline-first, secure Todo app. It manages todos in local SQLite storage and uses device biometrics (Face ID / Touch ID) for authentication.

##### File structure
- Top-level native folders: “android/…” and “ios/…”, plus React Native entry points App.tsx and index.js.
- “src/” folder is the entire core logic, subdivided into:
– data: LocalDatabase.ts and data models (TodoModel)
– navigation: RootNavigator (React Navigation stack)
– redux: Redux Toolkit store and slices (authSlice, todoSlice)
– screens: individual screen components (AuthScreen, SplashScreen, TodoListScreen, TodoDetailScreen) and shared UI components (FloatingButton, PrimaryButton, etc.)
- Config and build scripts: Babel, Metro, Jest config, Android Gradle files, iOS Xcode projects, etc.

##### README for additional insights
- Technologies: React Navigation, Redux Toolkit, SQLite via react-native-sqlite-storage, Expo Local Authentication for biometrics, Jest for unit tests.
- Features: CRUD on todos, biometric auth, offline persistence, navigation between screens.

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph "Mobile App Container"
        App["App.tsx"]:::container
        Index["index.js"]:::container
        Android["android/"]:::container
        iOS["ios/"]:::container
    end

    subgraph "React Native JS Layer"
        subgraph "UI Layer"
            AuthS["AuthScreen"]:::ui
            SplashS["SplashScreen"]:::ui
            TodoListS["TodoListScreen"]:::ui
            TodoDetailS["TodoDetailScreen"]:::ui
            subgraph "Shared Components"
                FB["FloatingButton"]:::ui
                PB["PrimaryButton"]:::ui
                NoTodos["NoTodosView"]:::ui
                SingleTodo["SingleTodoView"]:::ui
            end
        end

        Nav["RootNavigator"]:::navigation

        subgraph "State Management"
            Store["Redux Store"]:::state
            AuthSlice["authSlice"]:::state
            TodoSlice["todoSlice"]:::state
        end

        subgraph "Common Utils & Constants"
            AuthUtils["AuthUtils"]:::utils
            DateFmt["DateFormatter"]:::utils
            Constants["Constants"]:::utils
            Colors["AppColors"]:::utils
        end

        subgraph "Data Layer"
            DB["LocalDatabase"]:::db
            Model["TodoModel"]:::db
        end

        subgraph "Native Modules / Bridges"
            SQLiteMock["react-native-sqlite-storage"]:::native
            ExpoAuth["Expo Local Authentication"]:::native
        end
    end

    %% Data Flow
    App --> Nav
    Nav --> AuthS
    Nav --> SplashS
    Nav --> TodoListS
    Nav --> TodoDetailS

    AuthS -->|dispatch auth actions| Store
    SplashS -->|init load todos| Store
    TodoListS -->|dispatch todo actions| Store
    TodoDetailS -->|dispatch todo actions| Store

    Store --> AuthSlice
    Store --> TodoSlice
    AuthSlice --> Store
    TodoSlice --> Store

    Store -->|persist todos| DB
    DB -->|uses model| Model
    DB -->|SQLite operations| SQLiteMock

    AuthS -->|invoke biometric| ExpoAuth
    ExpoAuth --> AuthUtils
    AuthUtils -->|dispatch auth success| AuthSlice

    %% Click Events
    click App "https://github.com/meetahmed/secure-todos-list-app-react-native/blob/main/App.tsx"
    click Index "https://github.com/meetahmed/secure-todos-list-app-react-native/blob/main/index.js"
    click Android "https://github.com/meetahmed/secure-todos-list-app-react-native/tree/main/android/"
    click iOS "https://github.com/meetahmed/secure-todos-list-app-react-native/tree/main/ios/"
    click AuthS "https://github.com/meetahmed/secure-todos-list-app-react-native/blob/main/src/screens/AuthScreen.tsx"
    click SplashS "https://github.com/meetahmed/secure-todos-list-app-react-native/blob/main/src/screens/SplashScreen.tsx"
    click TodoListS "https://github.com/meetahmed/secure-todos-list-app-react-native/blob/main/src/screens/TodoListScreen.tsx"
    click TodoDetailS "https://github.com/meetahmed/secure-todos-list-app-react-native/blob/main/src/screens/TodoDetailScreen.tsx"
    click FB "https://github.com/meetahmed/secure-todos-list-app-react-native/blob/main/src/screens/components/FloatingButton.tsx"
    click PB "https://github.com/meetahmed/secure-todos-list-app-react-native/blob/main/src/screens/components/PrimaryButton.tsx"
    click NoTodos "https://github.com/meetahmed/secure-todos-list-app-react-native/blob/main/src/screens/components/NoTodosView.tsx"
    click SingleTodo "https://github.com/meetahmed/secure-todos-list-app-react-native/blob/main/src/screens/components/SingleTodoView.tsx"
    click Nav "https://github.com/meetahmed/secure-todos-list-app-react-native/blob/main/src/navigation/RootNavigator.tsx"
    click Store "https://github.com/meetahmed/secure-todos-list-app-react-native/blob/main/src/redux/store.ts"
    click AuthSlice "https://github.com/meetahmed/secure-todos-list-app-react-native/blob/main/src/redux/slices/authSlice.ts"
    click TodoSlice "https://github.com/meetahmed/secure-todos-list-app-react-native/blob/main/src/redux/slices/todoSlice.ts"
    click AuthUtils "https://github.com/meetahmed/secure-todos-list-app-react-native/blob/main/src/common/utils/AuthUtils.ts"
    click DateFmt "https://github.com/meetahmed/secure-todos-list-app-react-native/blob/main/src/common/utils/DateFormatter.ts"
    click Constants "https://github.com/meetahmed/secure-todos-list-app-react-native/blob/main/src/common/utils/Constants.ts"
    click Colors "https://github.com/meetahmed/secure-todos-list-app-react-native/blob/main/src/common/colors/AppColors.ts"
    click DB "https://github.com/meetahmed/secure-todos-list-app-react-native/blob/main/src/data/LocalDatabase.ts"
    click Model "https://github.com/meetahmed/secure-todos-list-app-react-native/blob/main/src/data/models/TodoModel.ts"
    click SQLiteMock "https://github.com/meetahmed/secure-todos-list-app-react-native/blob/main/__mocks__/react-native-sqlite-storage.ts"

    %% Styles
    classDef container fill:#b3cde0,stroke:#036,stroke-width:1px;
    classDef ui fill:#bae4bc,stroke:#2a5321,stroke-width:1px;
    classDef navigation fill:#decbe4,stroke:#5a037a,stroke-width:1px;
    classDef state fill:#c7e9b4,stroke:#237a22,stroke-width:1px;
    classDef utils fill:#f0f0f0,stroke:#333333,stroke-width:1px;
    classDef db fill:#fed98e,stroke:#b75900,stroke-width:1px;
    classDef native fill:#e0e0e0,stroke:#666666,stroke-width:1px;
```
