# sankey1980/sesameportal architecture

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

- Interactive diagram: https://gitdiagram.com/sankey1980/sesameportal
- Repository: https://github.com/sankey1980/sesameportal

## Overview

SesamePortal is a local PHP surveillance portal connected to SesameDVR. A user signs in, manages portal entities and camera access, then views cameras in list/map/player pages or arranges them into saved video walls. The graph preserves documented camera modes and viewer capabilities; most non-wall implementation details are represented at the enclosing `app/Portal.php` path because their source was not sampled.

Main entry points: [`app/Portal.php`](https://github.com/sankey1980/sesameportal/blob/main/app/Portal.php) (Application router), [`app/VideoWallPages.php`](https://github.com/sankey1980/sesameportal/blob/main/app/VideoWallPages.php) (Video wall pages), [`app/VideoWalls.php`](https://github.com/sankey1980/sesameportal/blob/main/app/VideoWalls.php) (Saved video walls), [`public/index.php`](https://github.com/sankey1980/sesameportal/blob/main/public/index.php) (HTTP entry)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Portal entry"]
  node_entrypoint["HTTP entry<br/>[index.php]"]
  node_app["Application router<br/>[Portal.php]"]
end

subgraph group_management["Administration"]
  node_auth["Login and access<br/>[Portal.php]"]
  node_admin["Users, groups, servers<br/>[Portal.php]"]
  node_camera_admin["Camera management<br/>[Portal.php]"]
  node_agents["Edge agents<br/>[Portal.php]"]
  node_settings["Personal settings<br/>[Portal.php]"]
  node_audit["Audit log<br/>[Portal.php]"]
end

subgraph group_viewing["Camera viewing"]
  node_list_map["List and map<br/>[Portal.php]"]
  node_player["Camera player<br/>[Portal.php]"]
  node_wall_pages["Video wall pages<br/>[VideoWallPages.php]"]
  node_wall_logic["Saved video walls<br/>[VideoWalls.php]"]
  node_wall_client["Wall playback UI"]
  node_wall_editor["Wall editor UI<br/>[video-walls.js]"]
end

subgraph group_integration["DVR integration"]
  node_dvr{{"SesameDVR"}}
  node_dvr_management["DVR management and auth<br/>[Portal.php]"]
  node_dvr_playback["DVR embeds and archives<br/>[Portal.php]"]
end

subgraph group_state["Persistence and localization"]
  node_repo["Portal data access<br/>[Portal.php]"]
  node_wall_store["Video wall records<br/>[VideoWalls.php]"]
  node_database[("Portal database")]
  node_translations["UI translations"]
  node_wall_translations["Wall translations"]
end

node_user(("Portal user"))

node_user -->|"requests pages"| node_entrypoint
node_entrypoint -->|"starts app"| node_app
node_app -->|"handles sign-in"| node_auth
node_app -->|"dispatches admin"| node_admin
node_app -->|"dispatches cameras"| node_camera_admin
node_app -->|"dispatches agents"| node_agents
node_app -->|"handles settings"| node_settings
node_app -->|"handles audit"| node_audit
node_app -->|"serves views"| node_list_map
node_app -->|"serves player"| node_player
node_app -->|"dispatches walls"| node_wall_pages
node_wall_pages -->|"manages walls"| node_wall_logic
node_wall_editor -->|"submits edits"| node_wall_pages
node_wall_pages -->|"renders playback UI"| node_wall_client
node_wall_client -->|"controls playback"| node_dvr_playback
node_player -->|"loads camera video"| node_dvr_playback
node_camera_admin -->|"syncs camera modes"| node_dvr_management
node_dvr_management -->|"management and auth"| node_dvr
node_dvr_playback -->|"embeds and queries archive"| node_dvr
node_app -->|"reads and writes"| node_repo
node_repo -->|"queries portal data"| node_database
node_wall_logic -->|"stores wall records"| node_database
node_wall_logic -->|"checks camera access"| node_repo
node_app -->|"loads messages"| node_translations
node_wall_pages -->|"loads wall messages"| node_wall_translations

click node_entrypoint "https://github.com/sankey1980/sesameportal/blob/main/public/index.php"
click node_app "https://github.com/sankey1980/sesameportal/blob/main/app/Portal.php"
click node_auth "https://github.com/sankey1980/sesameportal/blob/main/app/Portal.php"
click node_admin "https://github.com/sankey1980/sesameportal/blob/main/app/Portal.php"
click node_camera_admin "https://github.com/sankey1980/sesameportal/blob/main/app/Portal.php"
click node_agents "https://github.com/sankey1980/sesameportal/blob/main/app/Portal.php"
click node_settings "https://github.com/sankey1980/sesameportal/blob/main/app/Portal.php"
click node_audit "https://github.com/sankey1980/sesameportal/blob/main/app/Portal.php"
click node_list_map "https://github.com/sankey1980/sesameportal/blob/main/app/Portal.php"
click node_player "https://github.com/sankey1980/sesameportal/blob/main/app/Portal.php"
click node_wall_pages "https://github.com/sankey1980/sesameportal/blob/main/app/VideoWallPages.php"
click node_wall_logic "https://github.com/sankey1980/sesameportal/blob/main/app/VideoWalls.php"
click node_wall_client "https://github.com/sankey1980/sesameportal/blob/main/public/assets/video-wall-playback.js"
click node_wall_editor "https://github.com/sankey1980/sesameportal/blob/main/public/assets/video-walls.js"
click node_dvr_management "https://github.com/sankey1980/sesameportal/blob/main/app/Portal.php"
click node_dvr_playback "https://github.com/sankey1980/sesameportal/blob/main/app/Portal.php"
click node_repo "https://github.com/sankey1980/sesameportal/blob/main/app/Portal.php"
click node_wall_store "https://github.com/sankey1980/sesameportal/blob/main/app/VideoWalls.php"
click node_translations "https://github.com/sankey1980/sesameportal/blob/main/app/PortalI18nCatalog.php"
click node_wall_translations "https://github.com/sankey1980/sesameportal/blob/main/app/VideoWallTranslations.php"

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_entrypoint,node_app,node_user toneBlue
class node_auth,node_admin,node_camera_admin,node_agents,node_settings,node_audit toneAmber
class node_list_map,node_player,node_wall_pages,node_wall_logic,node_wall_client,node_wall_editor toneMint
class node_dvr,node_dvr_management,node_dvr_playback toneRose
class node_repo,node_wall_store,node_database,node_translations,node_wall_translations toneIndigo
```

## Components

### Portal entry

- [HTTP entry](https://github.com/sankey1980/sesameportal/blob/main/public/index.php): `public/index.php`
- [Application router](https://github.com/sankey1980/sesameportal/blob/main/app/Portal.php): `app/Portal.php`

### Administration

- [Login and access](https://github.com/sankey1980/sesameportal/blob/main/app/Portal.php): `app/Portal.php`
- [Users, groups, servers](https://github.com/sankey1980/sesameportal/blob/main/app/Portal.php): `app/Portal.php`
- [Camera management](https://github.com/sankey1980/sesameportal/blob/main/app/Portal.php): `app/Portal.php`
- [Edge agents](https://github.com/sankey1980/sesameportal/blob/main/app/Portal.php): `app/Portal.php`
- [Personal settings](https://github.com/sankey1980/sesameportal/blob/main/app/Portal.php): `app/Portal.php`
- [Audit log](https://github.com/sankey1980/sesameportal/blob/main/app/Portal.php): `app/Portal.php`

### Camera viewing

- [List and map](https://github.com/sankey1980/sesameportal/blob/main/app/Portal.php): `app/Portal.php`
- [Camera player](https://github.com/sankey1980/sesameportal/blob/main/app/Portal.php): `app/Portal.php`
- [Video wall pages](https://github.com/sankey1980/sesameportal/blob/main/app/VideoWallPages.php): `app/VideoWallPages.php`
- [Saved video walls](https://github.com/sankey1980/sesameportal/blob/main/app/VideoWalls.php): `app/VideoWalls.php`
- [Wall playback UI](https://github.com/sankey1980/sesameportal/blob/main/public/assets/video-wall-playback.js): `public/assets/video-wall-playback.js`
- [Wall editor UI](https://github.com/sankey1980/sesameportal/blob/main/public/assets/video-walls.js): `public/assets/video-walls.js`

### DVR integration

- **SesameDVR**
- [DVR management and auth](https://github.com/sankey1980/sesameportal/blob/main/app/Portal.php): `app/Portal.php`
- [DVR embeds and archives](https://github.com/sankey1980/sesameportal/blob/main/app/Portal.php): `app/Portal.php`

### Persistence and localization

- [Portal data access](https://github.com/sankey1980/sesameportal/blob/main/app/Portal.php): `app/Portal.php`
- [Video wall records](https://github.com/sankey1980/sesameportal/blob/main/app/VideoWalls.php): `app/VideoWalls.php`
- **Portal database**
- [UI translations](https://github.com/sankey1980/sesameportal/blob/main/app/PortalI18nCatalog.php): `app/PortalI18nCatalog.php`
- [Wall translations](https://github.com/sankey1980/sesameportal/blob/main/app/VideoWallTranslations.php): `app/VideoWallTranslations.php`

### Other components

- **Portal user**

## Connections

- Portal user → HTTP entry: requests pages
- HTTP entry → Application router: starts app
- Application router → Login and access: handles sign-in
- Application router → Users, groups, servers: dispatches admin
- Application router → Camera management: dispatches cameras
- Application router → Edge agents: dispatches agents
- Application router → Personal settings: handles settings
- Application router → Audit log: handles audit
- Application router → List and map: serves views
- Application router → Camera player: serves player
- Application router → Video wall pages: dispatches walls
- Video wall pages → Saved video walls: manages walls
- Wall editor UI → Video wall pages: submits edits
- Video wall pages → Wall playback UI: renders playback UI
- Wall playback UI → DVR embeds and archives: controls playback
- Camera player → DVR embeds and archives: loads camera video
- Camera management → DVR management and auth: syncs camera modes
- DVR management and auth → SesameDVR: management and auth
- DVR embeds and archives → SesameDVR: embeds and queries archive
- Application router → Portal data access: reads and writes
- Portal data access → Portal database: queries portal data
- Saved video walls → Portal database: stores wall records
- Saved video walls → Portal data access: checks camera access
- Application router → UI translations: loads messages
- Video wall pages → Wall translations: loads wall messages
