Skip to main content

Documentation 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.

Overview

Dev Nexus is a fully static single-page application (SPA) built with Vite and React Router v6. It uses hash-based routing — every URL is in the form https://yourdomain.com/#/route — which means the browser never sends the route path to the server. Every request resolves to the same index.html, and React Router handles the rest in-browser. This architecture has one major deployment benefit: no server-side routing configuration is required. There are no rewrite rules, no try_files directives, and no special server config needed on any static host.

Build Commands

Build the project for production with Vite’s standard output pipeline:
npm run build
Vite compiles and bundles all React components, Tailwind CSS, and assets into the dist/ directory. The output includes:
  • dist/index.html — the SPA entry point with a hash redirect script
  • dist/pages/*.html — per-route static shells (e.g., About.html, Projects.html), each with window.__STATIC_PAGE_ROUTE__ set and a redirect to the corresponding #/route
  • dist/assets/main.js — all bundled React app code
  • dist/assets/main.css — all Tailwind-compiled CSS
  • dist/.nojekyll — GitHub Pages compatibility marker
To preview the production build locally before deploying:
npm run preview
This starts Vite’s built-in preview server, serving dist/ on a local port so you can verify the built output exactly as it will behave on a static host.

Deployment Targets

GitHub Pages

The repo already includes a .nojekyll file in the built output, which is required for GitHub Pages to serve assets correctly (see The .nojekyll File below).Option 1 — Deploy the dist/ folder directly
  1. Run npm run build to generate dist/.
  2. Set your GitHub Pages source to the dist/ folder (via repository Settings → Pages → Source).
  3. Push your changes. GitHub Pages will serve dist/index.html for all requests.
Option 2 — GitHub Actions workflowAdd a workflow file at .github/workflows/deploy.yml:
name: Deploy to GitHub Pages

on:
  push:
    branches: [main]

jobs:
  build-and-deploy:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-node@v4
        with:
          node-version: 20
      - run: npm ci
      - run: npm run build
      - uses: peaceiris/actions-gh-pages@v4
        with:
          github_token: ${{ secrets.GITHUB_TOKEN }}
          publish_dir: ./dist
Per-route static shellsThe pages/*.html shells (e.g., About.html, Projects.html) allow visitors to access routes directly. For example:
https://yourdomain.com/pages/About.html   → redirects to #/about
https://yourdomain.com/pages/Projects.html → redirects to #/projects
This is particularly useful when sharing deep links, since GitHub Pages will serve the matching .html file and then the hash redirect takes over.

Environment Variables

The current Dev Nexus build has no required environment variables — all content is hardcoded in the React components and the site works offline with no external API calls. If you want to add analytics, contact form endpoints, or API keys in the future, create a .env file at the project root. Vite only exposes variables prefixed with VITE_ to client-side code:
# .env (project root — do not commit secrets)
VITE_ANALYTICS_ID=UA-XXXXXXX-X
VITE_CONTACT_ENDPOINT=https://api.example.com/contact
Access them in your components with import.meta.env:
const analyticsId = import.meta.env.VITE_ANALYTICS_ID;
Never put secret keys (API tokens, private credentials) in VITE_-prefixed variables. Because Vite inlines them into the client bundle at build time, they are visible to anyone who inspects dist/assets/main.js.

The .nojekyll File

The .nojekyll file is already present in the built output of this repo. You do not need to create it manually.GitHub Pages runs a Jekyll build pipeline by default. Jekyll ignores any file or directory whose name starts with an underscore (_). Vite outputs assets to dist/assets/ — not an underscore directory — so this is not a problem here. However, the .nojekyll file is kept as a safeguard: it signals to GitHub Pages to skip the Jekyll pipeline entirely and serve the directory contents as-is. This prevents any future asset naming changes from causing silent 404 errors, and it marginally speeds up deployments since the Jekyll step is skipped.

Build docs developers (and LLMs) love