Code Structure

UI components, utility functions, shared data structures and configurations reside in src/lib

Assets and static content (embedded html page used in some programs) reside in static

Application starting point: src/routes/index.svelte, this page handles the general load/unload of the UI.

Upon its boot, src/routes/index.svelte will load src/routes/boot_manager.svelte, which is the boot options scene.

At this point, if you select Start Windows Normally, the src/routes/xp/starting.svelte will be loaded into the scene.

starting.svelte

src/routes/xp/starting.svelte

If this is the first time use, it will bootstrap the user's hard drive with hard_drive.json. It also preloads static assets (wallpapers, icons, audios, etc.) and some components like context menus.

Then it loads src/routes/xp/desktop.svelte

desktop.svelte

src/routes/xp/desktop.svelte

The desktop environment. It's the container for the workspace, taskbar, start menu, etc.

desktop.svelte also listens for system-wide commands (at the moment: shutdown, restart) and handles writing changes made by users and programs to the disk (IndexedDB)

work_space.svelte

src/routes/xp/work_space.svelte

The screen - (taskbar + startmenu) in terms of screen estate.

It launches programs into the workspace on request.

/programs

src/routes/xp/programs

This folder contains all the native programs (apps, like Foxit Reader, MS Word). It's just my code organizing, if you write a new program, you don't necessarily put your your_program.svelte in this folder.

In case you already have an up & running webapp (website), please read 3rd-party apps section for integration, so you don't have to deal with win32.run codebase.

Last updated