# rajagopalan-gangadharan/js-os architecture

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

- Interactive diagram: https://gitdiagram.com/rajagopalan-gangadharan/js-os
- Repository: https://github.com/rajagopalan-gangadharan/js-os

## Overview

JS-OS is a browser-based desktop environment: users interact with a desktop and taskbar, launch apps in windows, and use built-in tools for files, editing, calendar, media, games, and blogging. The main runtime path is app registration and dispatch through the window manager; the filesystem supplies shared disk state to file-oriented apps, while the blog app communicates with a remote API. The README also presents the environment as an interactive portfolio. Only selected runtime files were sampled, so links to unsampled subsystems are limited to documented capabilities and clear tree structure.

Main entry points: [`src/handlers.js`](https://github.com/rajagopalan-gangadharan/js-os/blob/rebased/src/handlers.js) (App Dispatcher), [`src/filesystem/main.js`](https://github.com/rajagopalan-gangadharan/js-os/blob/rebased/src/filesystem/main.js) (Virtual Filesystem), [`src/desktop/desktop.js`](https://github.com/rajagopalan-gangadharan/js-os/blob/rebased/src/desktop/desktop.js) (Desktop), [`src/applauncher/applauncher.js`](https://github.com/rajagopalan-gangadharan/js-os/blob/rebased/src/applauncher/applauncher.js) (App Launcher)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_shell["Desktop Shell"]
  node_desktop["Desktop<br/>[desktop.js]"]
  node_taskbar["Taskbar<br/>[taskbar.js]"]
  node_launcher["App Launcher<br/>[applauncher.js]"]
end

subgraph group_runtime["App Runtime"]
  node_dispatcher["App Dispatcher<br/>[handlers.js]"]
  node_window["Window Manager<br/>[window.js]"]
  node_processes["Process Manager<br/>[processmanager.js]"]
end

subgraph group_apps["Built-in Apps"]
  node_explorer["File Explorer<br/>[explorer.js]"]
  node_terminal["Terminal<br/>[terminal.js]"]
  node_editor["Text Editor<br/>[editor.js]"]
  node_codestudio["Code Studio<br/>[codestudio.js]"]
  node_calendar["Calendar<br/>[calendar.js]"]
  node_markdown["Markdown Tools<br/>[markdown_reader.js]"]
  node_pdf["PDF Reader<br/>[pdf.js]"]
  node_images["Image Viewer<br/>[imageviewer.js]"]
  node_notes["Sticky Notes<br/>[stickynotes.js]"]
  node_games["Games<br/>[minesweeper.js]"]
  node_blog["Blog Feed<br/>[BlogHome.js]"]
  node_blogservice["Blog API Service<br/>[blog.service.js]"]
end

subgraph group_state["Shared State"]
  node_filesystem[("Virtual Filesystem<br/>[main.js]")]
  node_filemodel["File Model<br/>[fileClass.js]"]
end

node_user(("User"))
node_backend[("Blog Backend")]

node_user -->|"interacts with"| node_desktop
node_user -->|"launches apps"| node_launcher
node_desktop -->|"shows"| node_taskbar
node_launcher -->|"requests launch"| node_dispatcher
node_dispatcher -->|"renders app"| node_window
node_dispatcher -->|"registers"| node_explorer
node_dispatcher -->|"registers"| node_terminal
node_dispatcher -->|"registers"| node_editor
node_dispatcher -->|"registers"| node_codestudio
node_dispatcher -->|"registers"| node_calendar
node_dispatcher -->|"registers"| node_markdown
node_dispatcher -->|"registers"| node_pdf
node_dispatcher -->|"registers"| node_images
node_dispatcher -->|"registers"| node_notes
node_dispatcher -->|"registers"| node_games
node_dispatcher -->|"registers"| node_blog
node_dispatcher -->|"registers"| node_processes
node_processes -->|"closes process"| node_dispatcher
node_filesystem -->|"creates disk objects"| node_filemodel
node_dispatcher -->|"provides disk"| node_filesystem
node_explorer -->|"uses disk"| node_filesystem
node_terminal -->|"receives disk"| node_filesystem
node_blog -->|"uses service"| node_blogservice
node_blogservice -->|"HTTP requests"| node_backend

click node_desktop "https://github.com/rajagopalan-gangadharan/js-os/blob/rebased/src/desktop/desktop.js"
click node_taskbar "https://github.com/rajagopalan-gangadharan/js-os/blob/rebased/src/desktop/taskbar/taskbar.js"
click node_launcher "https://github.com/rajagopalan-gangadharan/js-os/blob/rebased/src/applauncher/applauncher.js"
click node_dispatcher "https://github.com/rajagopalan-gangadharan/js-os/blob/rebased/src/handlers.js"
click node_window "https://github.com/rajagopalan-gangadharan/js-os/blob/rebased/src/window/window.js"
click node_processes "https://github.com/rajagopalan-gangadharan/js-os/blob/rebased/src/defaultapps/processmanager/processmanager.js"
click node_filesystem "https://github.com/rajagopalan-gangadharan/js-os/blob/rebased/src/filesystem/main.js"
click node_filemodel "https://github.com/rajagopalan-gangadharan/js-os/blob/rebased/src/filesystem/fileClass.js"
click node_explorer "https://github.com/rajagopalan-gangadharan/js-os/blob/rebased/src/defaultapps/explorer/explorer.js"
click node_terminal "https://github.com/rajagopalan-gangadharan/js-os/blob/rebased/src/defaultapps/terminal/terminal.js"
click node_editor "https://github.com/rajagopalan-gangadharan/js-os/blob/rebased/src/defaultapps/texteditor/editor.js"
click node_codestudio "https://github.com/rajagopalan-gangadharan/js-os/blob/rebased/src/defaultapps/codestudio/codestudio.js"
click node_calendar "https://github.com/rajagopalan-gangadharan/js-os/blob/rebased/src/defaultapps/calendar/calendar.js"
click node_markdown "https://github.com/rajagopalan-gangadharan/js-os/blob/rebased/src/defaultapps/markdown/markdown_reader.js"
click node_pdf "https://github.com/rajagopalan-gangadharan/js-os/blob/rebased/src/defaultapps/pdf/pdf.js"
click node_images "https://github.com/rajagopalan-gangadharan/js-os/blob/rebased/src/defaultapps/imageviewer/imageviewer.js"
click node_notes "https://github.com/rajagopalan-gangadharan/js-os/blob/rebased/src/defaultapps/stickynotes/stickynotes.js"
click node_games "https://github.com/rajagopalan-gangadharan/js-os/blob/rebased/src/defaultapps/games/minesweeper/minesweeper.js"
click node_blog "https://github.com/rajagopalan-gangadharan/js-os/blob/rebased/src/defaultapps/blogfeed/components/BlogHome.js"
click node_blogservice "https://github.com/rajagopalan-gangadharan/js-os/blob/rebased/src/defaultapps/blogfeed/services/blog.service.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_desktop,node_taskbar,node_launcher,node_user toneBlue
class node_dispatcher,node_window,node_processes,node_backend toneAmber
class node_explorer,node_terminal,node_editor,node_codestudio,node_calendar,node_markdown,node_pdf,node_images,node_notes,node_games,node_blog,node_blogservice toneMint
class node_filesystem,node_filemodel toneRose
```

## Components

### Desktop Shell

- [Desktop](https://github.com/rajagopalan-gangadharan/js-os/blob/rebased/src/desktop/desktop.js): `src/desktop/desktop.js`
- [Taskbar](https://github.com/rajagopalan-gangadharan/js-os/blob/rebased/src/desktop/taskbar/taskbar.js): `src/desktop/taskbar/taskbar.js`
- [App Launcher](https://github.com/rajagopalan-gangadharan/js-os/blob/rebased/src/applauncher/applauncher.js): `src/applauncher/applauncher.js`

### App Runtime

- [App Dispatcher](https://github.com/rajagopalan-gangadharan/js-os/blob/rebased/src/handlers.js): `src/handlers.js`
- [Window Manager](https://github.com/rajagopalan-gangadharan/js-os/blob/rebased/src/window/window.js): `src/window/window.js`
- [Process Manager](https://github.com/rajagopalan-gangadharan/js-os/blob/rebased/src/defaultapps/processmanager/processmanager.js): `src/defaultapps/processmanager/processmanager.js`

### Built-in Apps

- [File Explorer](https://github.com/rajagopalan-gangadharan/js-os/blob/rebased/src/defaultapps/explorer/explorer.js): `src/defaultapps/explorer/explorer.js`
- [Terminal](https://github.com/rajagopalan-gangadharan/js-os/blob/rebased/src/defaultapps/terminal/terminal.js): `src/defaultapps/terminal/terminal.js`
- [Text Editor](https://github.com/rajagopalan-gangadharan/js-os/blob/rebased/src/defaultapps/texteditor/editor.js): `src/defaultapps/texteditor/editor.js`
- [Code Studio](https://github.com/rajagopalan-gangadharan/js-os/blob/rebased/src/defaultapps/codestudio/codestudio.js): `src/defaultapps/codestudio/codestudio.js`
- [Calendar](https://github.com/rajagopalan-gangadharan/js-os/blob/rebased/src/defaultapps/calendar/calendar.js): `src/defaultapps/calendar/calendar.js`
- [Markdown Tools](https://github.com/rajagopalan-gangadharan/js-os/blob/rebased/src/defaultapps/markdown/markdown_reader.js): `src/defaultapps/markdown/markdown_reader.js`
- [PDF Reader](https://github.com/rajagopalan-gangadharan/js-os/blob/rebased/src/defaultapps/pdf/pdf.js): `src/defaultapps/pdf/pdf.js`
- [Image Viewer](https://github.com/rajagopalan-gangadharan/js-os/blob/rebased/src/defaultapps/imageviewer/imageviewer.js): `src/defaultapps/imageviewer/imageviewer.js`
- [Sticky Notes](https://github.com/rajagopalan-gangadharan/js-os/blob/rebased/src/defaultapps/stickynotes/stickynotes.js): `src/defaultapps/stickynotes/stickynotes.js`
- [Games](https://github.com/rajagopalan-gangadharan/js-os/blob/rebased/src/defaultapps/games/minesweeper/minesweeper.js): `src/defaultapps/games/minesweeper/minesweeper.js`
- [Blog Feed](https://github.com/rajagopalan-gangadharan/js-os/blob/rebased/src/defaultapps/blogfeed/components/BlogHome.js): `src/defaultapps/blogfeed/components/BlogHome.js`
- [Blog API Service](https://github.com/rajagopalan-gangadharan/js-os/blob/rebased/src/defaultapps/blogfeed/services/blog.service.js): `src/defaultapps/blogfeed/services/blog.service.js`

### Shared State

- [Virtual Filesystem](https://github.com/rajagopalan-gangadharan/js-os/blob/rebased/src/filesystem/main.js): `src/filesystem/main.js`
- [File Model](https://github.com/rajagopalan-gangadharan/js-os/blob/rebased/src/filesystem/fileClass.js): `src/filesystem/fileClass.js`

### Other components

- **User**
- **Blog Backend**

## Connections

- User → Desktop: interacts with
- User → App Launcher: launches apps
- Desktop → Taskbar: shows
- App Launcher → App Dispatcher: requests launch
- App Dispatcher → Window Manager: renders app
- App Dispatcher → File Explorer: registers
- App Dispatcher → Terminal: registers
- App Dispatcher → Text Editor: registers
- App Dispatcher → Code Studio: registers
- App Dispatcher → Calendar: registers
- App Dispatcher → Markdown Tools: registers
- App Dispatcher → PDF Reader: registers
- App Dispatcher → Image Viewer: registers
- App Dispatcher → Sticky Notes: registers
- App Dispatcher → Games: registers
- App Dispatcher → Blog Feed: registers
- App Dispatcher → Process Manager: registers
- Process Manager → App Dispatcher: closes process
- Virtual Filesystem → File Model: creates disk objects
- App Dispatcher → Virtual Filesystem: provides disk
- File Explorer → Virtual Filesystem: uses disk
- Terminal → Virtual Filesystem: receives disk
- Blog Feed → Blog API Service: uses service
- Blog API Service → Blog Backend: HTTP requests
