# ember-nexus/api architecture

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

- Interactive diagram: https://gitdiagram.com/ember-nexus/api
- Repository: https://github.com/ember-nexus/api

## Overview

Ember Nexus is a REST knowledge-graph API for storing, connecting, securing, and searching data. The main workflow starts with an API request, applies identity and access rules, then reads or mutates graph elements and returns a response; search is a separate event-driven, multi-step workflow. The tree and README establish graph storage, full-text search, file, WebDAV, and backup capabilities, but sampled code is limited, so several subsystem links are intentionally omitted.

Main entry points: [`src/Controller/Element`](https://github.com/ember-nexus/api/tree/main/src/Controller/Element) (Element endpoints), [`src/Controller/Search/PostSearchController.php`](https://github.com/ember-nexus/api/blob/main/src/Controller/Search/PostSearchController.php) (Search endpoint), [`src/Factory/CypherEntityManagerFactory.php`](https://github.com/ember-nexus/api/blob/main/src/Factory/CypherEntityManagerFactory.php) (Cypher manager), [`src/Controller/User/PostRegisterController.php`](https://github.com/ember-nexus/api/blob/main/src/Controller/User/PostRegisterController.php) (User registration)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_api["API workflows"]
  node_element_api["Element endpoints"]
  node_search_api["Search endpoint"]
  node_file_api["File endpoints"]
  node_dav_api["WebDAV endpoints"]
  node_system_api["System endpoints"]
  node_response["API responses"]
end

subgraph group_domain["Element domain"]
  node_element_manager["Element manager<br/>[ElementManager.php]"]
  node_element_conversion["Element conversion"]
  node_element_types["Graph elements<br/>[NodeElement.php]"]
end

subgraph group_stores["Storage and search"]
  node_neo4j_manager["Cypher manager"]
  node_neo4j[("Neo4j graph")]
  node_elastic_manager["Elastic manager"]
  node_elasticsearch[("Elasticsearch")]
  node_search_steps["Search steps"]
  node_mongo_manager["Mongo manager"]
  node_mongodb[("MongoDB")]
end

subgraph group_identity["Identity and operations"]
  node_access["Access control<br/>[AccessChecker.php]"]
  node_authentication["Authentication<br/>[AuthProvider.php]"]
  node_registration["User registration"]
  node_backup["Backup commands"]
end

node_client(("API client"))

node_client -->|"requests"| node_element_api
node_client -->|"submits search"| node_search_api
node_element_api -->|"gets identity"| node_authentication
node_element_api -->|"checks access"| node_access
node_element_api -->|"queries graph"| node_neo4j_manager
node_element_api -->|"builds response"| node_response
node_search_api -->|"dispatches steps"| node_search_steps
node_search_api -->|"returns results"| node_response
node_registration -->|"checks identifiers"| node_neo4j_manager
node_registration -->|"creates user"| node_element_manager
node_element_conversion -->|"converts elements"| node_element_types
node_elastic_manager -->|"connects"| node_elasticsearch
node_mongo_manager -->|"connects"| node_mongodb
node_neo4j_manager -->|"connects"| node_neo4j

click node_element_api "https://github.com/ember-nexus/api/tree/main/src/Controller/Element"
click node_search_api "https://github.com/ember-nexus/api/blob/main/src/Controller/Search/PostSearchController.php"
click node_file_api "https://github.com/ember-nexus/api/tree/main/src/Controller/File"
click node_dav_api "https://github.com/ember-nexus/api/tree/main/src/Controller/WebDAV"
click node_system_api "https://github.com/ember-nexus/api/tree/main/src/Controller/System"
click node_response "https://github.com/ember-nexus/api/tree/main/src/Response"
click node_element_manager "https://github.com/ember-nexus/api/blob/main/src/Service/ElementManager.php"
click node_element_conversion "https://github.com/ember-nexus/api/tree/main/src/Service"
click node_element_types "https://github.com/ember-nexus/api/blob/main/src/Type/NodeElement.php"
click node_access "https://github.com/ember-nexus/api/blob/main/src/Security/AccessChecker.php"
click node_authentication "https://github.com/ember-nexus/api/blob/main/src/Security/AuthProvider.php"
click node_registration "https://github.com/ember-nexus/api/blob/main/src/Controller/User/PostRegisterController.php"
click node_neo4j_manager "https://github.com/ember-nexus/api/blob/main/src/Factory/CypherEntityManagerFactory.php"
click node_elastic_manager "https://github.com/ember-nexus/api/blob/main/src/Factory/ElasticEntityManagerFactory.php"
click node_search_steps "https://github.com/ember-nexus/api/tree/main/src/EventSystem/SearchStep"
click node_mongo_manager "https://github.com/ember-nexus/api/blob/main/src/Factory/MongoEntityManagerFactory.php"
click node_backup "https://github.com/ember-nexus/api/blob/main/src/Command/BackupCreateCommand.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_element_api,node_search_api,node_file_api,node_dav_api,node_system_api,node_response,node_client toneBlue
class node_element_manager,node_element_conversion,node_element_types toneAmber
class node_neo4j_manager,node_neo4j,node_elastic_manager,node_elasticsearch,node_search_steps,node_mongo_manager,node_mongodb toneMint
class node_access,node_authentication,node_registration,node_backup toneRose
```

## Components

### API workflows

- [Element endpoints](https://github.com/ember-nexus/api/tree/main/src/Controller/Element): `src/Controller/Element`
- [Search endpoint](https://github.com/ember-nexus/api/blob/main/src/Controller/Search/PostSearchController.php): `src/Controller/Search/PostSearchController.php`
- [File endpoints](https://github.com/ember-nexus/api/tree/main/src/Controller/File): `src/Controller/File`
- [WebDAV endpoints](https://github.com/ember-nexus/api/tree/main/src/Controller/WebDAV): `src/Controller/WebDAV`
- [System endpoints](https://github.com/ember-nexus/api/tree/main/src/Controller/System): `src/Controller/System`
- [API responses](https://github.com/ember-nexus/api/tree/main/src/Response): `src/Response`

### Element domain

- [Element manager](https://github.com/ember-nexus/api/blob/main/src/Service/ElementManager.php): `src/Service/ElementManager.php`
- [Element conversion](https://github.com/ember-nexus/api/tree/main/src/Service): `src/Service`
- [Graph elements](https://github.com/ember-nexus/api/blob/main/src/Type/NodeElement.php): `src/Type/NodeElement.php`

### Storage and search

- [Cypher manager](https://github.com/ember-nexus/api/blob/main/src/Factory/CypherEntityManagerFactory.php): `src/Factory/CypherEntityManagerFactory.php`
- **Neo4j graph**
- [Elastic manager](https://github.com/ember-nexus/api/blob/main/src/Factory/ElasticEntityManagerFactory.php): `src/Factory/ElasticEntityManagerFactory.php`
- **Elasticsearch**
- [Search steps](https://github.com/ember-nexus/api/tree/main/src/EventSystem/SearchStep): `src/EventSystem/SearchStep`
- [Mongo manager](https://github.com/ember-nexus/api/blob/main/src/Factory/MongoEntityManagerFactory.php): `src/Factory/MongoEntityManagerFactory.php`
- **MongoDB**

### Identity and operations

- [Access control](https://github.com/ember-nexus/api/blob/main/src/Security/AccessChecker.php): `src/Security/AccessChecker.php`
- [Authentication](https://github.com/ember-nexus/api/blob/main/src/Security/AuthProvider.php): `src/Security/AuthProvider.php`
- [User registration](https://github.com/ember-nexus/api/blob/main/src/Controller/User/PostRegisterController.php): `src/Controller/User/PostRegisterController.php`
- [Backup commands](https://github.com/ember-nexus/api/blob/main/src/Command/BackupCreateCommand.php): `src/Command/BackupCreateCommand.php`

### Other components

- **API client**

## Connections

- API client → Element endpoints: requests
- API client → Search endpoint: submits search
- Element endpoints → Authentication: gets identity
- Element endpoints → Access control: checks access
- Element endpoints → Cypher manager: queries graph
- Element endpoints → API responses: builds response
- Search endpoint → Search steps: dispatches steps
- Search endpoint → API responses: returns results
- User registration → Cypher manager: checks identifiers
- User registration → Element manager: creates user
- Element conversion → Graph elements: converts elements
- Elastic manager → Elasticsearch: connects
- Mongo manager → MongoDB: connects
- Cypher manager → Neo4j graph: connects
