Aurora Cosmos uses a flat, pre-built static layout that is optimized for deployment to GitHub Pages and other file-based hosts. Every HTML file in the repository is a self-contained entry point that loads the same compiled React bundle — the only difference between them is a singleDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/apursley2012/aurora-cosmos/llms.txt
Use this file to discover all available pages before exploring further.
window.__STATIC_PAGE_ROUTE__ assignment that tells the app which page to render. Understanding this pattern makes it straightforward to add pages, customize components, or adapt the project to a different hosting environment.
Directory Layout
Directory and File Reference
index.html — Root Entry Point
The index.html at the repository root is the entry point for the Home route (/). It loads all the JavaScript modules, the compiled stylesheet, and sets window.__STATIC_PAGE_ROUTE__ = "/" before the React app mounts. It also contains a small inline script that ensures the URL carries the #/ hash fragment on first load, which is required for the hash-based router to work correctly.
pages/ — Per-Route HTML Shells
Each file in pages/ is a minimal HTML shell that mirrors index.html almost exactly. The key distinction is the window.__STATIC_PAGE_ROUTE__ value:
assets/main.js bundle — no page-specific JavaScript is compiled separately.
components/ — Shared Layout Primitives
The three JavaScript files in components/ are Vite-compiled ES modules that are preloaded by every HTML entry point:
AuroraBackground.js— Renders the layered aurora gradient effect. Uses absolutely positioned, blurred radial gradients in the aurora and cosmic color tokens, animated with CSS and Framer Motion to produce the slow, shifting glow visible behind all page content.Navigation.js— The full navigation component. On desktop it renders a collapsible fixed sidebar (20 px collapsed, 256 px expanded) with Framer MotionlayoutIdfor the active-route indicator. On mobile it renders a top bar and a full-screen slide-in overlay. The route list — Home, About, Projects, Skills, Writing, Case Studies, Contact — is defined as a static array within this file and maps directly to the seven application routes.Starfield.js— A canvas- or DOM-based parallax starfield with twinkling star animations and shooting-star effects, rendered behind the aurora gradient and all page content.
assets/ — Compiled Application Bundle
The assets/ directory contains the compiled application bundles:
| File | Description |
|---|---|
main.js | The full bundled React application, including all page components, React Router, Framer Motion, Lucide icons, and application logic. |
main.css | The compiled Tailwind CSS output, including all utility classes used by the project and the two custom utility classes (.glass-panel, .box-glow). Also imports the three Google Fonts families at the top of the file. |
proxy.js | A shared chunk containing React, ReactDOM, and other heavy dependencies that are split from main.js for efficient caching. |
useScreenInit.js — React Initialization
This module exports React and ReactDOM so they can be shared across the pre-compiled component files loaded via <link rel="modulepreload"> tags in each HTML entry point. Keeping this as a separate module avoids bundling React multiple times.
canvas.manifest.js — Build Marker
A placeholder file included as part of the pre-built output. Its presence signals that the repository contains a compiled bundle rather than raw source, and it serves as a hook point for tooling that processes the static output.
.nojekyll — GitHub Pages Configuration
An empty file at the repository root. Its sole purpose is to tell GitHub Pages not to process the repository with Jekyll. Without this file, GitHub Pages would ignore any files or directories whose names begin with an underscore (_), which could silently break asset loading. Any repository deploying to GitHub Pages should include this file.
How the Static Page Pattern Works
Every page in Aurora Cosmos follows the same three-step flow on load:- The browser fetches an HTML file (e.g.,
pages/About.html). The inline script setswindow.__STATIC_PAGE_ROUTE__ = "/about"and redirects the URL to append#/aboutif the hash is missing. - The React bundle (
assets/main.js) mounts into the<div id="root">element. It readswindow.__STATIC_PAGE_ROUTE__to initialize React Router’s hash router at the correct route. - React Router renders the matching page component, wrapping it in the shared
AuroraBackground,Starfield, andNavigationlayout.