How libersoft-org/yellow-os works
1. High-level shape
Yellow OS is a browser-based desktop environment, with the frontend doing almost all of the real work. The repo is split into a Svelte UI application and a small Bun backend scaffold. The architecture is therefore client-heavy, with the browser acting as the OS runtime and persistent storage layer.
2. Application shell and entrypoints
The frontend uses a Svelte/SvelteKit-style route structure (src/routes/+layout.svelte, +page.svelte, +layout.ts) as the top-level shell. app.html and app.css define the document and global styling. The first-screen experience is a desktop-like UI rather than a conventional website page.
3. Desktop environment subsystem
The core of the product is the desktop shell in src/components/Desktop, Taskbar, WindowManager, AppSwitcher, Statusbar, Notification, Dialog, and related pieces. These components form the OS chrome: desktop icons, taskbar/start menu, window controls, virtual desktops, notifications, drag overlays, and modal dialogs. This is the main interaction boundary that all apps plug into.
4. Windowing and interaction state
Window behavior is managed by dedicated client-side logic in src/scripts/window and paired window components. This layer handles window context, resizing, shortcuts, snapping, and window state stores. It is the coordination layer between app content and the shell, and it is what makes app panes behave like desktop windows instead of ordinary page sections.
5. App model and registration
Individual apps live under src/apps, each with its own Svelte component and sometimes companion TypeScript modules. src/scripts/system/app-registry.ts suggests a registry-based model for discovering and launching apps. The architecture treats apps as pluggable modules that are launched inside the shell rather than as separate routes or pages.
6. App Player as a special runtime boundary
AppPlayer is distinct from the built-in apps: it is intended to run custom apps inside Yellow OS. The presence of Doom.yapp, app-player-api.ts, and app-player.ts indicates a file/package-based app format with a dedicated API surface. This is an important boundary because it separates first-party shell capabilities from user-provided or externally packaged app logic.
7. File system and storage layer
The file subsystem is centered on browser OPFS (Origin Private File System). The logic in src/scripts/fs covers file entries, actions, clipboard, links, downloads, file type handling, conflict resolution, progress reporting, and OPFS initialization/notifications. The storage UI under src/components/Storage provides browsing, properties, rename, new item creation, and drive-level dialogs. This is the main persistence layer for files, folders, and user data.
8. System state and settings
Global OS state lives in src/scripts/system and is exposed through Svelte stores. This includes desktop settings, taskbar behavior, notifications, factory reset, product metadata, printing/format helpers, and system-wide app/session state. The Settings app is split into desktop, notifications, taskbar, and reset sections, mirroring the same system boundaries in the UI.
9. Shared UI component library
The src/components tree is a reusable design system for the whole OS: buttons, inputs, lists, toolbars, menus, icons, progress indicators, spinners, breadcrumbs, pie charts, and more. These are not app-specific; they are the presentation primitives used by the shell and all bundled applications.
10. Bundled applications
The included apps show the intended OS-like scope: File Browser, File Manager, Image Viewer, Media Player, Text Editor, Calculator, Pong, Snake, and About. Most of these apps are thin UI wrappers over shared shell and file APIs rather than isolated services, which means they rely heavily on the common desktop/window/file subsystems.
11. Backend boundary
The backend/ directory exists but is explicitly described as “not used yet” in the README. It is a Bun application scaffold with its own build script and TypeScript config, but the current architecture does not depend on backend services for core functionality. For diagramming purposes, it should be shown as an inactive/prepared server-side boundary rather than a live dependency.
12. Build and runtime model
The repo is organized as a monorepo with separate frontend/backend package roots, shared Bun tooling, and scripts for building, testing, formatting, and dev startup. The production behavior is primarily a single-page desktop web app running in the browser, with browser storage and client-side state managing the OS experience.
Main entry points: Desktop.svelte Desktop shell · WindowManager.svelte Window manager · components Shared UI · apps Bundled apps
Components 16
Frontend
Browser-based desktop OS application and shared client logic
- App shell · Top-level browser entry and layout for the desktop experience
frontend/src/routes/+layout.svelte - Desktop shell · Desktop, taskbar, statusbar, notifications, and window chrome
frontend/src/components/Desktop/Desktop.svelte - Taskbar · Taskbar, desktops, clock, and app list
frontend/src/components/Taskbar/Taskbar.svelte - Window manager · Window lifecycle, controls, titlebars, shortcuts, resize, and snap behavior
frontend/src/components/WindowManager/WindowManager.svelte - App switcher · Tracks running apps and active app switching
frontend/src/scripts/system/app-switcher.svelte.ts - Bundled apps · Built-in desktop apps launched inside the shell
frontend/src/apps - App Player · Runs packaged custom apps through a dedicated API boundary
frontend/src/apps/AppPlayer/AppPlayer.svelte - App registry · Registers and launches available apps inside the OS
frontend/src/scripts/system/app-registry.ts - File system · Browser file operations, links, downloads, conflicts, and persistence initialization
frontend/src/scripts/fs/opfs.ts - Storage UI · Storage browser, properties, rename, create, and drive dialogs
frontend/src/components/Storage/StorageBrowser.svelte - Settings · Desktop, notifications, taskbar, and reset configuration screens
frontend/src/apps/Settings/Settings.svelte - System state · Desktop settings, product metadata, formatting, printing, and reset state
frontend/src/scripts/system/settings.svelte.ts - Shared UI · Reusable buttons, inputs, menus, lists, progress, and layout primitives
frontend/src/components - Notifications · Notification stack and dialog interactions
frontend/src/scripts/ui/notifications.svelte.ts - Drag state · Pointer gestures, selection, and drag overlays used across the shell
frontend/src/scripts/ui/drag-state.svelte.ts
Backend
Prepared Bun server scaffold, currently not used by the core app
- Backend app · Server-side entrypoint present but not used by the current product flow
backend/src/app.ts
Connections 18
- App shell → Desktop shell: renders · The app shell mounts the desktop experience
- App shell → Shared UI: uses · Global UI primitives are used throughout the shell
- Desktop shell → Taskbar: contains · Desktop shell includes the taskbar and related chrome
- Desktop shell → Window manager: hosts · Desktop coordinates window placement and controls
- Desktop shell → Notifications: shows · Desktop surfaces notifications and dialogs
- Window manager → App switcher: coordinates · Window manager participates in app activation and switching
- App registry → Bundled apps: launches · Registry resolves and starts bundled applications
- App registry → App Player: launches · Registry also exposes the custom app runtime
- Bundled apps → Window manager: run in · Bundled apps live inside managed windows
- Bundled apps → File system: use · Many apps depend on browser file and storage APIs
- App Player → File system: uses · Custom apps can access storage through the app runtime boundary
- File system → Storage UI: drives · File operations power the storage browsing and editing UI
- Settings → System state: configures · Settings screens update shared OS state
- Settings → Shared UI: uses · Settings is built from common UI primitives
- Storage UI → Shared UI: uses · Storage tools are assembled from shared components
- Notifications → Shared UI: uses · Notification presentation relies on shared UI pieces
- Drag state → Window manager: supports · Drag and selection state feeds window interactions
- Backend app → App shell: not in core flow · Backend scaffold exists but is not part of the main runtime path