# @kentcdodds/roadster: agent notes Human overview: [`README.md`](./README.md). - Package app. `kody.app.entry` is `src/app.ts`, which serves one HTML shell (`src/page.ts`) plus `/health`. `kody.app.client` is `src/client/index.ts`, bundled by the platform with `three` from `dependencies`. There is no CDN at runtime. - `src/app.ts` must never import the client graph. Besides the page and `/health`, it serves embedded images from `src/assets.ts`: `/og-image.jpg` (1200x630 social preview) and `/icons/favicon.svg`, `/icons/favicon-32.png`, `/icons/apple-touch-icon.png`. `.kody/icon.png` is the package icon. - Social tags (og:*, twitter:card `summary_large_image`) live in `headTags` in `src/page.ts`. og:image is absolute, built from `X-Forwarded-Host`/`Host` plus `packageContext.appBasePath` (fallback `https://kentcdodds.kody.run`). - Images: edit files in `public/`, then run `node scripts/embed-assets.mjs` to regenerate `src/assets.ts` (generated, do not hand-edit). The og image is a real in-game render (headless Chrome + SwiftShader, HUD hidden, custom camera on the hovering car at sunset) with the title composited in HTML and screenshotted. - Client modules: `index.ts` (loop, physics, challenges, HUD, input), `car.ts` (stylized car built from primitives), `world.ts` (map, ground height, canyon, ramp, lineup), `audio.ts` (WebAudio synth sound effects and music). - No secrets, credentials, storage, or outbound fetches. Saves live in browser `localStorage` (`roadster.save`, `roadster.sfx`, `roadster.music`). - Keep it **private**. Kent decides whether to make it public. Keep it an unofficial fan game: no Tesla logos, wordmarks, or brand assets. - The default export of `.` (`src/index.ts`) returns the list of demo feats the game models. ## Smoke tests - `npx tsc --noEmit` - `npx @kodycodes/cli@latest dev`, then open the URL. A test hook is exposed as `window.__roadster` with `advance(seconds, heldKeyCodes)`, a fixed-step simulation for frame-rate-independent tests, plus `teleport(i)`, `state`, and `save`. - Expected with `advance`: after teleporting to 0 and calling `advance(3)`, the lights turn green. Then `advance(1.3, ['KeyW','ShiftLeft'])` records 0-60 in about 0.95 s. Tires only take about 2.3 s. ## Edge cases - Headless Chrome with SwiftShader renders at a low frame rate. Real-time key holds then move less than they would at 60 fps, so use `advance` for physics checks. - Landing with up.y < 0.55 or a vertical impact above 19 m/s counts as a wreck, and the car respawns at the last challenge spawn.