Dev Mode Arcade uses React Router v6 withDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/apursley2012/dev-mode-arcade/llms.txt
Use this file to discover all available pages before exploring further.
HashRouter — a routing strategy that encodes the active path in the URL hash (the # portion) rather than the URL pathname. Because hash fragments are never sent to the server, this lets the entire app run on any static file host without requiring server-side rewrite rules.
Why HashRouter?
StandardBrowserRouter routes like /about require the server to return the same index.html for every URL under the domain. On static hosts (GitHub Pages, Netlify in static mode, S3, etc.) an unrecognised path like /skills typically returns a 404.
HashRouter sidesteps this entirely. The server always serves a real HTML file for the pathname portion of the URL, and the hash fragment (#/skills) is handled entirely by React Router in the browser.
pages/About.html lands on the correct page without relying on a catch-all fallback.
The __STATIC_PAGE_ROUTE__ global
Each HTML file sets a global variable before the React bundle loads:
main.js initialises HashRouter, it reads this value to know which route is “expected” for the current document. If the URL hash is missing or bare, the inline script redirects to add it.
Hash-redirect script (verbatim from index.html)
pages/*.html file, with the route string changed to match:
| HTML file | __STATIC_PAGE_ROUTE__ value | Hash redirect target |
|---|---|---|
index.html | / | #/ |
pages/Home.html | / | #/ |
pages/About.html | /about | #/about |
pages/Projects.html | /projects | #/projects |
pages/Skills.html | /skills | #/skills |
pages/Writing.html | /writing | #/writing |
pages/CaseStudies.html | /case-studies | #/case-studies |
pages/Contact.html | /contact | #/contact |
The redirect uses
window.location.replace() (not assign()), so the bare URL is removed from the browser’s history stack. Pressing Back after a direct-navigation load will not cycle through the un-hashed URL.All application routes
The React app insidemain.js defines the following routes. Each one corresponds to a themed screen in the arcade metaphor:
| Route | Arcade theme | Description |
|---|---|---|
/ | Hero screen / title card | Landing screen with animated intro and primary CTA buttons |
/projects | Game cartridges | Portfolio projects displayed as retro game cartridge cards |
/about | Character bio / player select | Developer background, role, and personal stats |
/skills | Control panel | Skill tree broken into frontend, backend, and tooling categories |
/writing | Instruction manuals | Articles and technical writing displayed as game manuals |
/case-studies | Boss fight | In-depth case studies framed as defeating a legacy-system antagonist |
/contact | Guestbook / high score | Contact form styled as an arcade high-score entry screen |
Navigation flow
When a user clicks an in-app link, React Router updates the hash fragment and re-renders without a page load. ThePageTransition wrapper animates the outgoing and incoming screens using Framer Motion’s AnimatePresence:
Page transition behaviour
PageTransition wraps every route component and applies a CRT-style power-cycle effect using Framer Motion filters:
Adding a new route
To add a new route (for example/timeline), you would need to make changes in three places:
-
Create the static HTML file — copy any existing
pages/*.html, update the<title>, and change__STATIC_PAGE_ROUTE__to"/timeline". -
Register the route in the React app — add a
<Route path="/timeline" element={<Timeline />} />entry in the router configuration inside the source project before re-building with Vite. -
Add data — if the route needs content, extend
data/mockData.jswith the appropriate export (see Data Layer).
Route–component–theme reference
| Route | Component | Arcade theme | Primary accent |
|---|---|---|---|
/ | <Home> | Title screen | Lime (arcade-lime) |
/projects | <Projects> | Game cartridges | Purple / multi-colour |
/about | <About> | Character select | Cyan (arcade-cyan) |
/skills | <Skills> | Control panel | Magenta (arcade-magenta) |
/writing | <Writing> | Instruction manuals | Lime (arcade-lime) |
/case-studies | <CaseStudies> | Boss fight | Magenta (arcade-magenta) |
/contact | <Contact> | High-score guestbook | Cyan (arcade-cyan) |
assets/main.css. See Design Tokens for the full colour palette.