Skip to content

Phase 0 - Foundation Decisions

Done

  • Track: Both (MVP & Showcase)
  • Effort: Minimal, foundational setup
  • Dependencies: None
  • Deliverables: Core architecture decisions, repository setup, development environment
  • Project requirements defined
  • Hosting platform chosen
  • Team assembled (if applicable)
  • Development machines ready
StepTaskMVPShowcaseNotes
0.01Initialize repositoryInclude .gitignore, README
0.02Choose package managerpnpm recommended for speed
0.03Set up Node.js versionUse .nvmrc with Node 22.x LTS
0.04Select framework versionAstro 5.11.0 stable
0.05Configure TypeScriptStrict mode from start
0.05aConfigure Biome (lint/format)Init @biomejs/biome & VSCode extension
0.06Initialize Astro projectUse create-astro CLI
0.07Set up Git hooksHusky + lint-staged
0.08Create branch strategyDocument in README
0.09Configure environment vars.env.example template
0.10Create ADR structuredocs/adr/template.md
0.11Document key decisionsFirst ADR entry
Terminal window
# Create project with pnpm
pnpm create astro@latest my-portfolio -- \
--template minimal \
--typescript strict \
--git \
--no-install
cd my-portfolio
pnpm install
package.json
{
"packageManager": "pnpm@9.15.0",
"engines": {
"node": ">=22.0.0",
"pnpm": ">=9.0.0"
},
"scripts": {
"dev": "astro dev",
"build": "astro build",
"preview": "astro preview",
"check": "astro check && tsc --noEmit",
"format": "biome format --write .",
"lint": "biome check --write ."
}
}

{% snippet “biome-config” %}

root = true
[*]
charset = utf-8
indent_style = space
indent_size = 2
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
.nvmrc
22.16.0

{% snippet “tsconfig-paths” %}

{% snippet “git-hooks” %}

{% snippet “lint-staged-config” %}

{% snippet “env-example” %}

{% snippet “adr-template” %}

docs/git-workflow.md
## Branch Strategy
### Main Branches
- `main` - Production-ready code
- `develop` - Integration branch (Showcase only)
### Feature Branches
- `feature/*` - New features
- `fix/*` - Bug fixes
- `docs/*` - Documentation updates
### Workflow
1. Create feature branch from main
2. Make changes with conventional commits
3. Open PR with description
4. Merge after review (Showcase) or self-merge (MVP)
### Commit Convention
- `feat:` - New feature
- `fix:` - Bug fix
- `docs:` - Documentation
- `style:` - Formatting
- `refactor:` - Code restructuring
- `perf:` - Performance improvement
- `test:` - Testing
- `chore:` - Maintenance
  1. Wrong Package Manager: Mixing npm/yarn/pnpm causes lockfile conflicts

    • Solution: Commit .npmrc with engine-strict=true
  2. Loose TypeScript: Starting without strict mode makes it hard to enable later

    • Solution: Always start with strict mode, add // @ts-expect-error sparingly
  3. Missing Git Hooks: Code quality degrades without automation

    • Solution: Set up hooks before writing code
  4. Environment Variable Confusion: Hardcoded values in code

    • Solution: Use .env.example and validate on startup
  • Repository initialized with correct .gitignore
  • Package manager locked (pnpm-lock.yaml committed)
  • Node.js version specified (.nvmrc file)
  • TypeScript in strict mode
  • Git hooks functioning (test with commit)
  • Branch strategy documented
  • Environment variables structured
  • ADR template and first decision recorded
  • README has basic project information

If critical issues found after Phase 0:

  1. Package Manager Issues:

    Terminal window
    rm -rf node_modules pnpm-lock.yaml
    pnpm install
  2. Git Configuration Issues:

    Terminal window
    rm -rf .git
    git init
    # Re-apply configuration
  3. Framework Version Issues:

    • Update package.json to stable version
    • Clear cache: pnpm store prune
    • Reinstall dependencies
  • package.json - Verify scripts and dependencies
  • tsconfig.json - TypeScript configuration
  • .husky/pre-commit - Git hooks
  • docs/adr/001-foundation.md - Key decisions
  • “Set up Astro 5.11.0 project with TypeScript strict mode”
  • “Configure Biome for Astro project”
  • “Create Git hooks for code quality”
  • “Write ADR for foundation decisions”
  • Project type (portfolio, blog, marketing)
  • Team size (solo vs team)
  • Deployment target (Cloudflare Pages, Vercel, etc.)