Skip to content

Repository files navigation

Astro Flash Collection

Use a Windows XP-style desktop in your browser to play classic games and run selected original Windows XP applications.

Open Astro Flash Collection

Highlights

  • Windows XP-style shell, Explorer, Paint, Notepad, original XP applications, Pinball, themes, and settings
  • Draggable game windows, task switching, fullscreen, and volume controls
  • Favorites, recently played games, categories, search, and deep links
  • Automatic offline support with optional per-game downloads
  • Internet Games catalog backed by Flashpoint Archive

XP fidelity work

See the fidelity roadmap and resume checklist for known taskbar gaps, completed reference passes, and the remaining areas in order.

Development

Use the Bun version pinned in package.json (CI reads the same pin). Typechecking uses the native TypeScript 7 compiler through @typescript/native; TypeScript 6 remains installed for TypeScript ESLint compatibility.

Install dependencies and run the checks:

bun install --frozen-lockfile
bun run quality
bun run test

Build and serve the production site locally:

bun run dev

Open http://127.0.0.1:8000. The development server watches build inputs, rebuilds automatically, and reloads open browser tabs after a successful build. It also provides the local /api/games proxy used by Internet Games and starts immediately when dist/ is already current. Use bun run dev -- --rebuild to force a rebuild or --no-sync to serve the existing output unchanged.

To test production service-worker and offline-update behavior with automatic rebuilds, run:

bun run preview

Preview serves the real production worker and gives each changed build a new local version. It intentionally does not reload the page after rebuilding; use Settings > Updates > Check for Updates to exercise the update flow.

XP reference VM

Start an isolated XP reference VM:

bun run xp:vm --instance <name>

VM changes are temporary by default, so multiple sessions can share the base disk. Use --write-base only when changes must be saved to that disk.

Project layout

  • site/apps/ — first-party applications, manifests, and lifecycle modules
  • native/pinball/ — MIT Space Cadet source used to build the first-party WebAssembly runtime
  • native/boxedwine/ and site/vendor/boxedwine/ — native window control and the patched BoxedWine runtime
  • site/js/shell/ — desktop, windows, taskbar, Start menu, and shell services
  • site/js/apps/ — temporary shell adapters used by application modules
  • site/css/shell/ and site/css/apps/ — shell and application presentation
  • site/assets/xp/ — assets extracted from the configured Windows XP source media
  • worker/ — Cloudflare Worker for the Internet Games catalog
  • tools/ — build, validation, and asset maintenance scripts
  • tests/ — Bun/TypeScript tests
  • dist/ — generated production build; ignored by Git

Games and offline support

Catalog games are defined in site/js/games.js. Ruffle games use type: "swf"; embedded HTML5, js-dos, ScummVM, and reVCDOS games use type: "iframe". Original XP applications such as Calculator, WordPad, and the card games are registered in site/apps/core/boxedwine-applications.js and share a BoxedWine runtime. Windows XP Pinball is mounted directly from site/apps/pinball/.

The Windows XP shell is cached automatically. Opening an included game queues a complete background download for offline play. Games can also be downloaded or removed individually, or all at once, from Settings > Games. Shared Ruffle, ScummVM, and BoxedWine runtimes are downloaded only when needed.

Games installed through Internet Games are stored separately in IndexedDB and Cache Storage. GameZIP titles are installed fully; Legacy titles cache additional files as they are requested.

Automatic updates prepare the new version in the background and leave the current page open. Reopen the site to use it, or press Update Now to reload immediately.

Documents are stored as individual records in IndexedDB. Existing localStorage files migrate automatically in one transaction; the old snapshot remains as a recovery backup. Saves wait for the database commit, and conflicting changes from another tab are rejected so the editor can keep its draft. All tabs can write.

Game installation streams the download to a temporary file in the browser's private filesystem (OPFS), validates the ZIP index, and extracts one file at a time into Cache Storage. Extraction uses bounded reads and checks sizes and CRCs. Cancellation or failure removes partial cache entries and the temporary archive. This requires a browser supporting IndexedDB, OPFS, and streaming responses.

Deployment

Pushes to main run tests, build the site, deploy and smoke-test the Cloudflare Worker, and then publish to GitHub Pages. Pull requests run the same validation without deploying.

The repository requires these GitHub Actions secrets:

  • CLOUDFLARE_ACCOUNT_ID
  • CLOUDFLARE_API_TOKEN

The API token needs Workers Scripts: Edit for the account and Workers Routes: Edit for the 4st.li zone.

Deploy the Worker manually with:

bun run deploy:worker

Contributing

Test game compatibility, controls, frame rate, and categorization before submitting a pull request. Run bun run quality && bun run test before pushing.

About

Boot Windows XP in your browser and play classic games

Resources

Stars

3 stars

Watchers

1 watching

Forks

Used by

Contributors

Languages