Skip to content

Latest commit

 

History

History
113 lines (83 loc) · 3.47 KB

File metadata and controls

113 lines (83 loc) · 3.47 KB

CLAUDE.md

This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.

Critical Rules

These rules override all other instructions:

  1. NEVER commit directly to main - Always create a feature branch and submit a pull request
  2. Conventional commits - Format: type(scope): description
  3. GitHub Issues for TODOs - Use gh CLI to manage issues, no local TODO files. Use conventional commit format for issue titles
  4. Pull Request titles - Use conventional commit format (same as commits)
  5. Branch naming - Use format: type/scope/short-description (e.g., feat/site/new-page)
  6. Working an issue - Always create a new branch from an updated main branch
  7. Check branch status before pushing - Verify the remote tracking branch still exists. If a PR was merged/deleted, create a new branch from main instead
  8. Write tests - All new/refactored code requires tests where applicable
  9. Run validation before commits - Run npm run build (type check, build) in the website directory before committing and pushing
  10. No co-authors - Do not add co-author information on commits or pull requests
  11. No "generated by" statements - Do not add generated-by statements on pull requests

GitHub CLI Commands

gh issue list                    # List open issues
gh issue view <number>           # View details
gh issue create --title "type(scope): description" --body "..."
gh issue close <number>

Conventional Commit Types

Type Description
feat New feature
fix Bug fix
docs Documentation only
refactor Code change that neither fixes a bug nor adds a feature
test Adding or updating tests
chore Maintenance tasks
perf Performance improvement
ci CI/CD changes

Project Overview

This is the dtvem.io website - the official documentation and landing page for dtvem (Development Tool Virtual Environment Manager). It's built with Astro and hosted on Cloudflare Pages.

Build Commands

# Navigate to website directory
cd website

# Install dependencies
npm install

# Start dev server
npm run dev

# Build production site
npm run build

# Type check
npx astro check

# Preview production build
npm run preview

Architecture

Directory Structure

website/
├── src/
│   ├── pages/          # Astro pages
│   ├── layouts/        # Page layouts
│   ├── components/     # Reusable components
│   └── styles/         # Global styles
├── public/             # Static assets (install scripts)
│   ├── install.sh      # Unix installer
│   └── install.ps1     # Windows installer
├── astro.config.mjs    # Astro configuration
└── package.json

Key Features

  • Static site generation with Astro
  • Install script hosting (dtvem.io/install.sh, dtvem.io/install.ps1)
  • Documentation pages
  • Cloudflare Pages deployment

CI/CD

GitHub Actions workflows in .github/workflows/:

  • build.yml - Build validation on push/PR
  • deploy.yml - Deploy to Cloudflare Pages on push to main
  • commit-lint.yml - Validate PR titles follow conventional commits
  • contributors.yml - Auto-update contributors in README

Deployment

The site is deployed to Cloudflare Pages using Wrangler.

  • Configuration: website/wrangler.toml
  • Deploy trigger: Push to main (changes to website/**)
  • Required secret: CLOUDFLARE_API_TOKEN