Magical Portfolio is a fully client-side React SPA built with Vite. RunningDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/apursley2012/magical/llms.txt
Use this file to discover all available pages before exploring further.
npm run build compiles the entire application — React components, Tailwind CSS, and the React Router runtime — into a self-contained dist/ folder of plain HTML, JavaScript, and CSS files. Because all navigation is handled in the browser via hash-based routing (#/), there is no server-side rendering required and no special server configuration needed. The output drops straight onto any static file host: GitHub Pages, Netlify, Vercel, an S3 bucket, or a plain nginx server.
Build steps
Install dependencies
If you haven’t already, install the project’s Node dependencies before running any build or dev commands:This installs Vite, React, React Router, Tailwind CSS, and every other package listed in
package.json into a local node_modules/ folder.Run the production build
Compile and bundle the application for deployment:Vite performs tree-shaking, minification, and asset fingerprinting, then writes the complete output to
dist/. A successful build prints the generated file sizes to your terminal.Preview the build locally
Before uploading anything, spin up Vite’s built-in static preview server to make sure the production bundle behaves exactly as expected:The preview server starts at http://localhost:4173. Click through every page — Home, About, Projects, Skills, Writing, Case Studies, Contact — and confirm the mystical animations, custom cursor, and sigil effects all load correctly.
Output structure
After a successful build, thedist/ directory contains the following files:
How hash routing makes this work
Magical Portfolio uses hash-based routing: every client-side route is encoded as a URL fragment beginning with#/ (for example, #/about, #/projects). Because the fragment is never sent to the server, the server always delivers the same HTML file regardless of which page the visitor requested, and then React Router reads the hash to render the correct view.
Each file in pages/ is a thin HTML shim that loads the React application and sets a window.__STATIC_PAGE_ROUTE__ hint. For example, pages/About.html contains:
/pages/About.html directly — say, from a search engine or a shared link — the inline script detects the missing hash and immediately redirects the browser to /pages/About.html#/about. React Router then picks up #/about and renders the About page. All routes converge on the same JS bundle; no separate server-side rendering is involved.
The
.nojekyll file is required for GitHub Pages — and it’s already in the repository. By default, GitHub Pages runs every site through Jekyll, its static site generator. Jekyll intentionally ignores files and directories whose names begin with an underscore — which would silently strip _ prefixed assets if any existed. More critically for Magical Portfolio, Jekyll would attempt to re-process the HTML shims and may fail on Vite’s module-type <script> tags. The empty .nojekyll file already present in the repo root tells GitHub Pages to skip Jekyll processing entirely and serve the output as-is. You do not need to create it.