Overview
The site is a Create React App single-page application (SPA) deployed to Netlify. There is no server-side rendering, no backend, and no environment variables — all data is embedded directly in the JavaScript bundle.| Setting | Value |
|---|---|
| Build command | CI=false npm run build |
| Publish directory | build |
| Environment variables | None required |
The
CI=false flag prevents Create React App from treating ESLint warnings as errors during the CI build. Without it, warnings that are acceptable in development would cause the Netlify build to fail.SPA routing with _redirects
Netlify serves static files by default. When a visitor navigates directly to a route like /blog or /magic-the-gathering, Netlify looks for a physical file at that path. Because those paths don’t correspond to actual files in the build/ output, Netlify would return a 404.
The file public/_redirects solves this by telling Netlify to serve index.html for every request, letting React Router handle navigation on the client side:
build/ directory automatically when CRA builds the project, because anything in public/ is included in the build output as-is.
Deploying to Netlify
Connect the repository in Netlify
In the Netlify dashboard, click Add new site → Import an existing project, then select your GitHub account and choose the
personalwebsite repository.Configure the build settings
Set the following in the Netlify build configuration:
- Build command:
CI=false npm run build - Publish directory:
build
Manual deploy with Netlify CLI
You can also deploy directly from your local machine using the Netlify CLI.Production build details
When you runnpm run build (or npm run netlify), Create React App uses Webpack to produce a minified, tree-shaken output in the build/ directory:
- JavaScript is split into chunks automatically. Only the code needed for the initial render is loaded upfront; additional routes load their bundles on demand.
- CSS is extracted and minified.
- Static assets in
public/(including_redirects,favicon.ico,manifest.json, androbots.txt) are copied directly intobuild/.
Environment considerations
- No environment variables — there are no API keys or secrets. All site data (projects, work history, blog articles) is embedded in the source code under
src/constants/. - Images — photos are hosted externally on Cloudinary. There are no large media files to manage as part of the build or deployment.
Custom domain
The custom domain
patrickrfoster.com is configured in Netlify’s Domain management settings for the site. DNS records point to Netlify’s servers. No additional configuration in the repository is required for the domain to work.