# neutronica/sysw architecture

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

- Interactive diagram: https://gitdiagram.com/neutronica/sysw
- Repository: https://github.com/neutronica/sysw

## Overview

SysW is a condominium water-consumption monitoring app with separate resident and administrator experiences. Users choose a role, enter a login form, and are routed to the corresponding dashboard. Residents can view current usage and bill estimates, review 12-month consumption history, and access unit alerts; administrators can review condominium metrics and alert history and manage units and residents. The sampled screens use local illustrative data and state; no backend or persistent store is evidenced. Unsampled screen capabilities and navigation are represented from the file tree and navigator declarations.

Main entry points: [`navigation/AppNavigator.js`](https://github.com/neutronica/sysw/blob/master/navigation/AppNavigator.js) (Role navigation), [`screens/resident/ResidentDashboardScreen.js`](https://github.com/neutronica/sysw/blob/master/screens/resident/ResidentDashboardScreen.js) (Resident dashboard), [`screens/admin/AdminDashboardScreen.js`](https://github.com/neutronica/sysw/blob/master/screens/admin/AdminDashboardScreen.js) (Admin dashboard), [`styles/theme.js`](https://github.com/neutronica/sysw/blob/master/styles/theme.js) (Theme and layout)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["App entry"]
  node_root["App bootstrap<br/>[index.js]"]
  node_app["App shell<br/>[App.js]"]
  node_navigation["Role navigation<br/>[AppNavigator.js]"]
end

subgraph group_access["Access flow"]
  node_role["Role selection"]
  node_login["Login form<br/>[LoginScreen.js]"]
end

subgraph group_resident["Resident experience"]
  node_residentdash["Resident dashboard"]
  node_residenthistory["Usage history"]
  node_residentialerts["Resident alerts"]
end

subgraph group_admin["Administrator experience"]
  node_admindash["Admin dashboard"]
  node_adminalerts["Alert history"]
  node_adminmenu["Management menu<br/>[AdminMenuScreen.js]"]
  node_adminunits["Unit management"]
  node_registerunit["Register unit"]
  node_registerresident["Register resident"]
  node_manageresidents["Manage residents"]
  node_linkunits["Link units"]
end

subgraph group_ui["Shared UI"]
  node_header["Shared header<br/>[Header.js]"]
  node_theme["Theme and layout<br/>[theme.js]"]
end

node_user(("App user"))

node_user -->|"opens app"| node_root
node_root -->|"registers"| node_app
node_app -->|"renders"| node_navigation
node_navigation -->|"starts at"| node_role
node_user -->|"chooses role"| node_role
node_role -->|"opens login"| node_login
node_login -->|"routes by role"| node_navigation
node_navigation -->|"opens resident tabs"| node_residentdash
node_navigation -->|"opens history tab"| node_residenthistory
node_navigation -->|"opens alerts tab"| node_residentialerts
node_navigation -->|"opens admin tabs"| node_admindash
node_navigation -->|"opens alerts tab"| node_adminalerts
node_navigation -->|"opens management stack"| node_adminmenu
node_navigation -->|"routes management"| node_adminunits
node_navigation -->|"routes management"| node_registerunit
node_navigation -->|"routes management"| node_registerresident
node_navigation -->|"routes management"| node_manageresidents
node_navigation -->|"routes management"| node_linkunits
node_residentdash -->|"navigates to"| node_residenthistory
node_residentdash -->|"navigates to"| node_residentialerts
node_admindash -->|"navigates to"| node_adminalerts
node_admindash -->|"opens menu"| node_adminmenu
node_residentdash -->|"renders"| node_header
node_residenthistory -->|"renders"| node_header
node_admindash -->|"renders"| node_header
node_manageresidents -->|"renders"| node_header
node_role -->|"uses layout"| node_theme
node_login -->|"uses layout"| node_theme
node_residentdash -->|"uses layout"| node_theme
node_residenthistory -->|"uses layout"| node_theme
node_admindash -->|"uses layout"| node_theme

click node_root "https://github.com/neutronica/sysw/blob/master/index.js"
click node_app "https://github.com/neutronica/sysw/blob/master/App.js"
click node_navigation "https://github.com/neutronica/sysw/blob/master/navigation/AppNavigator.js"
click node_role "https://github.com/neutronica/sysw/blob/master/screens/RoleSelectionScreen.js"
click node_login "https://github.com/neutronica/sysw/blob/master/screens/LoginScreen.js"
click node_residentdash "https://github.com/neutronica/sysw/blob/master/screens/resident/ResidentDashboardScreen.js"
click node_residenthistory "https://github.com/neutronica/sysw/blob/master/screens/resident/ResidentHistoryScreen.js"
click node_residentialerts "https://github.com/neutronica/sysw/blob/master/screens/resident/ResidentAlertsScreen.js"
click node_admindash "https://github.com/neutronica/sysw/blob/master/screens/admin/AdminDashboardScreen.js"
click node_adminalerts "https://github.com/neutronica/sysw/blob/master/screens/admin/AdminAlertsHistoryScreen.js"
click node_adminmenu "https://github.com/neutronica/sysw/blob/master/screens/admin/AdminMenuScreen.js"
click node_adminunits "https://github.com/neutronica/sysw/blob/master/screens/admin/AdminUnitsScreen.js"
click node_registerunit "https://github.com/neutronica/sysw/blob/master/screens/admin/AdminRegisterUnitScreen.js"
click node_registerresident "https://github.com/neutronica/sysw/blob/master/screens/admin/AdminRegisterResidentScreen.js"
click node_manageresidents "https://github.com/neutronica/sysw/blob/master/screens/admin/AdminManageResidentsScreen.js"
click node_linkunits "https://github.com/neutronica/sysw/blob/master/screens/admin/AdminLinkUnitsScreen.js"
click node_header "https://github.com/neutronica/sysw/blob/master/components/Header.js"
click node_theme "https://github.com/neutronica/sysw/blob/master/styles/theme.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_root,node_app,node_navigation,node_user toneBlue
class node_role,node_login toneAmber
class node_residentdash,node_residenthistory,node_residentialerts toneMint
class node_admindash,node_adminalerts,node_adminmenu,node_adminunits,node_registerunit,node_registerresident,node_manageresidents,node_linkunits toneRose
class node_header,node_theme toneIndigo
```

## Components

### App entry

- [App bootstrap](https://github.com/neutronica/sysw/blob/master/index.js): `index.js`
- [App shell](https://github.com/neutronica/sysw/blob/master/App.js): `App.js`
- [Role navigation](https://github.com/neutronica/sysw/blob/master/navigation/AppNavigator.js): `navigation/AppNavigator.js`

### Access flow

- [Role selection](https://github.com/neutronica/sysw/blob/master/screens/RoleSelectionScreen.js): `screens/RoleSelectionScreen.js`
- [Login form](https://github.com/neutronica/sysw/blob/master/screens/LoginScreen.js): `screens/LoginScreen.js`

### Resident experience

- [Resident dashboard](https://github.com/neutronica/sysw/blob/master/screens/resident/ResidentDashboardScreen.js): `screens/resident/ResidentDashboardScreen.js`
- [Usage history](https://github.com/neutronica/sysw/blob/master/screens/resident/ResidentHistoryScreen.js): `screens/resident/ResidentHistoryScreen.js`
- [Resident alerts](https://github.com/neutronica/sysw/blob/master/screens/resident/ResidentAlertsScreen.js): `screens/resident/ResidentAlertsScreen.js`

### Administrator experience

- [Admin dashboard](https://github.com/neutronica/sysw/blob/master/screens/admin/AdminDashboardScreen.js): `screens/admin/AdminDashboardScreen.js`
- [Alert history](https://github.com/neutronica/sysw/blob/master/screens/admin/AdminAlertsHistoryScreen.js): `screens/admin/AdminAlertsHistoryScreen.js`
- [Management menu](https://github.com/neutronica/sysw/blob/master/screens/admin/AdminMenuScreen.js): `screens/admin/AdminMenuScreen.js`
- [Unit management](https://github.com/neutronica/sysw/blob/master/screens/admin/AdminUnitsScreen.js): `screens/admin/AdminUnitsScreen.js`
- [Register unit](https://github.com/neutronica/sysw/blob/master/screens/admin/AdminRegisterUnitScreen.js): `screens/admin/AdminRegisterUnitScreen.js`
- [Register resident](https://github.com/neutronica/sysw/blob/master/screens/admin/AdminRegisterResidentScreen.js): `screens/admin/AdminRegisterResidentScreen.js`
- [Manage residents](https://github.com/neutronica/sysw/blob/master/screens/admin/AdminManageResidentsScreen.js): `screens/admin/AdminManageResidentsScreen.js`
- [Link units](https://github.com/neutronica/sysw/blob/master/screens/admin/AdminLinkUnitsScreen.js): `screens/admin/AdminLinkUnitsScreen.js`

### Shared UI

- [Shared header](https://github.com/neutronica/sysw/blob/master/components/Header.js): `components/Header.js`
- [Theme and layout](https://github.com/neutronica/sysw/blob/master/styles/theme.js): `styles/theme.js`

### Other components

- **App user**

## Connections

- App user → App bootstrap: opens app
- App bootstrap → App shell: registers
- App shell → Role navigation: renders
- Role navigation → Role selection: starts at
- App user → Role selection: chooses role
- Role selection → Login form: opens login
- Login form → Role navigation: routes by role
- Role navigation → Resident dashboard: opens resident tabs
- Role navigation → Usage history: opens history tab
- Role navigation → Resident alerts: opens alerts tab
- Role navigation → Admin dashboard: opens admin tabs
- Role navigation → Alert history: opens alerts tab
- Role navigation → Management menu: opens management stack
- Role navigation → Unit management: routes management
- Role navigation → Register unit: routes management
- Role navigation → Register resident: routes management
- Role navigation → Manage residents: routes management
- Role navigation → Link units: routes management
- Resident dashboard → Usage history: navigates to
- Resident dashboard → Resident alerts: navigates to
- Admin dashboard → Alert history: navigates to
- Admin dashboard → Management menu: opens menu
- Resident dashboard → Shared header: renders
- Usage history → Shared header: renders
- Admin dashboard → Shared header: renders
- Manage residents → Shared header: renders
- Role selection → Theme and layout: uses layout
- Login form → Theme and layout: uses layout
- Resident dashboard → Theme and layout: uses layout
- Usage history → Theme and layout: uses layout
- Admin dashboard → Theme and layout: uses layout
