# tr4shcanwesha/obake-os architecture

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

- Interactive diagram: https://gitdiagram.com/tr4shcanwesha/obake-os
- Repository: https://github.com/tr4shcanwesha/obake-os

## Overview

#### Purpose and Runtime
OBAKE-OS is a static, browser-run retro operating-system interface built for the GDG Tech Hunt. It uses vanilla HTML, CSS, and JavaScript; no build system, backend, or service integration is described. The deployable entry document is `index.html`, runnable directly or through a static server.

#### Bootstrap and Asset Composition
`index.html` assembles the desktop shell and loads global OS assets plus application assets. The core runtime is loaded from `script.js` and global presentation from `style.css`; the bundled Wordle app is included through `wordle/wordle.js` and `wordle/wordle.css`. New applications are expected to be added as separately loaded directories rather than folded into the core script.

#### Core OS Shell
The primary OS implementation is `script.js`. It owns reusable desktop-level behavior: desktop/icon interactions, taskbar, Start menu, window lifecycle and management, virtual filesystem behavior, message boxes, and shared utilities. This file is the boundary between generic OS capabilities and individual applications.

Grounding paths:
- `script.js`
- `index.html`
- `style.css`

#### Window and Application Integration Boundary
Applications should invoke shared OS APIs—explicitly including `addDesktopIcon(...)`, `openWindow(...)`, and `showMessageBox(...)`—to appear as first-class desktop applications. This establishes a control flow in which user actions on desktop or menu UI enter the OS layer, which creates/manages a window, then hosts or coordinates application-specific behavior. Application logic should not be added to `script.js` unless it is reusable OS functionality.

Grounding paths:
- `script.js`
- `index.html`
- `wordle/wordle.js`

#### Application Module: Wordle
Wordle is the current dedicated application module. Its behavior is isolated in `wordle/wordle.js`, while its visual rules are isolated in `wordle/wordle.css`. It is expected to reuse the global OS/window integration rather than independently recreating desktop chrome. This module demonstrates the intended extension model for future apps such as Browser, Terminal, Mail, or File Explorer.

Grounding paths:
- `wordle/wordle.js`
- `wordle/wordle.css`
- `script.js`

#### Presentation Layers
Styling is split by architectural scope: `style.css` provides the visual language for the desktop OS shell and shared components, while `wordle/wordle.css` contains application-specific styling. This prevents individual apps from coupling their presentation directly to global OS styles.

Grounding paths:
- `style.css`
- `wordle/wordle.css`
- `index.html`

#### Deployment and Operational Constraints
The project is served as static files, with a live Vercel deployment referenced by the README. Development is directed to the `development` branch before merge to `main`. Hunt-specific logic and clues are intended to remain separate from reusable OS features, preserving the core runtime as a general application platform.

Grounding paths:
- `README.md`
- `index.html`
- `script.js`

