The Aurora Borealis app is a Vite-built React 18 SPA that uses React Router DOM v6’sDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/apursley2012/aurora-borealis/llms.txt
Use this file to discover all available pages before exploring further.
BrowserRouter internally, yet deploys to a static file host without any server-side routing support. This is achieved by pairing each route with its own static HTML shell that contains a small redirect script, so a visitor who lands on /about directly is seamlessly bounced into the SPA’s hash-based navigation before the React tree even mounts.
Why Static HTML Shells?
Static file hosts (GitHub Pages, Netlify in “static” mode, S3 + CloudFront) serve whatever HTML file matches the requested path. They cannot rewrite every URL toindex.html unless explicitly configured. Rather than requiring server configuration, the Aurora Borealis app ships a dedicated HTML file for each route under a pages/ directory — for example pages/about.html handles the /about path. Each shell sets window.__STATIC_PAGE_ROUTE__ to its canonical path string and then runs a redirect script before any React code loads.
The static HTML shells are thin entry points only. They contain no page content. Once the redirect fires and the SPA takes over, all rendering is handled by React.
The window.__STATIC_PAGE_ROUTE__ Variable
Every static page shell sets a global variable that identifies which route the user intended to visit:
#), it calls window.location.replace() to redirect to the same path with #/about appended. The replace() call means the intermediate URL is not added to the browser history stack.
Redirect script runs
The inline IIFE checks
window.location.hash. Because this is a fresh navigation, the hash is empty. The script calls window.location.replace(pathname + search + "#/about"), preserving the current path and any query string while appending the hash.Browser loads with hash
The browser reloads
pages/about.html (or the root, depending on host configuration) with #/about now present in the URL.React Router Configuration
Insideassets/main.js the application tree is wrapped in a single BrowserRouter. All visual layer components (AuroraBackground, StarField, ConstellationNav) are placed outside the <Routes> block so they remain mounted across every navigation. <AnimatePresence> wraps <Routes> and is keyed by location.pathname to coordinate enter and exit animations.
AnimatePresence and PageTransition
<AnimatePresence mode="wait"> ensures that React waits for the currently mounted route’s exit animation to complete before mounting the next one. This prevents two page components from overlapping mid-transition. The key prop on <Routes> — set to location.pathname — tells React that a new pathname means a completely new subtree, triggering the unmount/mount cycle that AnimatePresence intercepts.
PageTransition is a lightweight Framer Motion wrapper applied to every route’s element:
opacity animates from 0 → 1 and filter: blur(10px) collapses to blur(0px) over 800 ms. On exit the same values reverse, giving each page a soft dissolve-and-focus feel that complements the aurora aesthetic.
Full Route Table
| Path | Component | Static Shell |
|---|---|---|
/ | Home | index.html |
/about | About | pages/about.html |
/projects | Projects | pages/projects.html |
/skills | Skills | pages/skills.html |
/writing | Writing | pages/writing.html |
/case-studies | CaseStudies | pages/case-studies.html |
/contact | Contact | pages/contact.html |
Static Shell Deployment Checklist
Confirm all shells are present
Ensure
pages/about.html, pages/projects.html, pages/skills.html, pages/writing.html, pages/case-studies.html, and pages/contact.html are all committed and deployed alongside index.html.Verify asset paths are relative
Each shell must reference
../assets/main.js (relative to pages/) so the script resolves correctly whether served from the project root or a subdirectory.