# GemOS site deployment

This folder is a standalone static project site intended for deployment under `gemos.maksu.online`.

## Structure

- `index.html` is the main project site.
- `preview/index.html` is the browser demo entry point.
- `assets/demo/` contains the GemOS floppy and data images used by the preview.
- `vendor/v86/` contains the `v86` browser emulator runtime, BIOS and WASM assets.

## Recommended deployment model

Serve the contents of `site/` as the root of a static site.

This works well with:

- Vercel static hosting
- Netlify
- Cloudflare Pages
- a plain Nginx or Caddy static site

No backend is required.

## Vercel notes

The simplest deployment is to create a separate static project that uses `site/` as the project root.

Suggested settings:

- Framework preset: `Other`
- Build command: none
- Output directory: `.`

Then attach the custom domain `gemos.maksu.online`.

## Static host requirements

The host must serve:

- `.wasm` with `application/wasm`
- `.img` as binary files
- the full `preview/`, `assets/` and `vendor/` trees without rewriting their paths

Most modern static hosts infer these correctly, but verify it during first deployment.

## Preview asset refresh

To refresh preview assets from the current repo build, run:

```bash
./tools/site/export_preview_assets.sh
```

That copies:

- screenshots from `docs/assets/screenshots/`
- `build/gemos.img`
- `build/data.img`
- pinned `v86` runtime files

If the build images are missing, the script will generate them first.

## Preview limitations

- Browser preview is slower than local QEMU.
- Input timing and rendering cadence depend on browser performance.
- The preview is for exploration and demos, not low-level performance validation.

## Current size considerations

The preview currently ships:

- GemOS boot image
- GemOS data image
- `v86` runtime + BIOS

That is acceptable for static hosting, but it is heavier than a normal landing page.

If later deployments need smaller initial payloads, the first practical optimization is lazy-loading the preview page separately, which the current structure already does.
