> ## Documentation Index
> Fetch the complete documentation index at: https://docs.totemlabs.io/llms.txt
> Use this file to discover all available pages before exploring further.

# What Totem can host

> Prepare a static browser-game archive that Totem can validate and publish.

Totem hosts static browser games. Your archive can contain HTML, JavaScript, CSS, images, audio, fonts, WebAssembly, and other allowed web assets. It cannot contain a server, database, server-side rendering process, or executable program.

Every game is served as static content from an isolated origin. That separation prevents one game from reading another game's browser storage.

## Required archive layout

Upload a gzip-compressed tar archive. `index.html` must be at the archive root.

<CodeGroup>
  ```text Correct theme={null}
  index.html
  assets/main.js
  assets/game.css
  assets/sprite.png
  ```

  ```text Incorrect: nested index.html theme={null}
  afterlight/index.html
  afterlight/assets/main.js
  afterlight/assets/game.css
  ```
</CodeGroup>

The nested layout fails with `NO_INDEX_HTML`.

## Limits

| Limit               |                     Value |
| ------------------- | ------------------------: |
| Compressed archive  | 26,214,400 bytes (25 MiB) |
| Unpacked contents   | 52,428,800 bytes (50 MiB) |
| Files               |                     2,000 |
| Upload URL lifetime |  900 seconds (15 minutes) |
| Allowed extensions  |                        79 |

A connected agent can read the exact current allowlist from `totem://allowed-extensions`. That resource is generated from the same constant as the validator. It is the source of truth for all 79 extensions.

Common browser-game files such as HTML, CSS, JavaScript, JSON, PNG, browser audio, WebAssembly, and the `.br` and `.gz` files produced by web game engines are supported. Executables, server scripts, shell scripts, and nested archives are rejected.

The validator also rejects:

* Absolute paths, path traversal, backslashes, empty paths, dotfiles, and `node_modules` paths.
* Symlinks, hardlinks, and non-regular files.
* Archives that cannot be read as gzip-compressed tar data.

## Game icon

Add a square 512×512 PNG named icon-512.png at the build root — it becomes the game's icon.

* PNG only, not SVG or JPEG.
* Exactly square and 512×512.
* Under 512 KB.
* Keep important artwork inside the center 80% so it remains safe when cropped.

You may also add `icon-192.png` and `icon-maskable-512.png`. Totem uses a generated fallback when no icon is present.

## Engine notes

### Unity WebGL

Export a static WebGL build. Keep the generated entry page at the archive root. Include generated `.br` or `.gz` payloads when the export uses them.

### Godot HTML5

Export for the web and place the exported `index.html` at the archive root. Include every generated JavaScript, WebAssembly, and pack file referenced by that page.

### three.js

Build the production site before archiving it. Archive the contents of the output directory, not the directory itself.

### Emscripten

Include the generated HTML entry page and every JavaScript, WebAssembly, data, and pre-compressed file it references.

## What Totem adds

After validation, Totem inserts this SDK tag before the closing `</body>` tag:

```html theme={null}
<script src="https://cdn.<USERCONTENT_DOMAIN>/sdk/v1.js" data-game="<game_id>" data-platform-origin="<platform-origin>" defer></script>
```

You do not add this tag yourself. Read [SDK overview](/sdk/overview) for what it does.
