A website in the style of old-school operating systems.
This project can be built as a standalone desktop application using Tauri, allowing users to download and run Nostalgia OS on macOS, Windows, and Linux.
To run the desktop app in development mode:
npm run tauri:devThis will start the development server and open the Tauri application window.
To build the desktop application for distribution:
npm run tauri:buildThis will create platform-specific installers in the src-tauri/target/release/bundle/ directory:
- macOS:
.dmgand.appfiles - Windows:
.exeinstaller and.msifiles - Linux:
.deb,.AppImage, and.rpmfiles
The original web version can still be served using:
npm run devThen open http://localhost:3000 in your browser.
WARNING: This section is out of date.
- Search in the document for
<!-- Desktop Icons --> - Copy one of them and customize as needed:
<div id="icon-computer" class="flex flex-col items-center cursor-pointer draggable-icon"
data-window-title="My Computer" data-window-id="desktopIcon1" data-window-type="default"
data-window-dimensions='{"type": "default"}'>
<img src="./image/computer.svg" alt="My Computer" class="mb-1 shadow-lg max-w-20" />
<span class="text-xs">My Computer</span>
</div>
- Example icon:
<div id="example" class="flex flex-col items-center cursor-pointer draggable-icon"
data-window-title="Example" data-window-id="desktopIcon1" data-window-type="default"
data-window-dimensions='{"type": "default"}'
data-window-content='<p>This is example markup. Recommended to ampersand escape reserved characters.</p>'>
<img src="./image/example.svg" alt="Example" class="mb-1 shadow-lg max-w-20" />
<span class="text-xs">Example</span>
</div>
WARNING: This section is out of date.
- Search in the document for
<!-- Start Menu --> - Copy one of them and customize as needed:
<li class="px-4 py-2 hover:bg-gray-50 cursor-pointer" onclick="openNav('Settings', { type: 'default' }, 'Settings')">Settings</li>- Modified menu item:
<li class="px-4 py-2 hover:bg-gray-50 cursor-pointer" onclick="openNav('ExampleItem', '<p class="font-bold">This is some example content using HTML markup</p>', { type: 'integer', width: 600, height: 400 }, 'ExampleItem')">Example Item</li>WARNING: This section is out of date.
- Add the filename in
api/media.json
[
"inspo.jpg",
"mail.mp3",
"test.html",
"FAQ.md",
"contact.txt",
"my-new-item.webp"
]- Paste your new file in the
mediafolder
media
├── FAQ.md
├── contact.txt
├── inspo.jpg
├── mail.mp3
├── test.html
└── my-new-item.webp
This is how buttons should be implemented.
<button id="some-example-button" onclick="setTimeout(function(){toggleButtonActiveState('some-example-button', 'OK')}, 1000);toggleButtonActiveState('some-example-button', 'Cool!');createWindow('OK Button Pressed', 'Your OK button has successfully been pressed!', false, 'ok-pressed', false, false, { type: 'integer', height: 300, width: 200 }, 'default');" class="bg-gray-200 border-t-2 border-l-2 border-gray-300 mr-2"><span class="border-b-2 border-r-2 border-black block h-full w-full py-1.5 px-3">OK</span></button>A good idea for QA is to test on a real mobile device using ngrok to access your localhost.
- After installing and setting up your ngrok, start the tunnel:
ngrok http 5173 --domain=irm-indev.ngrok.io- Update the
allowedHostsin./vite.config.jswith the subdomain generated by ngrok, for example:
export default defineConfig({
plugins: [tailwindcss()],
build: {
outDir: 'docs',
emptyOutDir: false, // Don't empty the docs directory to preserve existing files like CNAME
},
publicDir: 'public', // Ensure public files are copied
server: {
port: 5173,
strictPort: true, // Fail if port 8080 is not available
allowedHosts: ['localhost', 'irm-indev.ngrok.io', 'your-own-ngrok.ngrok.io'] // Only bind to localhost for security
}
})