diff --git a/CLAUDE.md b/CLAUDE.md
index 29eed55..b4029ed 100644
--- a/CLAUDE.md
+++ b/CLAUDE.md
@@ -68,6 +68,9 @@ bun run check # Check formatting without modifying
# Python
black server.py # Format Python code
pylint server.py # Lint Python code
+
+# File References
+just validate-references # Check HTML/manifest file references exist
```
### Icon Generation
@@ -164,10 +167,11 @@ node app/create-icons.js # Generate PNG icons
- Print styles
### Code Quality
-- ESLint: No errors, minimal warnings
+- ESLint: No errors, no warnings
- Prettier: All files formatted
- Black: Python code formatted
- Pylint: Score 10/10
+- File References: All HTML/manifest references exist
## Common Tasks
diff --git a/app/index.html b/app/index.html
index a32fd12..b4703c7 100644
--- a/app/index.html
+++ b/app/index.html
@@ -10,9 +10,9 @@
GlitchCraft - Artisanal Text Corruption
-
-
-
+
+
+
diff --git a/app/manifest.json b/app/manifest.json
index ab4102c..6e566fe 100644
--- a/app/manifest.json
+++ b/app/manifest.json
@@ -9,54 +9,47 @@
"orientation": "portrait-primary",
"icons": [
{
- "src": "icons/icon-72.png",
+ "src": "icons/icon-72.svg",
"sizes": "72x72",
- "type": "image/png"
+ "type": "image/svg+xml"
},
{
- "src": "icons/icon-96.png",
+ "src": "icons/icon-96.svg",
"sizes": "96x96",
- "type": "image/png"
+ "type": "image/svg+xml"
},
{
- "src": "icons/icon-128.png",
+ "src": "icons/icon-128.svg",
"sizes": "128x128",
- "type": "image/png"
+ "type": "image/svg+xml"
},
{
- "src": "icons/icon-144.png",
+ "src": "icons/icon-144.svg",
"sizes": "144x144",
- "type": "image/png"
+ "type": "image/svg+xml"
},
{
- "src": "icons/icon-152.png",
+ "src": "icons/icon-152.svg",
"sizes": "152x152",
- "type": "image/png"
+ "type": "image/svg+xml"
},
{
- "src": "icons/icon-192.png",
+ "src": "icons/icon-192.svg",
"sizes": "192x192",
- "type": "image/png",
+ "type": "image/svg+xml",
"purpose": "any maskable"
},
{
- "src": "icons/icon-384.png",
+ "src": "icons/icon-384.svg",
"sizes": "384x384",
- "type": "image/png"
+ "type": "image/svg+xml"
},
{
- "src": "icons/icon-512.png",
+ "src": "icons/icon-512.svg",
"sizes": "512x512",
- "type": "image/png",
+ "type": "image/svg+xml",
"purpose": "any maskable"
}
],
- "categories": ["utilities", "productivity"],
- "screenshots": [
- {
- "src": "screenshots/screenshot1.png",
- "type": "image/png",
- "sizes": "1280x720"
- }
- ]
+ "categories": ["utilities", "productivity"]
}
\ No newline at end of file
diff --git a/justfile b/justfile
index e463c0d..4f1acdd 100644
--- a/justfile
+++ b/justfile
@@ -55,8 +55,8 @@ lint-all: lint-js lint-python
format-all: format-python format
@echo "ā All formatting completed"
-# Check everything (linting + formatting)
-check-all: lint-all check-format
+# Check everything (linting + formatting + references)
+check-all: lint-all check-format validate-references
@echo "ā All checks passed"
# PWA icon generation
@@ -97,8 +97,12 @@ validate-html:
validate-manifest:
python3 -m json.tool app/manifest.json > /dev/null && echo "ā Manifest is valid JSON"
+# Check file references (HTML, manifest)
+validate-references:
+ python3 lint-references.py
+
# Run all validations
-validate: validate-html validate-manifest check-all
+validate: validate-html validate-manifest validate-references check-all
@echo "ā All validations passed"
# Git helpers
diff --git a/lint-references.py b/lint-references.py
new file mode 100755
index 0000000..ff83722
--- /dev/null
+++ b/lint-references.py
@@ -0,0 +1,147 @@
+#!/usr/bin/env python3
+"""
+Reference validator for GlitchCraft
+Checks that all file references in HTML and manifest actually exist
+"""
+
+import json
+import os
+import re
+import sys
+from pathlib import Path
+
+
+def check_file_exists(file_path, base_dir):
+ """Check if a file exists relative to base directory."""
+ full_path = base_dir / file_path
+ return full_path.exists()
+
+
+def extract_html_references(html_content):
+ """Extract file references from HTML content."""
+ references = []
+
+ # Link href attributes
+ for match in re.finditer(r']+href=["\']([^"\']+)["\']', html_content):
+ href = match.group(1)
+ if not href.startswith(('http://', 'https://', '//', 'data:', '#')):
+ references.append(href)
+
+ # Script src attributes
+ for match in re.finditer(r'