Dev Nexus uses React Router v6 with aDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/apursley2012/dev-nexus/llms.txt
Use this file to discover all available pages before exploring further.
HashRouter for all client-side navigation. Because the site is deployed as a collection of static files, hash-based routing means the browser never makes a network request for a new path — the #/route segment is handled entirely in JavaScript without any server rewrite rules.
Why HashRouter?
A standardBrowserRouter requires the server to return index.html for every path (e.g. /about, /projects). When hosting static files on a basic file server or CDN that does not support catch-all rewrites, requests to /about would return a 404.
HashRouter solves this because the hash portion of a URL (#/about) is never sent to the server — the browser always loads the root file (index.html or a per-route shell), and React Router reads the hash to decide which component to render.
Route Definitions
All seven routes are defined inassets/main.js inside the AppRoutes component. The nav labels come from the navItems array in components/NavBar.js:
| Path | Component | Nav Label |
|---|---|---|
/ | Home | PORTAL |
/about | About | ORIGIN |
/projects | Projects | SPELLS |
/skills | Skills | ARSENAL |
/writing | Writing | SCROLLS |
/case-studies | CaseStudies | RITUALS |
/contact | Contact | SUMMON |
Router Structure
The router is bootstrapped at the bottom ofassets/main.js where ReactDOM.render() is called. The outer HashRouter (imported as H from NavBar.js, which re-exports from react-router-dom) wraps an App component that renders the shell and an inner AppRoutes component. Here is the simplified structure:
AnimatePresence + useLocation Page Transitions
TheAnimatePresence component from Framer Motion enables exit animations — without it, a component would be removed from the DOM instantly before its exit animation could play.
The key technique is passing both location and key={location.pathname} to <Routes>:
locationtells<Routes>which location to render for, so the old route stays mounted long enough for its exit animation to finish.key={location.pathname}causes React to fully unmount and remount the<Routes>tree when the path changes, which triggersAnimatePresenceto run the exit animation on the old page and the enter animation on the new one.
<PageTransition>, which applies an opacity + scale + backdrop-filter: blur() animation on mount and unmount:
Static HTML Shells
Because the site is deployed as static files, each route has a corresponding HTML file in thepages/ directory. These shells allow users to bookmark or share direct links (e.g. https://example.com/pages/About.html) without hitting a 404.
Each shell does two things:
- Sets
window.__STATIC_PAGE_ROUTE__to the route path so the app knows its initial location. - Redirects to the correct hash if no hash is already present in the URL.
index.html for the / route, with window.__STATIC_PAGE_ROUTE__ = "/" and a redirect to #/.
NavBar Active-Route Detection
TheNavBar component uses useLocation() from React Router to detect which route is currently active and applies a highlighted style to the matching link:
[ PORTAL ]) and rendered in text-neon-lime with a lime glow effect.
Adding a New Route
To add an eighth page to Dev Nexus, follow these three steps:Create the page component
Add your page component inside
assets/main.js (or as a separate component file). Wrap the content in <PageTransition> so it receives the enter/exit animation:Register the route
Add a Then add the nav item to the
<Route> inside the AppRoutes component in assets/main.js:navItems array in components/NavBar.js: