Choose Your Destiny is a single-page application built with React, delivered as a fully static bundle that runs on any file host — no server required. The repository you are reading contains the pre-built output — there is noDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/apursley2012/choose-your-destiny/llms.txt
Use this file to discover all available pages before exploring further.
src/ directory, no package.json, and no build step to run. The app combines React Router v6’s hash-based navigation with a set of pre-rendered HTML shell pages so that deep links work out of the box on platforms like GitHub Pages. Framer Motion drives all animations, and every piece of component state lives locally — there is no global store.
High-Level Architecture
The application has three layers that work together:- Static HTML shells — one per route in
index.htmland/pages/, each settingwindow.__STATIC_PAGE_ROUTE__and redirecting the browser to the correct#/hash URL before loadingassets/main.js. - React SPA — a single compiled bundle that mounts on
<div id="root">and renders every page component via React Router. - Canvas manifest —
canvas.manifest.jsprovides a machine-readable map of routes and their canvas positions, consumed at runtime byuseScreenInit.
This is a pre-built static site. To make changes to content, styles, or routes you need the original source project. The files in this repository are the compiled output ready for deployment.
Component Hierarchy
The app root (Nm) wraps everything in HashRouter (th), mounts the redirect handler (Sm), and passes children through the shared layout wrapper (sm) before rendering the route tree:
NeonCard (Eu), NeonButton (Lu), TerminalLine (Fu), and Cursor (Bu) — are exported from components/UIComponents.js.
Key Dependencies
React Router v6 — hash-based navigation
React Router v6 — hash-based navigation
Framer Motion — animations
Framer Motion — animations
Framer Motion (
motion.div and AnimatePresence) handles entrance animations for every page, skill progress bars, and the case-study stage reveals. Elements animate with initial, animate, and exit props. The library is bundled into assets/main.js.Tailwind CSS — utility styling
Tailwind CSS — utility styling
Tailwind utilities are compiled into
assets/main.css. The font-arcade, font-terminal, and font-code utility classes map to Press Start 2P, VT323, and JetBrains Mono respectively. Custom neon glow classes (glow-cyan, glow-magenta, etc.) are defined alongside the Tailwind output.Google Fonts — typography
Google Fonts — typography
Four font families are loaded via a single
@import at the top of main.css:- Inter (400, 600, 800) — body text (
font-sans) - JetBrains Mono (400, 700) — code snippets (
font-code) - Press Start 2P — pixel arcade headings (
font-arcade) - VT323 — terminal-style UI labels (
font-terminal)
Deployed File Structure
The repository contains the fully self-contained static site ready for deployment. There is no separate build step — the files here are what get served directly:index.html uses <link rel="modulepreload"> tags for assets/index.js, assets/jsx-runtime.js, components/VisualEffects.js, components/UIComponents.js, canvas.manifest.js, and useScreenInit.js, so the browser can prefetch them in parallel with assets/main.js.
State Management
Choose Your Destiny uses local component state only — there is no Redux, Zustand, Jotai, or any other global store. Each page component manages exactly what it needs:- Contact Form
- Case Studies
- Projects
- Skills
Two On submit,
useState calls control the form:status moves to "submitting" for 1 500 ms (simulated delay), then to "success", then resets to "idle" after 3 000 ms.The canvas.manifest.js Routing Manifest
canvas.manifest.js exports a manifest object as m that maps internal screen IDs to route paths and canvas positions. It is used by useScreenInit to look up the initial route state when the app is launched from a specific canvas screen via the ?mp_screen= query parameter.
The actual minified source is:
name— human-readable labelroute— always"/"(the hash router handles actual routing client-side)state.path— the React Router path thatuseScreenInitpasses touseNavigateposition—x/ycanvas coordinates used by design-tool canvas integrations
The useScreenInit Hook
useScreenInit reads the ?mp_screen= query parameter on first render, looks up the matching screen in the manifest, and returns the screen’s state object (which contains the path to navigate to). The value is memoized with useMemo so it never re-runs after mount.
The hook is exported as u in the minified bundle. The actual source of useScreenInit.js is:
Sm redirect component calls useScreenInit on mount and uses React Router’s useNavigate to push the resolved path into the history stack, landing the user on the correct page without a full reload.