Important: This file and README.md should always be kept in sync. When updating project information, documentation, or development workflow in one file, make sure to update the other accordingly.
This is a single-page website for Planet Nix, built with simplicity in mind - no build steps required. Optimized for performance with a Lighthouse score of 91/100.
- HTML5: Semantic markup for the single-page structure in
index.html - Pico CSS: Minimal, elegant CSS framework
- Classless semantic CSS framework
- Responsive by default with mobile-first design
- Built-in dark mode support
- Beautiful typography out of the box
- No utility classes needed - uses semantic HTML
- Flox: Reproducible development environment
- Handles all environment setup and dependencies
- Ensures consistent development environment across machines
- Just: Command runner for common tasks
just dev- Start development serverjust perf- Check performancejust lighthouse- Run full audit
- livereload: Automatic browser refresh during development
- Lighthouse: Performance monitoring and CI
planetnix-website/
├── index.html # Main single-page website (with inlined CSS)
├── assets/ # All website resources
│ ├── css/
│ │ └── pico.min.css # Pico CSS framework
│ ├── fonts/ # Local fonts (Geist, Geist Mono)
│ ├── images/ # Source images (PNGs, SVGs)
│ │ └── generated/ # Generated images (WebP, responsive sizes)
│ └── js/ # JavaScript files (if needed)
├── Justfile # Command runner recipes with inline docs
├── .github/workflows/ # CI/CD automation
│ └── lighthouse-pr.yml # Automated performance testing
├── CLAUDE.md # Project documentation for AI assistants
└── README.md # User-facing documentation
All extra resources needed for the website should be placed in the assets/ folder:
- assets/css/ - CSS stylesheets (Pico CSS only; custom styles are inlined in index.html for performance)
- assets/fonts/ - Local font files (Geist 400/700, Geist Mono 400 - only critical weights)
- assets/images/ - Source images (PNG, SVG) and icons
- Source PNGs are optimized using pngquant and optipng
- Total size reduced from 2.3 MB to 556 KB
- DO NOT manually edit files in generated/ folder
- assets/images/generated/ - Generated/optimized images (automatically created)
- WebP versions of all source PNGs
- Responsive image sizes (480w, 768w, 1024w) for background images
- Lazy loading for below-the-fold images
- This folder is regenerated by
just regenerate-all-images
- assets/js/ - JavaScript files for interactivity (minimal)
# 1. Enter the development environment
flox activate
# 2. Start the development server (managed by Flox services)
flox services start
# 3. Edit index.html - changes reload automatically
# 4. Stop the server when done
flox services stopImportant: Development server is managed by Flox services, not Just commands.
# Development Server (Flox Services)
flox activate # Enter environment first
flox services start # Start dev server (http://localhost:8888)
flox services stop # Stop dev server
flox services status # Check server status
# Just Commands (run within Flox environment)
flox activate -- just # List all available commands
flox activate -- just perf # Quick performance check (91/100 current)
flox activate -- just lighthouse # Full performance audit with HTML report
flox activate -- just lighthouse-mobile # Mobile performance test
flox activate -- just optimize-images # Re-optimize source PNG images in-place
flox activate -- just generate-responsive-images # Create responsive image sizes in generated/
flox activate -- just generate-favicons # Generate all favicon and app icons
flox activate -- just regenerate-all-images # Regenerate ALL images (WebP + responsive)
flox activate -- just clean # Remove generated reportsAlternatively, activate the Flox shell first, then run commands directly:
flox activate
# Shows environment info and available commands automatically
# Now you can run commands directly:
flox services start
just perf
just lighthouse
flox services stop- Local: Start server with
flox services start, then usejust perfbefore committing - CI/CD: Automated Lighthouse tests on every PR
- Comparison: CI compares PR performance vs base branch
- Reports: Posted as PR comments with score deltas
- Note: Lighthouse commands require the dev server to be running
- No Claude attribution: Do not include any Claude-related attribution in commit messages or pull requests
- No "🤖 Generated with Claude Code" footer
- No "Co-Authored-By: Claude" lines
- Keep commit messages clean and professional
- No test plans: Do not include test plans or testing checklists in PR descriptions
- Keep PR descriptions concise and focused on the changes made
- Describe what was changed and why, not how to test it
- Source images (
assets/images/): Original PNGs and SVGs- Edit and optimize these files when you need to change images
- Use
just optimize-imagesto optimize source PNGs in-place
- Generated images (
assets/images/generated/): Auto-generated WebP and responsive sizes- NEVER manually edit files in this folder
- Regenerate with
just regenerate-all-imagesorjust generate-responsive-images - These files are referenced in index.html for optimal loading
- Add source PNG/SVG to
assets/images/ - Optimize it:
flox activate -- just optimize-images - Regenerate all optimized versions:
flox activate -- just regenerate-all-images - Update index.html to reference the new image (use generated/ for WebP versions)
- Replace
assets/images/planetnix-logo-small.pngwith your new logo - Regenerate all favicons:
flox activate -- just generate-favicons - All favicon and app icons will be updated in
assets/images/generated/
- No build process: Direct HTML and CSS for maximum simplicity
- Single-page design: All content accessible from one page
- Semantic styling: Pico CSS uses semantic HTML, no utility classes
- Performance first: Every optimization counts
- Separation of source and generated: Source images in
assets/images/, generated inassets/images/generated/- Images: 2.3 MB → 556 KB (76.6% reduction)
- Initial load: Only 139 KB of images (lazy loading)
- CSS inlined: Custom styles inlined to eliminate render-blocking requests
- Lighthouse score: 91/100
- Reproducible environment: Flox ensures consistent setup across machines
- Automated quality: CI/CD prevents performance regressions
- ✅ Image optimization: pngquant + optipng (76.6% size reduction)
- Source images in
assets/images/(PNGs, SVGs) - Generated images in
assets/images/generated/(WebP, responsive sizes) - Regenerate all with
just regenerate-all-images
- Source images in
- ✅ Responsive images: Multiple sizes (480w, 768w, 1024w, 1280w) for adaptive loading
- Why responsive? Saves 142 KB on mobile by serving appropriately sized images
- Background images use
srcsetto load optimal size based on viewport - Generated using
just generate-responsive-imagescommand - Smaller images for mobile (480w: ~15KB) vs desktop (1280w: ~100KB)
- All generated files placed in
assets/images/generated/
- ✅ Lazy loading: Below-the-fold images load on demand
- ✅ Explicit image dimensions: All images have width/height attributes
- Why? Prevents layout shift (CLS) during page load
- CSS ensures responsiveness:
max-width: 100%; height: auto; - Browser calculates aspect ratio from dimensions, CSS controls display size
- ✅ CSS inlining: Custom styles (11.4 KB) inlined in HTML to eliminate render-blocking request
- Why inlined? Eliminates 700ms render-blocking network request, improves FCP and LCP
- Pico CSS (22 KB) remains external as it's cached and essential for semantic styling
- ✅ Font optimization: Only critical font weights loaded (Geist 400/700, Geist Mono 400)
- Reduced from 18 font files to 3, eliminating 100+ KB of unused fonts
- Preloaded with
fetchpriority="high"for faster discovery - Using
font-display: swapto prevent invisible text
- ✅ LCP optimization: Hero moon image with
fetchpriority="high"and preload hint - ✅ Zero layout shift (CLS: 0): Inline CSS + explicit image dimensions prevent FOUC
- ✅ Semantic HTML: No unnecessary divs or classes
- GitHub Actions: Automated Lighthouse audits on every PR
- Performance tracking: Score comparisons show impact of changes
- Just commands: Easy local testing before pushing