# ars-anosov/sipjs-react architecture

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

- Interactive diagram: https://gitdiagram.com/ars-anosov/sipjs-react
- Repository: https://github.com/ars-anosov/sipjs-react

## Overview

sipjs-react is a browser-based WebRTC phone with Active Directory sign-in and LiveKit meetings. Users can sign in through AD (or enter SIP details), register the SIP phone, then place calls, message contacts, and view call history; meeting invitations can also be issued and shared. The app separates UI components from Redux-connected containers, with domain actions invoking services for SIP, storage, directory, AD, and LiveKit-token work. README and sampled sources support the main UI and AD flow; several phone and meeting internals were not sampled, so uncertain runtime connections are omitted.

Main entry points: [`src/App.jsx`](https://github.com/ars-anosov/sipjs-react/blob/main/src/App.jsx) (Application UI), [`src/containers/AuthContainer.jsx`](https://github.com/ars-anosov/sipjs-react/blob/main/src/containers/AuthContainer.jsx) (Auth controller), [`src/containers/PhoneContainer.jsx`](https://github.com/ars-anosov/sipjs-react/blob/main/src/containers/PhoneContainer.jsx) (Phone controller), [`src/actions/phoneControlActions.js`](https://github.com/ars-anosov/sipjs-react/blob/main/src/actions/phoneControlActions.js) (Phone actions)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["App shell"]
  node_app["Application UI<br/>[App.jsx]"]
  node_menu["Menu and status<br/>[MenuAppBar.jsx]"]
end

subgraph group_auth["Authentication"]
  node_authui["Auth UI<br/>[AuthAd.jsx]"]
  node_authlinks["Sign-in links<br/>[AuthLinks.jsx]"]
  node_authcontainer["Auth controller<br/>[AuthContainer.jsx]"]
  node_authactions["AD actions"]
end

subgraph group_phone["SIP phone"]
  node_phonecontainer["Phone controller<br/>[PhoneContainer.jsx]"]
  node_phoneui["Phone panels<br/>[PhonePad.jsx]"]
  node_phoneactions["Phone actions"]
  node_sipruntime["SIP runtime<br/>[phoneRuntime.js]"]
  node_historychat["History and chat<br/>[PhoneHistory.jsx]"]
  node_directory["Phone directory<br/>[phoneDirectory.js]"]
end

subgraph group_meet["LiveKit meetings"]
  node_lkcontainer["Meeting controller<br/>[LkContainer.jsx]"]
  node_lkui["Meeting room UI<br/>[LkMeet.jsx]"]
  node_lkactions["Meeting actions"]
  node_lktoken["Token service<br/>[lkToken.js]"]
end

subgraph group_state["State and services"]
  node_adauth["AD service<br/>[adAuth.js]"]
  node_phonestore["Phone persistence<br/>[phoneStorage.js]"]
  node_store[("Redux store<br/>[configureStore.js]")]
  node_reducers["Domain reducers<br/>[rootReducer.js]"]
end

node_user(("User"))
node_adapi["AD API"]
node_browserstore[("Browser storage")]
node_livekit["LiveKit service"]

node_user -->|"uses"| node_app
node_app -->|"renders"| node_menu
node_app -->|"renders"| node_authcontainer
node_app -->|"renders"| node_phonecontainer
node_app -->|"renders"| node_lkcontainer
node_authcontainer -->|"renders"| node_authui
node_authcontainer -->|"renders"| node_authlinks
node_authcontainer -->|"dispatches"| node_authactions
node_authactions -->|"calls"| node_adauth
node_adauth -->|"requests"| node_adapi
node_phonecontainer -->|"renders"| node_phoneui
node_phonecontainer -->|"renders"| node_historychat
node_phonecontainer -->|"binds"| node_phoneactions
node_phoneactions -->|"calls"| node_sipruntime
node_phoneactions -->|"calls"| node_phonestore
node_phoneactions -->|"calls"| node_directory
node_phonestore -->|"reads/writes"| node_browserstore
node_lkcontainer -->|"renders"| node_lkui
node_lkcontainer -->|"binds"| node_lkactions
node_lkactions -->|"requests token"| node_lktoken
node_lkui -.->|"hosts meeting"| node_livekit
node_store -->|"configures"| node_reducers
node_authcontainer -->|"opens invite view"| node_lkactions

click node_app "https://github.com/ars-anosov/sipjs-react/blob/main/src/App.jsx"
click node_menu "https://github.com/ars-anosov/sipjs-react/blob/main/src/components/MenuAppBar.jsx"
click node_authui "https://github.com/ars-anosov/sipjs-react/blob/main/src/components/AuthAd.jsx"
click node_authlinks "https://github.com/ars-anosov/sipjs-react/blob/main/src/components/AuthLinks.jsx"
click node_authcontainer "https://github.com/ars-anosov/sipjs-react/blob/main/src/containers/AuthContainer.jsx"
click node_authactions "https://github.com/ars-anosov/sipjs-react/blob/main/src/actions/authControlActions.js"
click node_adauth "https://github.com/ars-anosov/sipjs-react/blob/main/src/services/adAuth.js"
click node_phonecontainer "https://github.com/ars-anosov/sipjs-react/blob/main/src/containers/PhoneContainer.jsx"
click node_phoneui "https://github.com/ars-anosov/sipjs-react/blob/main/src/components/PhonePad.jsx"
click node_phoneactions "https://github.com/ars-anosov/sipjs-react/blob/main/src/actions/phoneControlActions.js"
click node_sipruntime "https://github.com/ars-anosov/sipjs-react/blob/main/src/services/phoneRuntime.js"
click node_historychat "https://github.com/ars-anosov/sipjs-react/blob/main/src/components/PhoneHistory.jsx"
click node_directory "https://github.com/ars-anosov/sipjs-react/blob/main/src/services/phoneDirectory.js"
click node_phonestore "https://github.com/ars-anosov/sipjs-react/blob/main/src/services/phoneStorage.js"
click node_lkcontainer "https://github.com/ars-anosov/sipjs-react/blob/main/src/containers/LkContainer.jsx"
click node_lkui "https://github.com/ars-anosov/sipjs-react/blob/main/src/components/LkMeet.jsx"
click node_lkactions "https://github.com/ars-anosov/sipjs-react/blob/main/src/actions/lkControlActions.js"
click node_lktoken "https://github.com/ars-anosov/sipjs-react/blob/main/src/services/lkToken.js"
click node_store "https://github.com/ars-anosov/sipjs-react/blob/main/src/store/configureStore.js"
click node_reducers "https://github.com/ars-anosov/sipjs-react/blob/main/src/reducers/rootReducer.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_app,node_menu,node_user toneBlue
class node_authui,node_authlinks,node_authcontainer,node_authactions,node_browserstore toneAmber
class node_phonecontainer,node_phoneui,node_phoneactions,node_sipruntime,node_historychat,node_directory,node_adapi toneMint
class node_lkcontainer,node_lkui,node_lkactions,node_lktoken toneRose
class node_adauth,node_phonestore,node_store,node_reducers,node_livekit toneIndigo
```

## Components

### App shell

- [Application UI](https://github.com/ars-anosov/sipjs-react/blob/main/src/App.jsx): `src/App.jsx`
- [Menu and status](https://github.com/ars-anosov/sipjs-react/blob/main/src/components/MenuAppBar.jsx): `src/components/MenuAppBar.jsx`

### Authentication

- [Auth UI](https://github.com/ars-anosov/sipjs-react/blob/main/src/components/AuthAd.jsx): `src/components/AuthAd.jsx`
- [Sign-in links](https://github.com/ars-anosov/sipjs-react/blob/main/src/components/AuthLinks.jsx): `src/components/AuthLinks.jsx`
- [Auth controller](https://github.com/ars-anosov/sipjs-react/blob/main/src/containers/AuthContainer.jsx): `src/containers/AuthContainer.jsx`
- [AD actions](https://github.com/ars-anosov/sipjs-react/blob/main/src/actions/authControlActions.js): `src/actions/authControlActions.js`

### SIP phone

- [Phone controller](https://github.com/ars-anosov/sipjs-react/blob/main/src/containers/PhoneContainer.jsx): `src/containers/PhoneContainer.jsx`
- [Phone panels](https://github.com/ars-anosov/sipjs-react/blob/main/src/components/PhonePad.jsx): `src/components/PhonePad.jsx`
- [Phone actions](https://github.com/ars-anosov/sipjs-react/blob/main/src/actions/phoneControlActions.js): `src/actions/phoneControlActions.js`
- [SIP runtime](https://github.com/ars-anosov/sipjs-react/blob/main/src/services/phoneRuntime.js): `src/services/phoneRuntime.js`
- [History and chat](https://github.com/ars-anosov/sipjs-react/blob/main/src/components/PhoneHistory.jsx): `src/components/PhoneHistory.jsx`
- [Phone directory](https://github.com/ars-anosov/sipjs-react/blob/main/src/services/phoneDirectory.js): `src/services/phoneDirectory.js`

### LiveKit meetings

- [Meeting controller](https://github.com/ars-anosov/sipjs-react/blob/main/src/containers/LkContainer.jsx): `src/containers/LkContainer.jsx`
- [Meeting room UI](https://github.com/ars-anosov/sipjs-react/blob/main/src/components/LkMeet.jsx): `src/components/LkMeet.jsx`
- [Meeting actions](https://github.com/ars-anosov/sipjs-react/blob/main/src/actions/lkControlActions.js): `src/actions/lkControlActions.js`
- [Token service](https://github.com/ars-anosov/sipjs-react/blob/main/src/services/lkToken.js): `src/services/lkToken.js`

### State and services

- [AD service](https://github.com/ars-anosov/sipjs-react/blob/main/src/services/adAuth.js): `src/services/adAuth.js`
- [Phone persistence](https://github.com/ars-anosov/sipjs-react/blob/main/src/services/phoneStorage.js): `src/services/phoneStorage.js`
- [Redux store](https://github.com/ars-anosov/sipjs-react/blob/main/src/store/configureStore.js): `src/store/configureStore.js`
- [Domain reducers](https://github.com/ars-anosov/sipjs-react/blob/main/src/reducers/rootReducer.js): `src/reducers/rootReducer.js`

### Other components

- **User**
- **AD API**
- **Browser storage**
- **LiveKit service**

## Connections

- User → Application UI: uses
- Application UI → Menu and status: renders (evidence: `src/App.jsx`)
- Application UI → Auth controller: renders (evidence: `src/App.jsx`)
- Application UI → Phone controller: renders (evidence: `src/App.jsx`)
- Application UI → Meeting controller: renders (evidence: `src/App.jsx`)
- Auth controller → Auth UI: renders (evidence: `src/containers/AuthContainer.jsx`)
- Auth controller → Sign-in links: renders (evidence: `src/containers/AuthContainer.jsx`)
- Auth controller → AD actions: dispatches (evidence: `src/containers/AuthContainer.jsx`)
- AD actions → AD service: calls (evidence: `src/actions/authControlActions.js`)
- AD service → AD API: requests (evidence: `src/services/adAuth.js`)
- Phone controller → Phone panels: renders (evidence: `src/containers/PhoneContainer.jsx`)
- Phone controller → History and chat: renders (evidence: `src/containers/PhoneContainer.jsx`)
- Phone controller → Phone actions: binds (evidence: `src/containers/PhoneContainer.jsx`)
- Phone actions → SIP runtime: calls (evidence: `src/actions/phoneControlActions.js`)
- Phone actions → Phone persistence: calls (evidence: `src/actions/phoneControlActions.js`)
- Phone actions → Phone directory: calls (evidence: `src/actions/phoneControlActions.js`)
- Phone persistence → Browser storage: reads/writes (evidence: `src/services/phoneStorage.js`)
- Meeting controller → Meeting room UI: renders (evidence: `src/containers/LkContainer.jsx`)
- Meeting controller → Meeting actions: binds (evidence: `src/containers/LkContainer.jsx`)
- Meeting actions → Token service: requests token (evidence: `src/actions/lkControlActions.js`)
- Meeting room UI → LiveKit service: hosts meeting
- Redux store → Domain reducers: configures (evidence: `src/store/configureStore.js`)
- Auth controller → Meeting actions: opens invite view (evidence: `src/containers/AuthContainer.jsx`)
