# aavoraa/teambridge architecture

> Architecture diagram of the GitHub repository aavoraa/teambridge, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-30). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/aavoraa/teambridge
- Repository: https://github.com/aavoraa/teambridge

## Overview

Phoenixx OS (also branded TeamBridge in the web client) is a multi-tenant team operations platform with browser, installed-web, and React Native clients backed by an API server. The main user workflow is to sign in, enter the appropriate desktop or mobile interface, and work with operational areas such as action items, HR, meetings, marketing, and reimbursements; server routes handle requests and persist data. The source index supports the shown client-to-server modules and selected route integrations, but not every domain route or client/server HTTP connection, so those links are omitted.

Main entry points: [`phoenixx-os/server/src/db/index.js`](https://github.com/aavoraa/teambridge/blob/main/phoenixx-os/server/src/db/index.js) (Relational database), [`phoenixx-os/server/src/app.js`](https://github.com/aavoraa/teambridge/blob/main/phoenixx-os/server/src/app.js) (HTTP application), [`phoenixx-os/web/src/App.tsx`](https://github.com/aavoraa/teambridge/blob/main/phoenixx-os/web/src/App.tsx) (Web routing), [`phoenixx-os/web/src/lib/auth.tsx`](https://github.com/aavoraa/teambridge/blob/main/phoenixx-os/web/src/lib/auth.tsx) (Web session)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web client"]
  node_webapp["Web routing<br/>[App.tsx]"]
  node_webauth["Web session<br/>[auth.tsx]"]
  node_webapi["Web API client<br/>[api.ts]"]
  node_webstorage[("Persistent storage<br/>[storage.ts]")]
  node_webpages["Operations screens"]
end

subgraph group_mobile["Mobile client"]
  node_mobileapp["Mobile navigation<br/>[App.tsx]"]
  node_mobileauth["Mobile session<br/>[auth.tsx]"]
  node_mobiletasks["Mobile tasks<br/>[TasksScreen.tsx]"]
  node_mobileapi["Mobile API and queue<br/>[api.ts]"]
end

subgraph group_server["API server"]
  node_serverapp["HTTP application<br/>[app.js]"]
  node_serverconfig["Runtime configuration<br/>[config.js]"]
  node_serverroutes["Route registry<br/>[index.js]"]
  node_authz["Access control<br/>[rbac.js]"]
  node_database[("Relational database<br/>[index.js]")]
  node_notifications["Notifications<br/>[notifications.js]"]
end

subgraph group_domains["Operations domains"]
  node_actionitems["Action items"]
  node_hr["Human resources<br/>[hr.routes.js]"]
  node_meetings["Meetings"]
  node_marketing["Marketing"]
  node_reimbursements["Reimbursements"]
end

node_user(("Team member"))
node_notificationproviders["Email and push"]
node_nativepreferences[("Native preferences")]

node_user -->|"uses"| node_webapp
node_webapp -->|"checks session"| node_webauth
node_webapp -->|"routes to"| node_webpages
node_webauth -->|"calls"| node_webapi
node_webauth -.->|"stores tokens"| node_webstorage
node_webstorage -->|"persists natively"| node_nativepreferences
node_user -->|"uses"| node_mobileapp
node_mobileapp -->|"provides session"| node_mobileauth
node_mobileapp -->|"navigates to"| node_mobiletasks
node_mobiletasks -->|"queues writes"| node_mobileapi
node_webapi -.->|"sends requests"| node_serverapp
node_mobileapi -.->|"sends requests"| node_serverapp
node_serverapp -->|"loads"| node_serverconfig
node_serverapp -->|"initializes"| node_database
node_serverapp -->|"mounts"| node_serverroutes
node_actionitems -->|"reads and writes"| node_database
node_actionitems -->|"notifies"| node_notifications
node_hr -->|"reads and writes"| node_database
node_meetings -->|"uses"| node_database
node_marketing -->|"uses"| node_database
node_reimbursements -->|"uses"| node_database
node_notifications -->|"records delivery"| node_database
node_notifications -->|"sends through"| node_notificationproviders

click node_webapp "https://github.com/aavoraa/teambridge/blob/main/phoenixx-os/web/src/App.tsx"
click node_webauth "https://github.com/aavoraa/teambridge/blob/main/phoenixx-os/web/src/lib/auth.tsx"
click node_webapi "https://github.com/aavoraa/teambridge/blob/main/phoenixx-os/web/src/lib/api.ts"
click node_webstorage "https://github.com/aavoraa/teambridge/blob/main/phoenixx-os/web/src/lib/storage.ts"
click node_webpages "https://github.com/aavoraa/teambridge/tree/main/phoenixx-os/web/src/pages"
click node_mobileapp "https://github.com/aavoraa/teambridge/blob/main/phoenixx-os/mobile/App.tsx"
click node_mobileauth "https://github.com/aavoraa/teambridge/blob/main/phoenixx-os/mobile/src/auth.tsx"
click node_mobiletasks "https://github.com/aavoraa/teambridge/blob/main/phoenixx-os/mobile/src/screens/TasksScreen.tsx"
click node_mobileapi "https://github.com/aavoraa/teambridge/blob/main/phoenixx-os/mobile/src/api.ts"
click node_serverapp "https://github.com/aavoraa/teambridge/blob/main/phoenixx-os/server/src/app.js"
click node_serverconfig "https://github.com/aavoraa/teambridge/blob/main/phoenixx-os/server/src/config.js"
click node_serverroutes "https://github.com/aavoraa/teambridge/blob/main/phoenixx-os/server/src/routes/index.js"
click node_authz "https://github.com/aavoraa/teambridge/blob/main/phoenixx-os/server/src/middleware/rbac.js"
click node_database "https://github.com/aavoraa/teambridge/blob/main/phoenixx-os/server/src/db/index.js"
click node_actionitems "https://github.com/aavoraa/teambridge/blob/main/phoenixx-os/server/src/routes/actionItems.routes.js"
click node_hr "https://github.com/aavoraa/teambridge/blob/main/phoenixx-os/server/src/routes/hr.routes.js"
click node_meetings "https://github.com/aavoraa/teambridge/blob/main/phoenixx-os/server/src/routes/liveMeetings.routes.js"
click node_marketing "https://github.com/aavoraa/teambridge/blob/main/phoenixx-os/server/src/routes/marketing.routes.js"
click node_reimbursements "https://github.com/aavoraa/teambridge/blob/main/phoenixx-os/server/src/routes/reimbursements.routes.js"
click node_notifications "https://github.com/aavoraa/teambridge/blob/main/phoenixx-os/server/src/services/notifications.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_webapp,node_webauth,node_webapi,node_webstorage,node_webpages toneBlue
class node_mobileapp,node_mobileauth,node_mobiletasks,node_mobileapi,node_nativepreferences toneAmber
class node_serverapp,node_serverconfig,node_serverroutes,node_authz,node_database,node_notifications toneMint
class node_actionitems,node_hr,node_meetings,node_marketing,node_reimbursements toneRose
class node_user,node_notificationproviders toneIndigo
```

## Components

### Web client

- [Web routing](https://github.com/aavoraa/teambridge/blob/main/phoenixx-os/web/src/App.tsx): `phoenixx-os/web/src/App.tsx`
- [Web session](https://github.com/aavoraa/teambridge/blob/main/phoenixx-os/web/src/lib/auth.tsx): `phoenixx-os/web/src/lib/auth.tsx`
- [Web API client](https://github.com/aavoraa/teambridge/blob/main/phoenixx-os/web/src/lib/api.ts): `phoenixx-os/web/src/lib/api.ts`
- [Persistent storage](https://github.com/aavoraa/teambridge/blob/main/phoenixx-os/web/src/lib/storage.ts): `phoenixx-os/web/src/lib/storage.ts`
- [Operations screens](https://github.com/aavoraa/teambridge/tree/main/phoenixx-os/web/src/pages): `phoenixx-os/web/src/pages`

### Mobile client

- [Mobile navigation](https://github.com/aavoraa/teambridge/blob/main/phoenixx-os/mobile/App.tsx): `phoenixx-os/mobile/App.tsx`
- [Mobile session](https://github.com/aavoraa/teambridge/blob/main/phoenixx-os/mobile/src/auth.tsx): `phoenixx-os/mobile/src/auth.tsx`
- [Mobile tasks](https://github.com/aavoraa/teambridge/blob/main/phoenixx-os/mobile/src/screens/TasksScreen.tsx): `phoenixx-os/mobile/src/screens/TasksScreen.tsx`
- [Mobile API and queue](https://github.com/aavoraa/teambridge/blob/main/phoenixx-os/mobile/src/api.ts): `phoenixx-os/mobile/src/api.ts`

### API server

- [HTTP application](https://github.com/aavoraa/teambridge/blob/main/phoenixx-os/server/src/app.js): `phoenixx-os/server/src/app.js`
- [Runtime configuration](https://github.com/aavoraa/teambridge/blob/main/phoenixx-os/server/src/config.js): `phoenixx-os/server/src/config.js`
- [Route registry](https://github.com/aavoraa/teambridge/blob/main/phoenixx-os/server/src/routes/index.js): `phoenixx-os/server/src/routes/index.js`
- [Access control](https://github.com/aavoraa/teambridge/blob/main/phoenixx-os/server/src/middleware/rbac.js): `phoenixx-os/server/src/middleware/rbac.js`
- [Relational database](https://github.com/aavoraa/teambridge/blob/main/phoenixx-os/server/src/db/index.js): `phoenixx-os/server/src/db/index.js`
- [Notifications](https://github.com/aavoraa/teambridge/blob/main/phoenixx-os/server/src/services/notifications.js): `phoenixx-os/server/src/services/notifications.js`

### Operations domains

- [Action items](https://github.com/aavoraa/teambridge/blob/main/phoenixx-os/server/src/routes/actionItems.routes.js): `phoenixx-os/server/src/routes/actionItems.routes.js`
- [Human resources](https://github.com/aavoraa/teambridge/blob/main/phoenixx-os/server/src/routes/hr.routes.js): `phoenixx-os/server/src/routes/hr.routes.js`
- [Meetings](https://github.com/aavoraa/teambridge/blob/main/phoenixx-os/server/src/routes/liveMeetings.routes.js): `phoenixx-os/server/src/routes/liveMeetings.routes.js`
- [Marketing](https://github.com/aavoraa/teambridge/blob/main/phoenixx-os/server/src/routes/marketing.routes.js): `phoenixx-os/server/src/routes/marketing.routes.js`
- [Reimbursements](https://github.com/aavoraa/teambridge/blob/main/phoenixx-os/server/src/routes/reimbursements.routes.js): `phoenixx-os/server/src/routes/reimbursements.routes.js`

### Other components

- **Team member**
- **Email and push**
- **Native preferences**

## Connections

- Team member → Web routing: uses
- Web routing → Web session: checks session (evidence: `phoenixx-os/web/src/App.tsx`)
- Web routing → Operations screens: routes to (evidence: `phoenixx-os/web/src/App.tsx`)
- Web session → Web API client: calls (evidence: `phoenixx-os/web/src/lib/auth.tsx`)
- Web session → Persistent storage: stores tokens
- Persistent storage → Native preferences: persists natively (evidence: `phoenixx-os/web/src/lib/storage.ts`)
- Team member → Mobile navigation: uses
- Mobile navigation → Mobile session: provides session (evidence: `phoenixx-os/mobile/App.tsx`)
- Mobile navigation → Mobile tasks: navigates to (evidence: `phoenixx-os/mobile/App.tsx`)
- Mobile tasks → Mobile API and queue: queues writes (evidence: `phoenixx-os/mobile/src/screens/TasksScreen.tsx`)
- Web API client → HTTP application: sends requests
- Mobile API and queue → HTTP application: sends requests
- HTTP application → Runtime configuration: loads (evidence: `phoenixx-os/server/src/app.js`)
- HTTP application → Relational database: initializes (evidence: `phoenixx-os/server/src/app.js`)
- HTTP application → Route registry: mounts (evidence: `phoenixx-os/server/src/app.js`)
- Action items → Relational database: reads and writes (evidence: `phoenixx-os/server/src/routes/actionItems.routes.js`)
- Action items → Notifications: notifies (evidence: `phoenixx-os/server/src/routes/actionItems.routes.js`)
- Human resources → Relational database: reads and writes (evidence: `phoenixx-os/server/src/routes/hr.routes.js`)
- Meetings → Relational database: uses (evidence: `phoenixx-os/server/src/routes/liveMeetings.routes.js`)
- Marketing → Relational database: uses (evidence: `phoenixx-os/server/src/routes/marketing.routes.js`)
- Reimbursements → Relational database: uses (evidence: `phoenixx-os/server/src/routes/reimbursements.routes.js`)
- Notifications → Relational database: records delivery (evidence: `phoenixx-os/server/src/services/notifications.js`)
- Notifications → Email and push: sends through (evidence: `phoenixx-os/server/src/services/notifications.js`)
