Development Workflow
Relevant source files
The following files were used as context for generating this wiki page:
The development workflow for lukemcdonald.com ensures code quality, consistency, and automated verification through a strictly defined set of procedures. This workflow utilizes pnpm as the primary package manager and incorporates Astro for the development environment.
Local Development and Validation
Local development follows a cycle of coding, continuous validation, and auditing. You start the development server using pnpm dev --background and monitor its status via pnpm astro dev status.
Validation Pipeline
Before marking any task as complete or opening a Pull Request (PR), you must execute the following validation pipeline:
- Code Validation: Run
pnpm validateto execute linting, formatting checks, Astro checks, and unit tests. - Type Checking: Run
pnpm typecheckto perform Astro synchronization and TypeScript non-emitting checks. - Code Auditing: After meaningful logic changes, run
pnpm run audit:code(utilizing the Fallow tool). - Final Audit: Before opening a PR, run
pnpm exec fallow audit --base origin/main.
Sources: AGENTS.md:7-12, package.json:20-37
Development Commands
| Command | Action |
|---|---|
pnpm dev | Starts the Astro development server. |
pnpm validate | Runs lint, format:check, check, and test scripts. |
pnpm typecheck | Syncs Astro and runs tsc --noEmit. |
pnpm audit:code | Executes Fallow audit and health reports. |
pnpm test | Runs unit tests using tsx --test. |
Sources: package.json:20-37
Testing Architecture
The project employs two distinct testing layers: Unit Tests and End-to-End (E2E) tests.
Unit Testing
Unit tests are colocated with the source code using the *.test.ts naming convention. They use node:test and node:assert/strict for execution and assertions.
E2E Testing
E2E tests use Playwright to verify browser-level behavior and accessibility compliance. These tests reside in the e2e/ directory and use the *.spec.ts extension.
The diagram shows the parallel testing paths for local unit verification and browser-level E2E validation.
Sources: AGENTS.md:112-126, e2e/README.md:1-10
Contribution Standards
Strict coding and communication standards are enforced to maintain a clean repository history and consistent code style.
Code Conventions
- No Emojis: Do not use emojis in code, commits, or PR descriptions.
- Alphabetization: Alphabetize imports, object keys, and component props.
- Formatting: Put
returnstatements on their own line; do not use inline returns. - Comments: Use JSDoc only when adding context beyond the function name (max 2 lines).
Sources: AGENTS.md:16-24, AGENTS.md:36-39
Commit and Pull Request Flow
The repository uses Conventional Commits. PRs are squash-merged into the main branch, making the PR title the final commit message.
The sequence diagram illustrates the lifecycle of a code change from local commit to CI validation and final merge.
Sources: AGENTS.md:26-34, e2e/README.md:131-136
Deployment and Automation
Deployments are managed via Netlify, supported by automated rebuilding processes for dynamic content.
Rebuild and Hosting
- Static Hosting: The site is hosted on Netlify.
- Daily Rebuilds: A Netlify background function (
daily-rebuild) is scheduled to run daily at 10:00 UTC using a CRON schedule (0 10 * * *). This triggers a rebuild via theNETLIFY_BUILD_HOOK_URL. - Analytics: Cloudflare Web Analytics is integrated via the
CLOUDFLARE_ANALYTICS_TOKENenvironment variable.
Sources: README.md:7-13, netlify/functions/daily-rebuild/index.test.ts:21-23