# rejwanshafi25/rejboard architecture

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

- Interactive diagram: https://gitdiagram.com/rejwanshafi25/rejboard
- Repository: https://github.com/rejwanshafi25/rejboard

## Overview

RejBoard is a local-first whiteboard and handwriting notebook, delivered as an Electron desktop app and an installable offline web app. The principal workflow is creating or opening a board, adding handwritten or other content, and keeping boards and recordings on the device. The README also documents organization, PDF/document import, recordings, embedded browsing, recognition, and LAN sharing. The renderer is represented by index.html because its source was not sampled; feature nodes use that same path. Edges reflect README statements or visible source calls; renderer internals are therefore not inferred.

Main entry points: [`index.html`](https://github.com/rejwanshafi25/rejboard/blob/main/index.html) (App interface), [`main.js`](https://github.com/rejwanshafi25/rejboard/blob/main/main.js) (Electron main process), [`preload.js`](https://github.com/rejwanshafi25/rejboard/blob/main/preload.js) (Renderer bridge), [`server.py`](https://github.com/rejwanshafi25/rejboard/blob/main/server.py) (Local web server)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_board["Boards and content"]
  node_renderer["App interface<br/>[index.html]"]
  node_canvas["Board canvas<br/>[index.html]"]
  node_organization["Board organization<br/>[index.html]"]
  node_pdf["PDF and documents<br/>[index.html]"]
  node_recordings["Voice recordings<br/>[index.html]"]
  node_browser["Browser and video<br/>[index.html]"]
  node_recognition["Handwriting recognition<br/>[index.html]"]
  node_boardstore[("Local board data")]
end

subgraph group_desktop["Desktop services"]
  node_electron["Electron main process<br/>[main.js]"]
  node_bridge["Renderer bridge<br/>[preload.js]"]
  node_google["Google handwriting service"]
  node_documentconvert["Document conversion<br/>[main.js]"]
  node_remoteimage["Remote image fetch<br/>[main.js]"]
  node_webserver["Local web server<br/>[server.py]"]
end

subgraph group_offline["Offline web"]
  node_serviceworker["Offline cache<br/>[sw.js]"]
end

subgraph group_sharing["Local sharing"]
  node_lan["LAN transfer<br/>[lan.js]"]
end

node_user(("User"))
node_peer(("Nearby computer"))

node_user -->|"uses"| node_renderer
node_renderer -->|"creates content"| node_canvas
node_renderer -->|"organizes boards"| node_organization
node_renderer -->|"imports and annotates"| node_pdf
node_renderer -->|"records audio"| node_recordings
node_renderer -->|"opens panels"| node_browser
node_renderer -->|"requests conversion"| node_recognition
node_renderer -->|"stores locally"| node_boardstore
node_renderer -->|"uses exposed APIs"| node_bridge
node_bridge -->|"invokes IPC"| node_electron
node_electron -->|"sends ink"| node_google
node_electron -->|"converts files"| node_documentconvert
node_electron -->|"fetches images"| node_remoteimage
node_electron -->|"registers sharing"| node_lan
node_user -->|"runs locally"| node_webserver
node_webserver -->|"proxies recognition"| node_google
node_user -->|"uses offline app"| node_serviceworker
node_lan -->|"transfers boards"| node_peer

click node_renderer "https://github.com/rejwanshafi25/rejboard/blob/main/index.html"
click node_canvas "https://github.com/rejwanshafi25/rejboard/blob/main/index.html"
click node_organization "https://github.com/rejwanshafi25/rejboard/blob/main/index.html"
click node_pdf "https://github.com/rejwanshafi25/rejboard/blob/main/index.html"
click node_recordings "https://github.com/rejwanshafi25/rejboard/blob/main/index.html"
click node_browser "https://github.com/rejwanshafi25/rejboard/blob/main/index.html"
click node_recognition "https://github.com/rejwanshafi25/rejboard/blob/main/index.html"
click node_electron "https://github.com/rejwanshafi25/rejboard/blob/main/main.js"
click node_bridge "https://github.com/rejwanshafi25/rejboard/blob/main/preload.js"
click node_documentconvert "https://github.com/rejwanshafi25/rejboard/blob/main/main.js"
click node_remoteimage "https://github.com/rejwanshafi25/rejboard/blob/main/main.js"
click node_webserver "https://github.com/rejwanshafi25/rejboard/blob/main/server.py"
click node_serviceworker "https://github.com/rejwanshafi25/rejboard/blob/main/sw.js"
click node_lan "https://github.com/rejwanshafi25/rejboard/blob/main/lan.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_renderer,node_canvas,node_organization,node_pdf,node_recordings,node_browser,node_recognition,node_boardstore,node_user toneBlue
class node_electron,node_bridge,node_google,node_documentconvert,node_remoteimage,node_webserver toneAmber
class node_serviceworker toneMint
class node_lan toneRose
class node_peer toneIndigo
```

## Components

### Boards and content

- [App interface](https://github.com/rejwanshafi25/rejboard/blob/main/index.html): `index.html`
- [Board canvas](https://github.com/rejwanshafi25/rejboard/blob/main/index.html): `index.html`
- [Board organization](https://github.com/rejwanshafi25/rejboard/blob/main/index.html): `index.html`
- [PDF and documents](https://github.com/rejwanshafi25/rejboard/blob/main/index.html): `index.html`
- [Voice recordings](https://github.com/rejwanshafi25/rejboard/blob/main/index.html): `index.html`
- [Browser and video](https://github.com/rejwanshafi25/rejboard/blob/main/index.html): `index.html`
- [Handwriting recognition](https://github.com/rejwanshafi25/rejboard/blob/main/index.html): `index.html`
- **Local board data**

### Desktop services

- [Electron main process](https://github.com/rejwanshafi25/rejboard/blob/main/main.js): `main.js`
- [Renderer bridge](https://github.com/rejwanshafi25/rejboard/blob/main/preload.js): `preload.js`
- **Google handwriting service**
- [Document conversion](https://github.com/rejwanshafi25/rejboard/blob/main/main.js): `main.js`
- [Remote image fetch](https://github.com/rejwanshafi25/rejboard/blob/main/main.js): `main.js`
- [Local web server](https://github.com/rejwanshafi25/rejboard/blob/main/server.py): `server.py`

### Offline web

- [Offline cache](https://github.com/rejwanshafi25/rejboard/blob/main/sw.js): `sw.js`

### Local sharing

- [LAN transfer](https://github.com/rejwanshafi25/rejboard/blob/main/lan.js): `lan.js`

### Other components

- **User**
- **Nearby computer**

## Connections

- User → App interface: uses (evidence: `README.md`)
- App interface → Board canvas: creates content (evidence: `README.md`)
- App interface → Board organization: organizes boards (evidence: `README.md`)
- App interface → PDF and documents: imports and annotates (evidence: `README.md`)
- App interface → Voice recordings: records audio (evidence: `README.md`)
- App interface → Browser and video: opens panels (evidence: `README.md`)
- App interface → Handwriting recognition: requests conversion (evidence: `README.md`)
- App interface → Local board data: stores locally (evidence: `README.md`)
- App interface → Renderer bridge: uses exposed APIs (evidence: `preload.js`)
- Renderer bridge → Electron main process: invokes IPC (evidence: `preload.js`)
- Electron main process → Google handwriting service: sends ink (evidence: `main.js`)
- Electron main process → Document conversion: converts files (evidence: `main.js`)
- Electron main process → Remote image fetch: fetches images (evidence: `main.js`)
- Electron main process → LAN transfer: registers sharing (evidence: `main.js`)
- User → Local web server: runs locally (evidence: `server.py`)
- Local web server → Google handwriting service: proxies recognition (evidence: `server.py`)
- User → Offline cache: uses offline app (evidence: `README.md`)
- LAN transfer → Nearby computer: transfers boards (evidence: `README.md`)
