Skip to content

Commit 8cc510f

Browse files
committed
docs: add CLAUDE.md with codebase overview for AI assistants
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GQkuCo6PEN2NYUkJiCP5jG
1 parent ba4bb5e commit 8cc510f

1 file changed

Lines changed: 60 additions & 0 deletions

File tree

CLAUDE.md

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
# CLAUDE.md
2+
3+
## Project Overview
4+
5+
This is the **Maximum PC Builds Archive** — an archive of PC builds featured in Maximum PC magazine. Content is stored as Markdown files organized by year/month, with a companion website on the `gh-pages` branch. A Python scraper automatically updates part prices daily via GitHub Actions.
6+
7+
## Repository Structure
8+
9+
```
10+
├── 2018/, 2020/, 2021/ # Build archives by year → month → build markdown files
11+
├── docs/ # Documentation assets (images, etc.)
12+
├── .github/
13+
│ ├── workflows/ # GitHub Actions (gitleaks, update-prices)
14+
│ ├── agents/ # GitHub Copilot agent configs
15+
│ └── ISSUE_TEMPLATE/ # Issue templates
16+
├── scraper.py # PCPartPicker price scraper (Python 3.12)
17+
├── requirements.txt # Python deps: beautifulsoup4, requests, lxml
18+
├── README.md # Main docs with table of contents linking all builds
19+
└── CONTRIBUTING.md # Contribution guidelines
20+
```
21+
22+
## Build File Conventions
23+
24+
- Each build is a Markdown file named by category: `AMD Budget.md`, `Intel Turbo.md`, etc.
25+
- Pre-2020 builds: Budget, Mid-Range, Turbo categories only.
26+
- 2020+: Separate AMD and Intel variants for each tier.
27+
- Files contain PCPartPicker list links and component tables with prices.
28+
29+
## Development
30+
31+
### Price Scraper
32+
33+
```bash
34+
pip install -r requirements.txt
35+
python scraper.py # Updates prices in all build markdown files
36+
DEBUG=1 python scraper.py # Verbose logging
37+
```
38+
39+
The scraper (`scraper.py`) extracts PCPartPicker URLs from markdown files, scrapes current prices, and updates the files in-place. It runs daily at 2 AM UTC via `.github/workflows/update-prices.yml`.
40+
41+
### CI/CD
42+
43+
- **update-prices.yml** — Daily automated price scraping, commits changes directly to main.
44+
- **gitleaks.yml** — Secret scanning on pushes/PRs.
45+
- **GitHub Pages** — The `gh-pages` branch serves the website.
46+
47+
## Commit Message Convention
48+
49+
Format: `type(scope): description`
50+
51+
Examples from history:
52+
- `feat(pip): bump lxml to 6.1.0`
53+
- `fix(github-actions/workflows): update dependencies of gitleaks action to v3`
54+
55+
## Key Guidelines
56+
57+
- Never commit `.env` files or secrets.
58+
- When adding a new magazine issue: create markdown files in the appropriate `year/month/` folder, then update the README table of contents.
59+
- The scraper respects rate limits (2s delay between requests) — do not reduce this.
60+
- Python version: 3.12. Dependencies are pinned in `requirements.txt`.

0 commit comments

Comments
 (0)