My personal web site. Of note:
- React single page web app, written in TypeScript and built with Vite
- Redux state management
- Progressive web app architecture using workbox
- Static asset precaching using service-worker.ts
- Logo cube on home page. see LogoCube source and my blog post on Animations in React
- Matrix Digital Rain Effect component. Gives you your favorite Matrix movie screen effect in the form of a React component. Implemented as an npm package.
- Content component. An optimized content library sourced by Api's from GitHub, YouTube and Wordpress.
Requires Node.js 22.18 or later (24 recommended) and yarn 1.
git clone https://github.com/lpm0073/lawrencemcdaniel.com.git
cd lawrencemcdaniel.com
yarn installyarn start # dev server with hot reloading, http://localhost:3000
yarn test # unit tests (Vitest), once
yarn test:watch # unit tests, re-run on every change
yarn coverage # unit tests with a coverage report in coverage/
yarn lint # ESLint
yarn typecheck # TypeScript
yarn format # Prettier
yarn build # production build into build/ (uploads nothing)
yarn preview # serve build/ on http://localhost:3000, with the service worker
yarn sitemap # regenerate public/sitemap.xml
make test # everything CI checks: formatting, lint, types, testsThe service worker is only registered in production builds, so check offline
and caching behavior with yarn build && yarn preview.
Repository, blog and YouTube metadata are served from
https://lawrencemcdaniel.com/data/*.json, which the Node scripts in
src/shared/fetchers/ generate into public/data/
(make github, make blog, make yt). They read API keys from .env
(PAT for GitHub, YT for YouTube). make update runs all three and uploads
the results to S3; the Weekly Data Update
workflow does this every Monday.
Every merge to main is tested, released and deployed to production,
automatically, by deploy.yml:
- test: test.yml checks formatting, lint, types, the unit tests (uploading coverage to Codecov) and the build. It also runs on every pull request.
- release: semantic-release creates a GitHub release and updates
CHANGELOG.mdfrom the conventional commit messages. - deploy: builds the site (
make site), uploads it to AWS S3 and invalidates the CloudFront CDN.
A failure at any stage stops the stages after it. This is the only way the
site is deployed. To redeploy main without a new merge, run the workflow by
hand: gh workflow run deploy.yml, or Run workflow on the Actions tab.
- API: https://api.lawrencemcdaniel.com/
- CDN: https://cdn.lawrencemcdaniel.com/
- Vite and vite-plugin-pwa
- Vitest and React Testing Library
- Deploy to AWS S3
- Configure Cloudfront
- React Bootstrap