# dasgajraj/justdoit architecture

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

- Interactive diagram: https://gitdiagram.com/dasgajraj/justdoit
- Repository: https://github.com/dasgajraj/justdoit

## Overview

##### Project type and purpose
- This is a cross-platform mobile application built with React Native and Expo.
- It implements a local, feature-rich task manager: UI screens, theme system, local storage, and notifications—no external backend.

##### File structure
- Entry points:
- index.js – registers the root component
- App.js – wraps NavigationContainer and Redux Provider
- Directories:
- navigation/ – React Navigation setup (stackNavigation.js, tabNavigation.js)
- redux/ – actions, constants, reducers, store, Redux-Persist setup
- ui/ – screen components (HomeScreen, SettingsScreen, LoadingScreen)
- Config files: app.json (Expo), package.json, .gitignore

##### README for insights
- Technology stack: React Native, Expo, Redux, Redux Persist, AsyncStorage, Expo Notifications, React Navigation
- Architectural notes: unidirectional data flow, theme persistence, local notifications, AsyncStorage integration.

##### Main components & their interactions
a. Components:
1. React Native Runtime (JavaScript VM on device)
2. App Root (App.js)
3. Navigation Layer (TabNavigator + StackNavigator)
4. UI Screens (Home, Settings, Loading)
5. State Management (Redux Store + Redux Persist)
6. Local Storage (AsyncStorage)
7. Notification Service (Expo Notifications + OS)
b. Relationships / Data flow:
- App Root initializes NavigationContainer and Redux Provider → passes store to UI
- UI Screens dispatch Redux actions → RootReducer updates state → Redux Persist writes to AsyncStorage
- On app start, Redux Persist rehydrates store from AsyncStorage before UI renders
- HomeScreen schedules local notifications via Expo Notifications API → OS handles delivery
c. Architectural patterns:
- Flux / unidirectional data flow (React → Action → Reducer → Store → React)
- Container/Presentational separation: screens vs. state logic in redux/
- Modular navigation: stacks for in-flow modals, bottom tabs for main sections
d. Core technologies:
- React Native + Expo (presentation/runtime)
- React Navigation (navigation)
- Redux & Redux Persist (state container + persistence)
- AsyncStorage (device storage)
- Expo Notifications (local notifications)

## Diagram (Mermaid)

```mermaid
flowchart TB
    subgraph "Mobile Device / OS"
        RN["React Native Runtime"]:::runtime

        index["index.js"]:::entry -->|"registers root component"| AppRoot
        AppRoot["App Root"]:::root -->|"initializes"| NavContainer
        AppRoot -->|"provides store"| ReduxProvider

        subgraph "NavigationContainer"
            NavContainer["NavigationContainer"]:::nav
            TabNav["TabNavigator"]:::nav -->|"navigates to"| StackNav
            StackNav["StackNavigator"]:::nav -->|"renders"| Home
            StackNav -->|"renders"| Settings
            StackNav -->|"renders"| Loading
        end

        subgraph "Redux Provider"
            ReduxProvider["Redux Provider"]:::state
            ReduxProvider --> Store
            Store["Redux Store"]:::state --> RootReducer
            Store --> ThemeReducer
            PersistGate["PersistGate"]:::state --> AsyncStorage
            Store --> PersistGate
        end

        Common["common/colors.js"]:::common
        Common --> ThemeReducer
        Common --> Home

        Home["HomeScreen"]:::ui -->|"dispatch(Action)"| Store
        Settings["SettingsScreen"]:::ui -->|"dispatch(Action)"| Store
        Loading["LoadingScreen"]:::ui -->|"dispatch(Action)"| Store

        Home -->|"scheduleNotification()"| Notifications
        Notifications["Expo Notifications"]:::service -->|"deliver"| OS
        OS["Device OS"]:::service -->|"color-schemechange"| ThemeReducer
    end

    classDef runtime fill:#AED6F1,stroke:#1B4F72;
    classDef entry fill:#D6DBDF,stroke:#1C2833;
    classDef root fill:#AED6F1,stroke:#1B4F72;
    classDef nav fill:#FADBD8,stroke:#922B21;
    classDef ui fill:#D6EAF8,stroke:#154360;
    classDef state fill:#D5F5E3,stroke:#145A32;
    classDef storage fill:#FDEBD0,stroke:#935116;
    classDef service fill:#E8DAEF,stroke:#512E5F;
    classDef common fill:#FCF3CF,stroke:#7D6608;

    click AppRoot "https://github.com/dasgajraj/justdoit/blob/master/App.js"
    click index "https://github.com/dasgajraj/justdoit/blob/master/index.js"
    click StackNav "https://github.com/dasgajraj/justdoit/blob/master/navigation/stackNavigaton.js"
    click TabNav "https://github.com/dasgajraj/justdoit/blob/master/navigation/tabNavigation.js"
    click Home "https://github.com/dasgajraj/justdoit/blob/master/ui/HomeScreen.js"
    click Settings "https://github.com/dasgajraj/justdoit/blob/master/ui/SettingsScreen.js"
    click Loading "https://github.com/dasgajraj/justdoit/blob/master/ui/LoadingScreen.js"
    click Store "https://github.com/dasgajraj/justdoit/blob/master/redux/Store.js"
    click RootReducer "https://github.com/dasgajraj/justdoit/blob/master/redux/RootReducer.js"
    click ThemeReducer "https://github.com/dasgajraj/justdoit/blob/master/redux/ThemeReducer.js"
    click Common "https://github.com/dasgajraj/justdoit/blob/master/common/colors.js"
```
