Skip to content

Commit d4de1dc

Browse files
committed
Add project guide documentation for Safari CDN status extension
Provides comprehensive project overview, including: - Key files and their purposes - Testing instructions - Release process for GitHub and App Store - Versioning strategy - Project structure - Supported CDNs This documentation helps developers understand the project setup, workflow, and technical details.
1 parent b93df76 commit d4de1dc

1 file changed

Lines changed: 79 additions & 0 deletions

File tree

CLAUDE.md

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
# Project Guide
2+
3+
Safari extension that displays CDN cache status (HIT/MISS) for the current page.
4+
5+
## Key Files
6+
7+
| File | Purpose |
8+
|------|---------|
9+
| `CHANGELOG.md` | Technical changelog for developers |
10+
| `RELEASE_NOTES.md` | User-facing release notes (App Store "What's New") |
11+
| `RELEASE.md` | Full release documentation and workflow |
12+
| `PRIVACY.md` | Privacy policy |
13+
| `scripts/config.sh` | Shared config (APP_NAME, PROJECT, SCHEME) |
14+
15+
## Testing
16+
17+
```bash
18+
just test # Run CDN detection tests (27 test cases)
19+
```
20+
21+
Tests are in `tests/cdn-detection.test.js` and validate all CDN detection rules in `constants.js`.
22+
23+
## Release Process
24+
25+
### Direct Distribution (GitHub)
26+
27+
```bash
28+
git tag v0.0.X
29+
git push origin v0.0.X
30+
just release v0.0.X # Archive and submit for notarization
31+
just status # Check notarization status
32+
just staple # After approval: staple ticket
33+
just dmg # Create DMG installer
34+
gh release create v0.0.X # Create GitHub release with assets
35+
```
36+
37+
### App Store
38+
39+
```bash
40+
just release-appstore v0.0.X # Archive and upload to App Store Connect
41+
```
42+
43+
Then submit for review in App Store Connect.
44+
45+
## Versioning
46+
47+
- **Git tag is the single source of truth**
48+
- `MARKETING_VERSION` auto-derived from tag (v0.0.8 → 0.0.8)
49+
- `CURRENT_PROJECT_VERSION` (build number) = git commit count
50+
- No manual Xcode version updates needed
51+
52+
## Project Structure
53+
54+
```
55+
CF Cache Status/
56+
├── CF Cache Status/ # macOS container app (SwiftUI)
57+
└── CF Cache Status Extension/ # Safari Web Extension
58+
└── Resources/
59+
├── manifest.json # Extension config
60+
├── constants.js # CDN detection rules
61+
├── background.js # Header capture
62+
└── popup.js/html/css # Popup UI
63+
64+
scripts/
65+
├── config.sh # Shared variables
66+
├── archive.sh # Build for direct distribution
67+
├── archive-appstore.sh # Build for App Store
68+
├── submit.sh # Submit for notarization
69+
├── staple.sh # Staple and create zip
70+
└── create-dmg.sh # Create DMG installer
71+
72+
Justfile # Build commands
73+
```
74+
75+
## Supported CDNs
76+
77+
Cloudflare, CloudFront, Fastly, Akamai, Bunny CDN, Varnish, and any CDN using x-cache headers.
78+
79+
Detection rules are in `constants.js`.

0 commit comments

Comments
 (0)