# gehadelsamadisy/collabspace architecture

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

- Interactive diagram: https://gitdiagram.com/gehadelsamadisy/collabspace
- Repository: https://github.com/gehadelsamadisy/collabspace

## Overview

CollabSpace is a browser-based collaborative workspace. Users register or sign in, then create and share documents or task boards; edits and task moves update other connected collaborators in real time. The graph separates the React experience, authentication and sharing, document collaboration, task management, and the Express/Socket.IO persistence layer. Server excerpts show SQL.js-backed API and socket behavior; unsampled implementation details are represented only where the README documents the capability.

Main entry points: [`server/index.js`](https://github.com/gehadelsamadisy/collabspace/blob/main/server/index.js) (HTTP API routes), [`client/src/App.jsx`](https://github.com/gehadelsamadisy/collabspace/blob/main/client/src/App.jsx) (Workspace routes)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["React workspace"]
  node_app["Workspace routes<br/>[App.jsx]"]
end

subgraph group_identity["Identity and sharing"]
  node_auth["Sign-in and registration<br/>[App.jsx]"]
  node_sharing["Invite collaborators<br/>[App.jsx]"]
end

subgraph group_documents["Document collaboration"]
  node_doclist["Document list<br/>[App.jsx]"]
  node_editor["Document editor<br/>[App.jsx]"]
  node_presence["Live presence<br/>[App.jsx]"]
end

subgraph group_tasks["Task management"]
  node_boardlist["Board list<br/>[App.jsx]"]
  node_board["Kanban board<br/>[App.jsx]"]
  node_taskops["Task editing and drag-drop<br/>[App.jsx]"]
end

subgraph group_backend["API and persistence"]
  node_api["HTTP API routes<br/>[index.js]"]
  node_realtime["Socket event handlers<br/>[index.js]"]
  node_store[("SQL.js workspace data<br/>[index.js]")]
end

node_user(("Team member"))
node_socket{{"Socket.IO service"}}

node_user -->|"uses"| node_app
node_app -->|"routes to"| node_auth
node_auth -.->|"authenticates via"| node_api
node_app -->|"routes to"| node_doclist
node_app -->|"routes to"| node_editor
node_app -->|"routes to"| node_boardlist
node_app -->|"routes to"| node_board
node_doclist -.->|"loads documents"| node_api
node_editor -->|"saves document"| node_api
node_editor -->|"emits edits"| node_socket
node_editor -.->|"renders collaborators"| node_presence
node_presence -->|"joins document"| node_socket
node_socket -.->|"dispatches events"| node_realtime
node_realtime -->|"updates tasks"| node_store
node_realtime -->|"broadcasts updates"| node_socket
node_boardlist -.->|"loads boards"| node_api
node_board -.->|"loads board"| node_api
node_taskops -->|"updates tasks"| node_api
node_taskops -->|"emits task moves"| node_socket
node_board -->|"handles drag-drop"| node_taskops
node_sharing -.->|"shares workspace"| node_api
node_api -->|"reads and writes"| node_store
node_api -->|"broadcasts changes"| node_realtime

click node_app "https://github.com/gehadelsamadisy/collabspace/blob/main/client/src/App.jsx"
click node_auth "https://github.com/gehadelsamadisy/collabspace/blob/main/client/src/App.jsx"
click node_sharing "https://github.com/gehadelsamadisy/collabspace/blob/main/client/src/App.jsx"
click node_doclist "https://github.com/gehadelsamadisy/collabspace/blob/main/client/src/App.jsx"
click node_editor "https://github.com/gehadelsamadisy/collabspace/blob/main/client/src/App.jsx"
click node_presence "https://github.com/gehadelsamadisy/collabspace/blob/main/client/src/App.jsx"
click node_boardlist "https://github.com/gehadelsamadisy/collabspace/blob/main/client/src/App.jsx"
click node_board "https://github.com/gehadelsamadisy/collabspace/blob/main/client/src/App.jsx"
click node_taskops "https://github.com/gehadelsamadisy/collabspace/blob/main/client/src/App.jsx"
click node_api "https://github.com/gehadelsamadisy/collabspace/blob/main/server/index.js"
click node_realtime "https://github.com/gehadelsamadisy/collabspace/blob/main/server/index.js"
click node_store "https://github.com/gehadelsamadisy/collabspace/blob/main/server/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_app toneBlue
class node_auth,node_sharing toneAmber
class node_doclist,node_editor,node_presence toneMint
class node_boardlist,node_board,node_taskops toneRose
class node_api,node_realtime,node_store,node_user,node_socket toneIndigo
```

## Components

### React workspace

- [Workspace routes](https://github.com/gehadelsamadisy/collabspace/blob/main/client/src/App.jsx): `client/src/App.jsx`

### Identity and sharing

- [Sign-in and registration](https://github.com/gehadelsamadisy/collabspace/blob/main/client/src/App.jsx): `client/src/App.jsx`
- [Invite collaborators](https://github.com/gehadelsamadisy/collabspace/blob/main/client/src/App.jsx): `client/src/App.jsx`

### Document collaboration

- [Document list](https://github.com/gehadelsamadisy/collabspace/blob/main/client/src/App.jsx): `client/src/App.jsx`
- [Document editor](https://github.com/gehadelsamadisy/collabspace/blob/main/client/src/App.jsx): `client/src/App.jsx`
- [Live presence](https://github.com/gehadelsamadisy/collabspace/blob/main/client/src/App.jsx): `client/src/App.jsx`

### Task management

- [Board list](https://github.com/gehadelsamadisy/collabspace/blob/main/client/src/App.jsx): `client/src/App.jsx`
- [Kanban board](https://github.com/gehadelsamadisy/collabspace/blob/main/client/src/App.jsx): `client/src/App.jsx`
- [Task editing and drag-drop](https://github.com/gehadelsamadisy/collabspace/blob/main/client/src/App.jsx): `client/src/App.jsx`

### API and persistence

- [HTTP API routes](https://github.com/gehadelsamadisy/collabspace/blob/main/server/index.js): `server/index.js`
- [Socket event handlers](https://github.com/gehadelsamadisy/collabspace/blob/main/server/index.js): `server/index.js`
- [SQL.js workspace data](https://github.com/gehadelsamadisy/collabspace/blob/main/server/index.js): `server/index.js`

### Other components

- **Team member**
- **Socket.IO service**

## Connections

- Team member → Workspace routes: uses (evidence: `README.md`)
- Workspace routes → Sign-in and registration: routes to (evidence: `client/src/App.jsx`)
- Sign-in and registration → HTTP API routes: authenticates via
- Workspace routes → Document list: routes to (evidence: `client/src/App.jsx`)
- Workspace routes → Document editor: routes to (evidence: `client/src/App.jsx`)
- Workspace routes → Board list: routes to (evidence: `client/src/App.jsx`)
- Workspace routes → Kanban board: routes to (evidence: `client/src/App.jsx`)
- Document list → HTTP API routes: loads documents
- Document editor → HTTP API routes: saves document (evidence: `client/src/App.jsx`)
- Document editor → Socket.IO service: emits edits (evidence: `client/src/App.jsx`)
- Document editor → Live presence: renders collaborators (evidence: `client/src/App.jsx`)
- Live presence → Socket.IO service: joins document (evidence: `client/src/App.jsx`)
- Socket.IO service → Socket event handlers: dispatches events
- Socket event handlers → SQL.js workspace data: updates tasks (evidence: `server/index.js`)
- Socket event handlers → Socket.IO service: broadcasts updates (evidence: `server/index.js`)
- Board list → HTTP API routes: loads boards
- Kanban board → HTTP API routes: loads board
- Task editing and drag-drop → HTTP API routes: updates tasks (evidence: `client/src/App.jsx`)
- Task editing and drag-drop → Socket.IO service: emits task moves (evidence: `client/src/App.jsx`)
- Kanban board → Task editing and drag-drop: handles drag-drop (evidence: `client/src/App.jsx`)
- Invite collaborators → HTTP API routes: shares workspace
- HTTP API routes → SQL.js workspace data: reads and writes (evidence: `server/index.js`)
- HTTP API routes → Socket event handlers: broadcasts changes (evidence: `server/index.js`)
