Project Structure

cmd-space-rider/
  index.html          # Browser version (canvas terminal emulator, zero dependencies)
  src/
    index.ts        # CLI entry point, terminal setup, main loop
    input.ts        # Key tables, raw stdin decoding, and key decay windows
    game.ts         # Game engine: state, physics, collision, entity management
    render.ts       # Terminal renderer: tunnel, ship, entities, HUD, effects
    menu.ts         # Menu screens: title, debug menu, game over
    screen.ts       # Double-buffered ANSI screen buffer
    types.ts        # Types, shared constants, colors, and the seeded RNG
  test/
    helpers.mjs                 # Shared test rigging
    engagement.mjs              # One pulse cannon engagement, at any grid
    probes/                     # Figures the comments and tests quote, reported
    browser-engine.test.mjs     # Browser build behaviour
    terminal-engine.test.mjs    # Terminal build behaviour
    input.test.mjs              # Terminal input decoding and key repeat
    menu-layout.test.mjs        # Menu screens fit every supported size, and the
                                #   grid a browser window is given fits the window
    barrel-roll.test.mjs        # Roll timing, invincibility, and cooldown
    combo.test.mjs              # Combo chaining, decay, and the HUD counter
    sound.test.mjs              # Sound cues and the browser synthesizer
    hud-row.test.mjs            # The HUD row the counter, label and banner share
    warp.test.mjs               # The difficulty step and the transition it shows
    powerups.test.mjs           # Drops, drift, pickups, rapid fire, slow motion
    browser-shell.test.mjs      # Colour scheme, touch controls, and the favicon
    pulse-cannon.test.mjs       # Where shots go and what they register against
    parity.test.mjs             # Both builds agree
  docs/               # This project's documentation site
    index.html                  # Site home
    quickstart.html             # QUICKSTART.md as a page
    features.html               # What a run has in it
    getting-started.html        # Install and run, browser and terminal
    usage.html                  # Controls, gameplay, and the debug modes
    development.html            # Line endings, tests, and probes
    project-structure.html      # This page
    terminal-requirements.html  # What a terminal needs to draw the game
    how-it-works.html           # How both builds are put together
    cheatsheet.html             # CHEATSHEET.md as a page
    assets/
      style.css                 # The whole site, both colour schemes
      docs.js                   # The nav menu and its dropdowns
      icon.svg                  # The ship icon, as the site favicon
  hero.png            # Hero banner graphic
  icon.svg            # Ship icon, inlined into index.html as the favicon
  QUICKSTART.md       # The shortest path to a run, and the page made from it
  CHEATSHEET.md       # Every key and HUD field on one page
  DESIGN_LANGUAGE.md  # The site's look: colours, type, spacing, and layout
  .gitattributes      # Line endings: LF, in the index and the working tree
  .nojekyll           # Serves the branch as-is; without it GitHub runs Jekyll
  package.json        # CLI tool manifest and dependencies
  tsconfig.json       # TypeScript configuration