# harshvardhan9084/shareonweb architecture

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

- Interactive diagram: https://gitdiagram.com/harshvardhan9084/shareonweb
- Repository: https://github.com/harshvardhan9084/shareonweb

## Overview

Toolhive combines on-device utility tools with temporary, code-joined sessions for sharing and collaboration. The main journey is browsing or opening a tool, then creating or joining a session whose live room connects participants and exposes session features. Session records are handled through API routes and a configurable store. The excerpts establish the app-shell routing, room-client socket behavior, and storage options; most individual tool panels and relay internals were not sampled, so their detailed links are omitted.

Main entry points: [`src/components/platform/app-shell.tsx`](https://github.com/harshvardhan9084/shareonweb/blob/main/src/components/platform/app-shell.tsx) (App shell), [`src/components/platform/session-view.tsx`](https://github.com/harshvardhan9084/shareonweb/blob/main/src/components/platform/session-view.tsx) (Session view), [`src/lib/session-store.ts`](https://github.com/harshvardhan9084/shareonweb/blob/main/src/lib/session-store.ts) (Session store), [`src/components/instant`](https://github.com/harshvardhan9084/shareonweb/tree/main/src/components/instant) (Instant tools)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_platform["Tool discovery"]
  node_shell["App shell<br/>[app-shell.tsx]"]
  node_catalog["Tool catalog<br/>[registry.ts]"]
  node_instant["Instant tools"]
  node_app_landing["Tool landing"]
  node_instant_set["Utility tool set<br/>[instant-kit.tsx]"]
end

subgraph group_sessions["Live sessions"]
  node_session_view["Session view<br/>[session-view.tsx]"]
  node_room_client["Room client<br/>[room-client.ts]"]
end

subgraph group_features["Session capabilities"]
  node_collaboration["Collaborative panels"]
  node_calls["Audio and video calls<br/>[call-panel.tsx]"]
end

subgraph group_backend["Session services"]
  node_session_api["Session API"]
  node_session_store["Session store<br/>[session-store.ts]"]
  node_database[("Database<br/>[db.ts]")]
  node_relay["Relay service<br/>[index.ts]"]
end

node_user(("Tool user"))

node_user -->|"opens app"| node_shell
node_shell -->|"selects tools"| node_catalog
node_shell -->|"renders instant"| node_instant
node_shell -->|"renders landing"| node_app_landing
node_shell -->|"opens session"| node_session_view
node_session_view -->|"uses room client"| node_room_client
node_session_view -->|"renders panels"| node_collaboration
node_session_view -->|"offers calling"| node_calls
node_room_client -->|"socket connection"| node_relay
node_session_view -->|"closes session"| node_session_api
node_session_api -->|"handles records"| node_session_store
node_session_store -->|"reads and writes"| node_database
node_session_store -->|"proxies control API"| node_relay
node_instant -.->|"provides tools"| node_instant_set

click node_shell "https://github.com/harshvardhan9084/shareonweb/blob/main/src/components/platform/app-shell.tsx"
click node_catalog "https://github.com/harshvardhan9084/shareonweb/blob/main/src/lib/registry.ts"
click node_instant "https://github.com/harshvardhan9084/shareonweb/tree/main/src/components/instant"
click node_app_landing "https://github.com/harshvardhan9084/shareonweb/blob/main/src/components/platform/app-landing-view.tsx"
click node_session_view "https://github.com/harshvardhan9084/shareonweb/blob/main/src/components/platform/session-view.tsx"
click node_room_client "https://github.com/harshvardhan9084/shareonweb/blob/main/src/lib/room-client.ts"
click node_session_api "https://github.com/harshvardhan9084/shareonweb/tree/main/src/app/api/sessions"
click node_session_store "https://github.com/harshvardhan9084/shareonweb/blob/main/src/lib/session-store.ts"
click node_database "https://github.com/harshvardhan9084/shareonweb/blob/main/src/lib/db.ts"
click node_relay "https://github.com/harshvardhan9084/shareonweb/blob/main/mini-services/relay-service/index.ts"
click node_collaboration "https://github.com/harshvardhan9084/shareonweb/tree/main/src/components/session"
click node_calls "https://github.com/harshvardhan9084/shareonweb/blob/main/src/components/session/call-panel.tsx"
click node_instant_set "https://github.com/harshvardhan9084/shareonweb/blob/main/src/components/instant/instant-kit.tsx"

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_shell,node_catalog,node_instant,node_app_landing,node_instant_set,node_user toneBlue
class node_session_view,node_room_client toneAmber
class node_collaboration,node_calls toneMint
class node_session_api,node_session_store,node_database,node_relay toneRose
```

## Components

### Tool discovery

- [App shell](https://github.com/harshvardhan9084/shareonweb/blob/main/src/components/platform/app-shell.tsx): `src/components/platform/app-shell.tsx`
- [Tool catalog](https://github.com/harshvardhan9084/shareonweb/blob/main/src/lib/registry.ts): `src/lib/registry.ts`
- [Instant tools](https://github.com/harshvardhan9084/shareonweb/tree/main/src/components/instant): `src/components/instant`
- [Tool landing](https://github.com/harshvardhan9084/shareonweb/blob/main/src/components/platform/app-landing-view.tsx): `src/components/platform/app-landing-view.tsx`
- [Utility tool set](https://github.com/harshvardhan9084/shareonweb/blob/main/src/components/instant/instant-kit.tsx): `src/components/instant/instant-kit.tsx`

### Live sessions

- [Session view](https://github.com/harshvardhan9084/shareonweb/blob/main/src/components/platform/session-view.tsx): `src/components/platform/session-view.tsx`
- [Room client](https://github.com/harshvardhan9084/shareonweb/blob/main/src/lib/room-client.ts): `src/lib/room-client.ts`

### Session capabilities

- [Collaborative panels](https://github.com/harshvardhan9084/shareonweb/tree/main/src/components/session): `src/components/session`
- [Audio and video calls](https://github.com/harshvardhan9084/shareonweb/blob/main/src/components/session/call-panel.tsx): `src/components/session/call-panel.tsx`

### Session services

- [Session API](https://github.com/harshvardhan9084/shareonweb/tree/main/src/app/api/sessions): `src/app/api/sessions`
- [Session store](https://github.com/harshvardhan9084/shareonweb/blob/main/src/lib/session-store.ts): `src/lib/session-store.ts`
- [Database](https://github.com/harshvardhan9084/shareonweb/blob/main/src/lib/db.ts): `src/lib/db.ts`
- [Relay service](https://github.com/harshvardhan9084/shareonweb/blob/main/mini-services/relay-service/index.ts): `mini-services/relay-service/index.ts`

### Other components

- **Tool user**

## Connections

- Tool user → App shell: opens app
- App shell → Tool catalog: selects tools (evidence: `src/components/platform/app-shell.tsx`)
- App shell → Instant tools: renders instant (evidence: `src/components/platform/app-shell.tsx`)
- App shell → Tool landing: renders landing (evidence: `src/components/platform/app-shell.tsx`)
- App shell → Session view: opens session (evidence: `src/components/platform/app-shell.tsx`)
- Session view → Room client: uses room client (evidence: `src/components/platform/session-view.tsx`)
- Session view → Collaborative panels: renders panels (evidence: `src/components/platform/session-view.tsx`)
- Session view → Audio and video calls: offers calling (evidence: `src/components/platform/session-view.tsx`)
- Room client → Relay service: socket connection (evidence: `src/lib/room-client.ts`)
- Session view → Session API: closes session (evidence: `src/components/platform/session-view.tsx`)
- Session API → Session store: handles records (evidence: `src/app/api/sessions/[code]/route.ts`)
- Session store → Database: reads and writes (evidence: `src/lib/session-store.ts`)
- Session store → Relay service: proxies control API (evidence: `src/lib/session-store.ts`)
- Instant tools → Utility tool set: provides tools
