# @kentcdodds/pirate-shooter This package is a hosted app only. It has no callable exports. ## Layout - `src/app.ts` is the Kody fetch handler (`kody.app.entry`). It renders the HTML shell and links assets using `packageContext.assetBasePath` and `packageContext.clientModuleUrl`. Never hard-code those paths. - `src/main.ts` is the browser client (`kody.app.client`). It injects `src/markup.ts` into the page and starts the game. It must stay browser-safe: no `kody:` imports and no CSS imports. - `public/` is `kody.app.assets`: the stylesheet, the icon, and the web app manifest. The manifest uses relative URLs so it works under the app mount. - `index.html` is only used by the local Vite dev server. - `src/kody-runtime.d.ts` declares the slice of `kody:runtime` the app uses, so local `tsc` passes. ## Smoke tests After publishing, call `packageAppFetch` for `@kentcdodds/pirate-shooter` with path `/`. Expect status 200 and HTML that references `/_assets/style.css` and a `client..js` module. Then open the hosted URL in a browser and start a game. ## Edge cases - The high score and mute setting live in `localStorage` under the `pirate-shooter:` prefix. Package apps share an origin, so keep that prefix distinct from the space shooter's. - Gameplay changes should usually be mirrored in `@kentcdodds/space-shooter`, which shares the same game loop.