Press Start is a Vite-built React 18 SPA whose deployment output is self-contained in the repository root. Because the project targets GitHub Pages — a static file host — every design choice in the directory layout serves either the React runtime, the Tailwind stylesheet, or the static-hosting redirect mechanism that makes direct URLs work without a server.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/apursley2012/press-start/llms.txt
Use this file to discover all available pages before exploring further.
Directory tree
Top-level files
index.html
The single app shell. Vite injects a <script type="module"> tag pointing at assets/main.js and <link rel="modulepreload"> tags for every component module. The body contains only <div id="root"></div> — the React tree renders into this node at runtime.
.nojekyll
GitHub Pages uses Jekyll by default. Jekyll silently ignores any file or directory whose name begins with an underscore, which would break Vite’s _assets/ output in some configurations. The empty .nojekyll file in the repository root disables Jekyll entirely so GitHub Pages serves the raw files without transformation.
The assets/ directory
| File | Purpose |
|---|---|
main.js | The complete bundled application. All React page components, routing logic, data arrays, and utility functions are compiled into this single module by Vite. |
main.css | Tailwind CSS utility classes and the custom arcade design tokens (--neon-green, --neon-magenta, etc.) compiled to a static stylesheet. |
jsx-runtime.js | The React 18 JSX transform runtime, extracted as a shared chunk so it can be <link rel="modulepreload">-ed by both index.html and the static page shells in pages/. |
The components/ directory
Each file in components/ is a standalone ES module that exports exactly one React component. They are listed in index.html as <link rel="modulepreload"> targets so the browser can fetch them in parallel before main.js executes.
| File | Exported component |
|---|---|
ArcadeMenu.js | ArcadeMenu — sticky navigation bar |
CRTOverlay.js | CRTOverlay — full-screen phosphor effect |
HighScoreTable.js | HighScoreTable — animated score display |
PixelSprite.js | PixelSprite — sprite renderer |
PressStartGate.js | PressStartGate — intro splash gate |
The pages/ directory and the static shell pattern
GitHub Pages serves static files. When a visitor navigates directly to https://username.github.io/press-start/about, GitHub Pages looks for a file at that path. Because the SPA only has one real HTML file (index.html at the root), a direct request to /about would return a 404.
The pages/ directory solves this with static HTML shells — one per route. Each shell is a minimal HTML document that loads the same main.js bundle, then runs a small inline script to communicate the intended route to the React app before it boots.
How a page shell works
Here is the complete inline script frompages/About.html:
GitHub Pages serves the shell
A direct visit to
/pages/About.html (or a GitHub Pages path alias) causes the server to return pages/About.html instead of a 404.Route is written to the hash
The inline script sets
window.location.hash to /about. This immediately changes the browser URL to pages/About.html#/about without a page reload.Signal is stored on window
window.__STATIC_PAGE_ROUTE__ is set to "/about" so the React app can read the intended route when it initialises, even before the hash-change event fires.The
pages/ shells reference ../assets/main.js with a relative path because they sit one directory level below the root. The modulepreload links use the same relative prefix.