Urgent.News

What's breaking now, across thousands of outlets.

Tech

I built my own operating system that runs in the browser (NebulaOS)

Most portfolios are a scroll of sections. Mine is an operating system. For Hack Club's WebOS 1 workshop I built NebulaOS, a personal OS that runs entirely in your browser. You boot it, open apps, drag windows around, lock the screen, and even type commands into a terminal to learn about me. ๐Ÿ‘‰ Try it: https://maddulasriharsha.github.io/webos/ (no sign-in, no password) ๐Ÿ‘‰ Code:โ€ฆ

I constructed my own browser-based operating system called NebulaOS for Hack Club's WebOS 1 workshop. This personal OS operates entirely within the browser, allowing users to boot it, open applications, manipulate windows, and even use a terminal for learning purposes. You can try it out at https://maddulasriharsha.github.io/webos/ (no sign-up required) and view the source code at https://github.com/maddulasriharsha/webos.

Key features of NebulaOS include:

- A window manager that supports dragging, resizing, minimizing, maximizing, and snapping to screen edges. Windows can even survive a page refresh.

- A variety of apps such as About Me, Files, Terminal, Paint, Notes, Calculator, Snake, and Settings.

- A shared virtual file system accessible through the Files app or through terminal commands like ls, cd, cat, and tree.

- Personalization options including 4 themes, a wallpaper picker, and the ability to upload your own image.

- Several OS touches like a boot sequence, lock screen, power menu, Spotlight search, a right-click desktop menu, and toast notifications.

- The core of NebulaOS is built using React, TypeScript, and Vite, with no external UI library. Each window is represented as an object in state, making it simple to manage and update.

The development process involved several lessons learned, such as:

- Avoiding the use of arrow functions without braces in useEffect hooks to prevent React from treating them as cleanup functions.

- Fixing issues with the Snake game's high score not incrementing by using a local counter within the effect instead of a stale closure.

- Correcting the window-snap preview positioning by lifting the preview out of the window component, as using backdrop-filter made it the containing block for position: fixed children.

- Ensuring windows opened within the viewport on smaller screens, such as phones, by clamping the new and restored windows to the viewport.

Future plans for NebulaOS include adding a music player, a mini browser app, and real multi-desktop workspaces. The OS is deployed using a small GitHub Actions workflow that builds the Vite app and publishes it to GitHub Pages on every push. A small gotcha to note is that the first run may fail until you set Settings โ†’ Pages โ†’ Source to GitHub Actions, which is a settings switch rather than a code problem. To ensure proper functionality from a subpath, Vite's base should be set to './'.

To learn more about creating your own OS, you can follow the WebOS workshop guide at https://jams.hackclub.com/batch/webOS. I would love to see what others create, so feel free to share your link in the comments.

Written by urgent.news from Dev.to's reporting โ€” not their text. Machine-written โ€” may contain errors; check the original before relying on it.

Read the original at dev.to โ†’

More in Tech

How many samples does a false-positive budget need?

Pick a detector, run it over some benign traffic, and choose a threshold. Usually the threshold is an order statistic of the benign scores โ€” the k-th largest, or a quantile โ€” and you report somethingโ€ฆ

  • Approximately 149 benign samples needed for 95% confidence interval of 2% false-positive rate
  • 1,000โ€“2,000 paired attacks required to detect 2-point difference with 80% power

Day 54: A Volume Belongs to the Pod, and a Resource Group's Region Is Only Metadata

Day 54 of DevOps, Day 4 of Azure. Today was about where things belong, and the answer was not the obvious container in either case.

  • A file in one container read from another, not belonging to either
  • Virtual network in West US inside resource group in East US, normal practice
  • Resource group's location stores only metadata, resources can be in different regions

More from Friday 2 October โ†’