# infinitered/ignite architecture

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

- Interactive diagram: https://gitdiagram.com/infinitered/ignite
- Repository: https://github.com/infinitered/ignite

## Overview

##### Main Components

A. Core Infrastructure Layer:
- CLI Tools (represented by /src/commands)
- Generator System (represented by /src/tools)
- Project Templates (represented by /boilerplate)

B. Application Architecture Layer:
- Navigation System (using React Navigation v6)
- State Management (MobX-State-Tree)
- UI Components Library
- Internationalization System
- API Services
- Storage System (MMKV)

**┌─────────────────────────────────────────────────────────────┐**
- Development Tools                        │
- ┌─────────────┐  ┌──────────────┐  ┌──────────────────┐   │
- Ignite CLI  │  │  Generators  │  │ Project Templates │   │
- ┘  └──────────────┘  └──────────────────┘   │
- ┘
- ▼
**┌─────────────────────────────────────────────────────────────┐**
- Application Core                          │
- ┌─────────────┐  ┌──────────────┐  ┌──────────────────┐   │
- Router    │  │  MobX Store  │  │  API Services    │   │
- ┘  └──────────────┘  └──────────────────┘   │
- ┘
- ▼
**┌─────────────────────────────────────────────────────────────┐**
- UI & Features                             │
- ┌─────────────┐  ┌──────────────┐  ┌──────────────────┐   │
- Components  │  │    Screens   │  │     Themes       │   │
- ┘  └──────────────┘  └──────────────────┘   │
- ┘
- ▼
**┌─────────────────────────────────────────────────────────────┐**
- Platform Layer                            │
- ┌─────────────┐  ┌──────────────┐  ┌──────────────────┐   │
- React Native │  │    Expo      │  │     Hermes       │   │
- ┘  └──────────────┘  └──────────────────┘   │
- ┘

##### Connection Types
- Double lines for data flow

##### Important Details

A. Development Tools Layer:
- CLI Commands (/src/commands)
- Generator Templates (/src/tools/generators)
- Project Configuration

B. Application Core Layer:
- Navigation Structure (AppNavigator, DemoNavigator)
- State Management (AuthenticationStore, EpisodeStore)
- API Services Configuration

C. UI & Features Layer:
- Component Library (Button, Card, Text, etc.)
- Screen Components
- Theming System

D. Platform Layer:
- React Native Configuration
- Expo Integration
- Native Bridges

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% Styles
    classDef devTools fill:#2374ab,color:#fff
    classDef appCore fill:#2a9d8f,color:#fff
    classDef uiFeatures fill:#e76f51,color:#fff
    classDef platform fill:#6c757d,color:#fff

    %% Development Tools Layer
    subgraph DevelopmentTools["Development Tools Layer"]
        CLI["CLI Tools"]:::devTools
        GEN["Generator System"]:::devTools
        TPL["Project Templates"]:::devTools
    end

    %% Application Core Layer
    subgraph ApplicationCore["Application Core Layer"]
        NAV["Navigation System"]:::appCore
        STATE["State Management"]:::appCore
        API["API Services"]:::appCore
        STORAGE["Storage System"]:::appCore
    end

    %% UI & Features Layer
    subgraph UIFeatures["UI & Features Layer"]
        COMP["UI Components"]:::uiFeatures
        I18N["Internationalization"]:::uiFeatures
        THEME["Theme System"]:::uiFeatures
    end

    %% Platform Layer
    subgraph PlatformLayer["Platform Layer"]
        RN["React Native"]:::platform
        EXPO["Expo"]:::platform
        HERMES["Hermes"]:::platform
    end

    %% Connections
    DevelopmentTools --> ApplicationCore
    ApplicationCore --> UIFeatures
    UIFeatures --> PlatformLayer

    %% Component Relationships
    CLI --> GEN
    GEN --> TPL
    NAV --> COMP
    STATE --> API
    API --> STORAGE
    COMP --> THEME
    COMP --> I18N

    %% Click Events
    click CLI "https://github.com/infinitered/ignite/tree/master/src/commands"
    click GEN "https://github.com/infinitered/ignite/tree/master/src/tools"
    click TPL "https://github.com/infinitered/ignite/tree/master/boilerplate"
    click NAV "https://github.com/infinitered/ignite/tree/master/boilerplate/app/navigators"
    click STATE "https://github.com/infinitered/ignite/tree/master/boilerplate/app/models"
    click COMP "https://github.com/infinitered/ignite/tree/master/boilerplate/app/components"
    click I18N "https://github.com/infinitered/ignite/tree/master/boilerplate/app/i18n"
    click API "https://github.com/infinitered/ignite/tree/master/boilerplate/app/services/api"
    click STORAGE "https://github.com/infinitered/ignite/tree/master/boilerplate/app/utils/storage"
    click THEME "https://github.com/infinitered/ignite/tree/master/boilerplate/app/theme"

    %% Legend
    subgraph Legend
        DEV_LEGEND["Development Tools"]:::devTools
        CORE_LEGEND["Application Core"]:::appCore
        UI_LEGEND["UI & Features"]:::uiFeatures
        PLATFORM_LEGEND["Platform Layer"]:::platform
    end
```
