# robertmagic52/realmindreadingsystem architecture

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

- Interactive diagram: https://gitdiagram.com/robertmagic52/realmindreadingsystem
- Repository: https://github.com/robertmagic52/realmindreadingsystem

## Overview

This repository implements a screenshot and telemetry receiver with summary history and editable portal links. The main workflow accepts submissions through API routes, stores and serves them, and exposes a history page; separate routes manage summaries and portal configuration. The excerpts show server routing and persistence choices, but not the HTML contents or how pages call the API, so those relationships are not inferred.

Main entry points: [`index.js`](https://github.com/robertmagic52/realmindreadingsystem/blob/main/index.js) (Express server), [`index.html`](https://github.com/robertmagic52/realmindreadingsystem/blob/main/index.html) (Main page), [`history.html`](https://github.com/robertmagic52/realmindreadingsystem/blob/main/history.html) (History page)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web interface"]
  node_index_page["Main page<br/>[index.html]"]
  node_history_page["History page<br/>[history.html]"]
end

subgraph group_capture["Capture and history"]
  node_server["Express server<br/>[index.js]"]
  node_health["Health route<br/>[index.js]"]
  node_submission_routes["Submission routes<br/>[index.js]"]
  node_submission_store[("Submission storage<br/>[index.js]")]
  node_summary_routes["Summary routes<br/>[index.js]"]
  node_summary_store[("Summary storage<br/>[index.js]")]
  node_deletion_routes["Deletion routes<br/>[index.js]"]
end

subgraph group_management["Portal management"]
  node_portal_routes["Portal routes<br/>[index.js]"]
  node_portal_store[("Portal configuration<br/>[index.js]")]
end

node_visitor(("Visitor"))
node_mongodb[("MongoDB")]

node_visitor -->|"sends requests"| node_server
node_server -->|"serves at /"| node_index_page
node_server -->|"serves at /history"| node_history_page
node_server -->|"registers route"| node_health
node_server -->|"registers routes"| node_submission_routes
node_server -->|"registers routes"| node_summary_routes
node_server -->|"registers routes"| node_deletion_routes
node_server -->|"registers routes"| node_portal_routes
node_submission_routes -->|"reads and writes"| node_submission_store
node_submission_routes -->|"queries and saves"| node_mongodb
node_summary_routes -->|"reads and writes"| node_summary_store
node_summary_routes -->|"queries and saves"| node_mongodb
node_deletion_routes -->|"deletes from"| node_submission_store
node_deletion_routes -->|"deletes from"| node_summary_store
node_deletion_routes -->|"deletes records"| node_mongodb
node_portal_routes -->|"reads and saves"| node_portal_store
node_portal_routes -->|"queries and saves"| node_mongodb

click node_index_page "https://github.com/robertmagic52/realmindreadingsystem/blob/main/index.html"
click node_history_page "https://github.com/robertmagic52/realmindreadingsystem/blob/main/history.html"
click node_server "https://github.com/robertmagic52/realmindreadingsystem/blob/main/index.js"
click node_health "https://github.com/robertmagic52/realmindreadingsystem/blob/main/index.js"
click node_submission_routes "https://github.com/robertmagic52/realmindreadingsystem/blob/main/index.js"
click node_submission_store "https://github.com/robertmagic52/realmindreadingsystem/blob/main/index.js"
click node_summary_routes "https://github.com/robertmagic52/realmindreadingsystem/blob/main/index.js"
click node_summary_store "https://github.com/robertmagic52/realmindreadingsystem/blob/main/index.js"
click node_deletion_routes "https://github.com/robertmagic52/realmindreadingsystem/blob/main/index.js"
click node_portal_routes "https://github.com/robertmagic52/realmindreadingsystem/blob/main/index.js"
click node_portal_store "https://github.com/robertmagic52/realmindreadingsystem/blob/main/index.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_index_page,node_history_page toneBlue
class node_server,node_health,node_submission_routes,node_submission_store,node_summary_routes,node_summary_store,node_deletion_routes,node_mongodb toneAmber
class node_portal_routes,node_portal_store toneMint
class node_visitor toneIndigo
```

## Components

### Web interface

- [Main page](https://github.com/robertmagic52/realmindreadingsystem/blob/main/index.html): `index.html`
- [History page](https://github.com/robertmagic52/realmindreadingsystem/blob/main/history.html): `history.html`

### Capture and history

- [Express server](https://github.com/robertmagic52/realmindreadingsystem/blob/main/index.js): `index.js`
- [Health route](https://github.com/robertmagic52/realmindreadingsystem/blob/main/index.js): `index.js`
- [Submission routes](https://github.com/robertmagic52/realmindreadingsystem/blob/main/index.js): `index.js`
- [Submission storage](https://github.com/robertmagic52/realmindreadingsystem/blob/main/index.js): `index.js`
- [Summary routes](https://github.com/robertmagic52/realmindreadingsystem/blob/main/index.js): `index.js`
- [Summary storage](https://github.com/robertmagic52/realmindreadingsystem/blob/main/index.js): `index.js`
- [Deletion routes](https://github.com/robertmagic52/realmindreadingsystem/blob/main/index.js): `index.js`

### Portal management

- [Portal routes](https://github.com/robertmagic52/realmindreadingsystem/blob/main/index.js): `index.js`
- [Portal configuration](https://github.com/robertmagic52/realmindreadingsystem/blob/main/index.js): `index.js`

### Other components

- **Visitor**
- **MongoDB**

## Connections

- Visitor → Express server: sends requests
- Express server → Main page: serves at / (evidence: `index.js`)
- Express server → History page: serves at /history (evidence: `index.js`)
- Express server → Health route: registers route (evidence: `index.js`)
- Express server → Submission routes: registers routes (evidence: `index.js`)
- Express server → Summary routes: registers routes (evidence: `index.js`)
- Express server → Deletion routes: registers routes (evidence: `index.js`)
- Express server → Portal routes: registers routes (evidence: `index.js`)
- Submission routes → Submission storage: reads and writes (evidence: `index.js`)
- Submission routes → MongoDB: queries and saves (evidence: `index.js`)
- Summary routes → Summary storage: reads and writes (evidence: `index.js`)
- Summary routes → MongoDB: queries and saves (evidence: `index.js`)
- Deletion routes → Submission storage: deletes from (evidence: `index.js`)
- Deletion routes → Summary storage: deletes from (evidence: `index.js`)
- Deletion routes → MongoDB: deletes records (evidence: `index.js`)
- Portal routes → Portal configuration: reads and saves (evidence: `index.js`)
- Portal routes → MongoDB: queries and saves (evidence: `index.js`)
