daedalOS

repository·main·Indexed 12 days ago

https://github.com/dustinbrett/daedalos

A comprehensive desktop environment running entirely in the browser. Version 2.0.0 features a BrowserFS-powered file system with IndexedDB persistence, window management, a taskbar, and built-in applications including BoxedWine, EmulatorJS, js-dos, Monaco Editor, and a Nostr-based Messenger.

Tokens
13.5K
Snippets
60
Records
76
Agent score
95%

What's inside daedalOS

  1. Overview of daedalOS System Features

    main

    daedalOS is a desktop environment in the browser. Its core system components include:

    • File System: Powered by BrowserFS, it supports drag & drop, ZIP/ISO read support, and writes to IndexedDB. It includes a File Explorer with thumbnail/details views and context menus for file manipulation (cut, copy, rename, etc.).
    • Windows: Resizable and draggable windows that persist size, position, and maximized states. They feature minimize, maximize, and close functionality with animations.
    • Start Menu: An expandable sidebar containing an apps list, document/media shortcuts, and a Power option to clear the session. It can be opened with SHIFT+ESC (or the Windows Key in fullscreen).
    • Taskbar: Includes window hover previews (Peek), a focused window indicator, a search menu with recent files, and an AI Chat Agent.
    • Clock: Runs in a Web Worker using OffscreenCanvas, supporting NTP server time mode and syncing to the system clock.
    • Background & Screensaver: Supports dynamic animated wallpapers (Waves, Hexells, Matrix, etc.), custom images/videos, and various API-driven sources like NASA's Astronomy Picture of the Day.
  2. daedalOS Dependencies and Third-Party Libraries

    main

    daedalOS is a browser-based desktop environment built using a wide array of open-source frameworks, core libraries, and specialized system/app libraries. Developers looking to extend or understand the system should be aware of the following key technologies used:

    Core Frameworks

    • UI & Logic: React, Next.js, TypeScript, styled-components
    • Animation & Interaction: Framer Motion, react-rnd
    • File System: BrowserFS

    Specialized Capabilities

    • Media & Graphics: FFmpeg (via ffmpeg.wasm), ImageMagick (WASM), Video.js, PDF.js, and various image decoders (jxl.js, libheif-js, UTIF.js).
    • Emulation & Virtualization: v86 (Virtual x86), emulatorjs, js-dos, Ruffle (Flash), and Pyodide (Python).
    • Code & Text Editing: Monaco Editor, Xterm.js, Vim.js, and TinyMCE.
    • AI & Machine Learning: WebLLM and Web Stable Diffusion.
    • Networking & Data: isomorphic-git, Lunr (search), and various CORS proxies for service integration.

    External Services

    • The system integrates with several public APIs including NASA (APOD), The Met (MMoA), Art Institute of Chicago, and various DNS-over-HTTPS providers (Cloudflare, Google).
  3. Planned features and roadmap for daedalOS

    main
    The IDEAS.md file outlines the future development roadmap for daedalOS, categorized by priority levels (High, Medium, Low) and functional domains. This includes planned support for 3rd party apps, accessibility improvements, PWA capabilities (offline support and service workers), and various system-level enhancements like internationalization, system tray icons, and task management.
  4. Planned programming language and runtime support

    main

    daedalOS aims to integrate several programming languages and runtimes into its environment. Planned or considered integrations include:

    • WebAssembly/WASM based: PHP (php-wasm), Go (GopherJS), R (webR), and various WASM-based code playgrounds (Sandpack, WebContainers).
    • JavaScript/TypeScript based: Scala (Scala.js), SQL (SQL.JS, AlaSQL), and Jupyter (JupyterLite).
    • Other: JVM (CheerpJ), Perl (WebPerl), and various code playgrounds like LiveCodes and Runno.
  5. Planned media and document viewer capabilities

    main

    The roadmap includes expanding the types of files daedalOS can natively view or edit:

    • Documents: PDF creation (jsPDF, PDF-LIB), DOCX (docx2html, docx), ODF (WebODF), and EPUB (Epub.js).
    • Images: Photo editing (miniPaint, DPaint, Cropper.js), background removal, and support for formats like JPEG2000, TGA, RAW, and PSD.
    • Audio: Audio editing (Wavacity, AudioMass), waveform visualization (peaks.js, wavesurfer.js), and MIDI support (timidity, MIDI.js).
    • Video: Support for various codecs via libav.js, mp4box.js, and jsmpeg.
  6. Planned emulator and gaming integrations

    main

    daedalOS plans to host various emulators and web-based games, including:

    • Emulators: ARM, x86-64, Linux, Mac OS 8, Palm, and Commodore 64.
    • Games: Doom (WASM), Tetris, Minesweeper, Solitaire, and various implementations of the Game of Life.
  7. Planned file system and information integrations

    main

    Future file system capabilities for daedalOS include:

    • File System Adapters: native-file-system-adapter, WebDAV, and harextract.
    • File Information/Metadata: PDF processing (Localpdf.tech), EXIF data extraction (Exif.js, EXIFR).
    • Cloud Integration: OneDrive file system integration.
  8. Install and run daedalOS locally

    main

    To run daedalOS in a development environment, ensure you have Node.js and Yarn installed. Follow these steps:

    Development Setup

    Use these commands to install dependencies, run prebuild tasks, and start the development server:

    yarn install
    yarn build:prebuild
    yarn dev

    Production Setup

    To build and serve the production version:

    yarn install
    yarn build
    yarn serve

    Troubleshooting OpenSSL Errors

    If you encounter the error digital envelope routines::unsupported during yarn install, set the NODE_OPTIONS environment variable to use the legacy provider:

    export NODE_OPTIONS=--openssl-legacy-provider
  9. Add Tracky Mouse to your web project

    main

    Tracky Mouse is a JavaScript library that allows you to implement head-tracking UI in web applications. You can install it via npm and then initialize it by setting the dependenciesRoot and calling loadDependencies() followed by init().

    Note: The library uses clmtrackr.js for lightweight tracking and switches to facemesh (TensorFlow.js) for higher accuracy once loaded. You must manually handle the mapping of the tracked coordinates to DOM events (like PointerEvent) to make the tracking interact with your application's UI.

    <script src="node_modules/tracky-mouse/tracky-mouse.js"></script>
    <script>
    	TrackyMouse.dependenciesRoot = "node_modules/tracky-mouse";
    	TrackyMouse.loadDependencies().then(function() {
    		TrackyMouse.init();
    
    		// Example: Mapping TrackyMouse output to PointerEvents
    		TrackyMouse.onPointerMove = (x, y) => {
    			const target = document.elementFromPoint(x, y) || document.body;
    			// ... dispatch PointerEvent('pointermove', ...) to target
    		};
    	});
    </script>
  10. Development Setup for Tracky Mouse

    main

    To develop Tracky Mouse or run the desktop application from source, follow these steps:

    1. Clone the repository.
    2. Install Node.js.
    3. Run npm install in the project root.

    For the Electron Desktop App:

    1. Install RobotJS build dependencies.
      • On Ubuntu: sudo apt-get install libxtst-dev libpng++-dev build-essential python2.7
    2. Navigate to the electron directory: cd tracky-mouse-electron
    3. Run npm install.
    4. To start the app, run npm start from within the tracky-mouse-electron folder.
    npm install
    cd tracky-mouse-electron && npm install
    npm start
  11. Use URL query parameters to load specific apps or files

    main

    You can control the initial state of daedalOS using URL query parameters. This allows you to launch specific applications or open specific files directly via the URL.

    Examples:

    • To open a specific file: /?url=/CREDITS.md
    • To launch a specific app: /?app=Browser
    /?url=/CREDITS.md
    /?app=Browser