# mirrorfly/mirrorfly-lite-chat-sdk-app-react architecture

> Architecture diagram of the GitHub repository mirrorfly/mirrorfly-lite-chat-sdk-app-react, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-05). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/mirrorfly/mirrorfly-lite-chat-sdk-app-react
- Repository: https://github.com/mirrorfly/mirrorfly-lite-chat-sdk-app-react

## Overview

This is a small React wrapper around MirrorFly’s prebuilt chat UI. A user enters an ID; the app persists it in browser storage and, on login, configures the SDK with that ID and the license key. The README documents contact selection and single or group conversations as chat capabilities. Their internal implementation is not included in the sampled source, so they are represented as SDK-provided capabilities. Performance reporting is a separate runtime branch.

Main entry points: [`src/App.js`](https://github.com/mirrorfly/mirrorfly-lite-chat-sdk-app-react/blob/master/src/App.js) (Login and chat wrapper), [`src/index.js`](https://github.com/mirrorfly/mirrorfly-lite-chat-sdk-app-react/blob/master/src/index.js) (React bootstrap), [`src/reportWebVitals.js`](https://github.com/mirrorfly/mirrorfly-lite-chat-sdk-app-react/blob/master/src/reportWebVitals.js) (Performance reporting)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_startup["App startup"]
  node_bootstrap["React bootstrap<br/>[index.js]"]
  node_vitals["Performance reporting<br/>[reportWebVitals.js]"]
end

subgraph group_session["User session"]
  node_app["Login and chat wrapper<br/>[App.js]"]
  node_storage[("Browser localStorage")]
end

subgraph group_chat["Chat SDK"]
  node_sdk["MirrorFly ChatApp"]
  node_contacts["Registered contacts"]
  node_chattypes["Single or group chat"]
  node_conversations["Conversations"]
end

node_user(("User"))

node_bootstrap -->|"renders"| node_app
node_user -->|"enters ID"| node_app
node_app -->|"reads and writes"| node_storage
node_app -->|"renders with credentials"| node_sdk
node_sdk -->|"offers selection"| node_contacts
node_sdk -->|"supports"| node_chattypes
node_sdk -->|"starts"| node_conversations
node_bootstrap -->|"invokes"| node_vitals

click node_bootstrap "https://github.com/mirrorfly/mirrorfly-lite-chat-sdk-app-react/blob/master/src/index.js"
click node_app "https://github.com/mirrorfly/mirrorfly-lite-chat-sdk-app-react/blob/master/src/App.js"
click node_vitals "https://github.com/mirrorfly/mirrorfly-lite-chat-sdk-app-react/blob/master/src/reportWebVitals.js"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_bootstrap,node_vitals,node_user toneBlue
class node_app,node_storage toneAmber
class node_sdk,node_contacts,node_chattypes,node_conversations toneMint
```

## Components

### App startup

- [React bootstrap](https://github.com/mirrorfly/mirrorfly-lite-chat-sdk-app-react/blob/master/src/index.js): `src/index.js`
- [Performance reporting](https://github.com/mirrorfly/mirrorfly-lite-chat-sdk-app-react/blob/master/src/reportWebVitals.js): `src/reportWebVitals.js`

### User session

- [Login and chat wrapper](https://github.com/mirrorfly/mirrorfly-lite-chat-sdk-app-react/blob/master/src/App.js): `src/App.js`
- **Browser localStorage**

### Chat SDK

- **MirrorFly ChatApp**
- **Registered contacts**
- **Single or group chat**
- **Conversations**

### Other components

- **User**

## Connections

- React bootstrap → Login and chat wrapper: renders (evidence: `src/index.js`)
- User → Login and chat wrapper: enters ID (evidence: `src/App.js`)
- Login and chat wrapper → Browser localStorage: reads and writes (evidence: `src/App.js`)
- Login and chat wrapper → MirrorFly ChatApp: renders with credentials (evidence: `src/App.js`)
- MirrorFly ChatApp → Registered contacts: offers selection (evidence: `README.md`)
- MirrorFly ChatApp → Single or group chat: supports (evidence: `README.md`)
- MirrorFly ChatApp → Conversations: starts (evidence: `README.md`)
- React bootstrap → Performance reporting: invokes (evidence: `src/index.js`)
