Prerequisites
Before you begin, make sure you have the following installed:| Tool | Minimum version | Check your version |
|---|---|---|
| Node.js | 14 | node --version |
| npm | 6 | npm --version |
| Git | any | git --version |
Node.js 14 is the minimum supported by Create React App 5. Node.js 18 LTS or later is recommended for the best compatibility.
Setup
Install dependencies
Install all required npm packages from This installs React 18, React Router DOM, and the Create React App toolchain locally.
package.json.Start the development server
Building and testing
Production build
build/ directory. The output is optimized for production: assets are hashed for cache-busting and JavaScript is tree-shaken.
Netlify build
The Netlify deployment uses a dedicated script that suppresses warnings-as-errors:CI=false npm run build as defined in package.json. Use this command if you want to produce a production build that behaves exactly as it does on Netlify.
Run tests
a to run all tests, or q to quit.
Create React App 5 uses Jest with jsdom. Test files should be placed alongside the components they test with a
.test.js or .spec.js suffix, or inside a __tests__/ directory.Project structure walkthrough
Understanding where things live makes it straightforward to add or change content.src/App.js
The top-level component. It defines all routes using React Router’s <Route> components and imports the four top-level page components (Home, Blog, Haus, ViewBlog). If you add a new page, you register its route here.
src/components/
One file per page section or route:
| File | Purpose |
|---|---|
Blog.js | Lists all blog posts from the articles constants |
ViewBlog.js | Renders a single blog post matched by :id route param |
Work.js | Renders the work experience timeline |
Card.js | Shared card UI component used across sections |
Haus.js | The Magic: The Gathering page |
src/constants/
All site content is stored as plain JavaScript exports. No CMS or API is involved.
| File | Content |
|---|---|
articles.js | Array of blog post metadata (title, date, id) and getArticle(id) lookup function |
articles/netflix.js | Full body content for a specific article |
projects.js | Array of software project objects |
work.js | Array of work experience objects |
Adding content
Add a new project
Opensrc/constants/projects.js and append a new object to the exported array. Match the shape of the existing entries exactly:
src/constants/projects.js
Add a new work experience entry
Opensrc/constants/work.js and add a new object to the top of the array (most recent first). Match the shape of the existing entries:
src/constants/work.js
text and image are optional. For confidential or undisclosed roles, you can omit them and only include title and timeLine.Add a new blog article
Create the article body file
Add a new file in
src/constants/articles/, following the pattern of netflix.js. Export an object with title, date, and content (the content can be a JSX element):src/constants/articles/my-article.js
Register the article in articles.js
Open
src/constants/articles.js, import your new article, and add it to both articles and idsAndArticles:src/constants/articles.js
Deployment
The site deploys to Netlify. Push changes to the connected branch (typicallymain) and Netlify will automatically trigger a build using CI=false npm run build. No manual deploy step is required.
The public/_redirects file ensures the SPA works correctly on Netlify:
index.html for every request path, which hands control to React Router running in the browser.