DEV Community

Cover image for A Tiny Operating System in the Browser! :D
Tayyaba
Tayyaba

Posted on

A Tiny Operating System in the Browser! :D

I Built a Tiny Operating System in the Browser (For Absolutely No Practical Reason T-T)

One of my favorite things about learning web development is building things that make me stop and think: "Hold on, can I actually make this?"
This time, the answer was:"kinda?"

So I built a mini operating system in the browser using JavaScript.
Not a real operating system, obviously.
Nobody is installing this on their laptop anytime soon.
But it does have:
• A desktop with icons
• Draggable windows
• A taskbar
• A start menu
• A calculator
• A notepad with saved notes
• A paint app
• A terminal with commands
• A clock and calendar
• A fake browser
• Window controls like minimize, maximize, and close

I wanted to see if I could recreate the feeling of using a desktop environment using only front-end development concepts I already knew.

At first it sounded easy.
Then I started adding windows.
Then those windows needed to move.
Then they needed to stay on top of each other correctly.
Then they needed to minimize.
Then they needed to show up in the taskbar.
And suddenly a "small project" became a lot less small -_-"

One thing I enjoyed building was the window management system.
Every time a window opens, it gets moved to the front. Minimized apps stay in the taskbar. Clicking a taskbar app restores it.
Nothing revolutionary, but seeing it actually behave like a desktop felt surprisingly satisfying, not gonna lie!

The notepad was another fun addition.
It saves notes using localStorage, which means whatever you type is still there when you come back later.

The terminal is probably my favorite part though.
Typing commands like:help, date, time, or even opening apps through commands made the project feel much more like a tiny operating system instead of a collection of random windows.

A lot of it is still simple.
The browser isn't really a browser.
The file explorer doesn't manage files.
The settings page doesn't do much yet(Anything to be precise ;-;)
But that was never the point.

The goal was to experiment, learn, and see how many desktop-like features I could recreate with JavaScript.
And honestly, I learned more than I expected while building it.

If you were building something like this, what feature would you add next??

I'd genuinely love some feedback! :))

multi-tasking
Project link:
https://notthatslayer.github.io/Mini-OS/
(Please use a PC or laptop to use all the features nicely)

Top comments (0)