Main entry points: [`script.js`](https://github.com/tr4shcanwesha/obake-os/blob/main/script.js) (OS runtime), [`index.html`](https://github.com/tr4shcanwesha/obake-os/blob/main/index.html) (Entry document), [`wordle/wordle.js`](https://github.com/tr4shcanwesha/obake-os/blob/main/wordle/wordle.js) (Wordle logic), [`style.css`](https://github.com/tr4shcanwesha/obake-os/blob/main/style.css) (OS styles)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_shell["OS Shell"]
  node_os_runtime["OS runtime<br/>JavaScript<br/>[script.js]"]
  node_os_styles["OS styles<br/>CSS<br/>[style.css]"]
  node_desktop_ui["Desktop and menus<br/>shell UI<br/>[script.js]"]
  node_window_manager["Window manager<br/>OS capability<br/>[script.js]"]
  node_shared_apis["Application APIs<br/>integration API<br/>[script.js]"]
  node_virtual_fs[("Virtual filesystem<br/>OS capability<br/>[script.js]")]
end

subgraph group_wordle["Wordle App"]
  node_wordle_logic["Wordle logic<br/>JavaScript app<br/>[wordle.js]"]
  node_wordle_styles["Wordle styles<br/>CSS<br/>[wordle.css]"]
end

node_static_host{{"Static hosting<br/>deployment"}}
node_index["Entry document<br/>HTML entry<br/>[index.html]"]
node_future_apps["Future app modules<br/>extension model"]
node_readme["Project guidance<br/>documentation<br/>[README.md]"]

node_static_host -->|"serves"| node_index
node_index -->|"loads"| node_os_runtime
node_index -->|"loads"| node_os_styles
node_index -->|"loads"| node_wordle_logic
node_index -->|"loads"| node_wordle_styles
node_os_runtime -->|"implements"| node_desktop_ui
node_os_runtime -->|"implements"| node_window_manager
node_os_runtime -->|"exposes"| node_shared_apis
node_os_runtime -->|"implements"| node_virtual_fs
node_os_styles -->|"styles"| node_desktop_ui
node_desktop_ui -->|"user actions enter"| node_shared_apis
node_shared_apis -->|"opens and coordinates"| node_window_manager
node_wordle_logic -->|"uses"| node_shared_apis
node_window_manager -->|"hosts"| node_wordle_logic
node_wordle_styles -->|"styles"| node_wordle_logic
node_future_apps -.->|"reuse"| node_shared_apis
node_readme -.->|"documents deployment"| node_static_host

click node_index "https://github.com/tr4shcanwesha/obake-os/blob/main/index.html"
click node_os_runtime "https://github.com/tr4shcanwesha/obake-os/blob/main/script.js"
click node_os_styles "https://github.com/tr4shcanwesha/obake-os/blob/main/style.css"
click node_desktop_ui "https://github.com/tr4shcanwesha/obake-os/blob/main/script.js"
click node_window_manager "https://github.com/tr4shcanwesha/obake-os/blob/main/script.js"
click node_shared_apis "https://github.com/tr4shcanwesha/obake-os/blob/main/script.js"
click node_virtual_fs "https://github.com/tr4shcanwesha/obake-os/blob/main/script.js"
click node_wordle_logic "https://github.com/tr4shcanwesha/obake-os/blob/main/wordle/wordle.js"
click node_wordle_styles "https://github.com/tr4shcanwesha/obake-os/blob/main/wordle/wordle.css"
click node_readme "https://github.com/tr4shcanwesha/obake-os/blob/main/README.md"

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_os_runtime,node_os_styles,node_desktop_ui,node_window_manager,node_shared_apis,node_virtual_fs toneBlue
class node_wordle_logic,node_wordle_styles toneAmber
class node_static_host,node_index,node_future_apps,node_readme toneNeutral
```

## Components

### OS Shell

Reusable desktop platform.

- [OS runtime](https://github.com/tr4shcanwesha/obake-os/blob/main/script.js): JavaScript · Desktop, taskbar, menus, windows, filesystem, and dialogs. · `script.js`
- [OS styles](https://github.com/tr4shcanwesha/obake-os/blob/main/style.css): CSS · Desktop visual language and shared components. · `style.css`
- [Desktop and menus](https://github.com/tr4shcanwesha/obake-os/blob/main/script.js): shell UI · `script.js`
- [Window manager](https://github.com/tr4shcanwesha/obake-os/blob/main/script.js): OS capability · Creates and manages application windows. · `script.js`
- [Application APIs](https://github.com/tr4shcanwesha/obake-os/blob/main/script.js): integration API · Includes addDesktopIcon, openWindow, and showMessageBox. · `script.js`
- [Virtual filesystem](https://github.com/tr4shcanwesha/obake-os/blob/main/script.js): OS capability · `script.js`

### Wordle App

Dedicated application module.

- [Wordle logic](https://github.com/tr4shcanwesha/obake-os/blob/main/wordle/wordle.js): JavaScript app · Isolated application behavior. · `wordle/wordle.js`
- [Wordle styles](https://github.com/tr4shcanwesha/obake-os/blob/main/wordle/wordle.css): CSS · Application-specific visual rules. · `wordle/wordle.css`

### Other components

- **Static hosting**: deployment · Serves the repository as static files.
- [Entry document](https://github.com/tr4shcanwesha/obake-os/blob/main/index.html): HTML entry · Assembles the desktop shell and application assets. · `index.html`
- **Future app modules**: extension model · Separate application directories reuse OS APIs.
- [Project guidance](https://github.com/tr4shcanwesha/obake-os/blob/main/README.md): documentation · Documents deployment and branch workflow. · `README.md`

## Connections

- Static hosting → Entry document: serves
- Entry document → OS runtime: loads
- Entry document → OS styles: loads
- Entry document → Wordle logic: loads
- Entry document → Wordle styles: loads
- OS runtime → Desktop and menus: implements
- OS runtime → Window manager: implements
- OS runtime → Application APIs: exposes
- OS runtime → Virtual filesystem: implements
- OS styles → Desktop and menus: styles
- Desktop and menus → Application APIs: user actions enter
- Application APIs → Window manager: opens and coordinates
- Wordle logic → Application APIs: uses
- Window manager → Wordle logic: hosts
- Wordle styles → Wordle logic: styles
- Future app modules → Application APIs: reuse
- Project guidance → Static hosting: documents deployment
