Skip to content
/ sindex Public

Modern website for Sinister Dexter funk & soul band

Notifications You must be signed in to change notification settings

dweekly/sindex

Repository files navigation

Sinister Dexter Website

A modern, minimalist website for the San Francisco Bay Area funk & soul band Sinister Dexter with automated image processing.

Features

  • Responsive Design - Mobile-first approach, works on all devices
  • Automated Image Processing - Drop images in photos/, they're automatically resized and optimized
  • Dynamic Content - Shows and gallery loaded from JSON/processed images
  • Hero Section - Eye-catching landing with band tagline
  • Shows Section - Upcoming performances loaded from shows.json
  • Music Streaming - Embedded Spotify and Apple Music players
  • Photo Gallery - Lightbox-enabled gallery with multiple image sizes
  • Social Links - Instagram, X, Facebook, YouTube (coming soon)
  • Mailing List - Email signup form (ready for integration)
  • Merch Section - Placeholder for future merchandise store

Tech Stack

  • HTML5
  • Tailwind CSS (via CDN)
  • Vanilla JavaScript
  • Node.js for image processing (Sharp)
  • Font Awesome icons
  • Google Fonts (Bebas Neue & Inter)

Project Structure

/sindex
β”œβ”€β”€ docs/               # Documentation
β”‚   β”œβ”€β”€ CLAUDE.md       # AI assistant context
β”‚   β”œβ”€β”€ DEPLOYMENT.md   # Deployment guide
β”‚   β”œβ”€β”€ SETUP.md        # Setup instructions
β”‚   └── ...             # Other documentation
β”‚
β”œβ”€β”€ scripts/            # Build and utility scripts
β”‚   β”œβ”€β”€ build.js        # Main build script
β”‚   β”œβ”€β”€ process-images.js # Image processing
β”‚   β”œβ”€β”€ test-site.js    # Testing suite
β”‚   └── ...             # Other scripts
β”‚
β”œβ”€β”€ template/           # Source templates and data
β”‚   β”œβ”€β”€ data/           # JSON data files
β”‚   β”‚   β”œβ”€β”€ members.json    # Band members
β”‚   β”‚   β”œβ”€β”€ shows.json      # Show listings
β”‚   β”‚   β”œβ”€β”€ tracks.json     # Music tracks
β”‚   β”‚   └── videos.json     # YouTube videos
β”‚   β”œβ”€β”€ partials/       # Handlebars templates
β”‚   β”‚   β”œβ”€β”€ components/     # Reusable components
β”‚   β”‚   β”œβ”€β”€ sections/       # Page sections
β”‚   β”‚   └── head/           # HTML head elements
β”‚   └── styles.css      # Source Tailwind CSS
β”‚
β”œβ”€β”€ public/             # Generated output (DO NOT EDIT)
β”‚   β”œβ”€β”€ index.html      # Generated website
β”‚   β”œβ”€β”€ index.php       # PHP version
β”‚   β”œβ”€β”€ styles.css      # Compiled CSS
β”‚   └── images/         # Processed images
β”‚       β”œβ”€β”€ thumbnail/      # 400x400
β”‚       β”œβ”€β”€ small/          # 640x480
β”‚       β”œβ”€β”€ medium/         # 1024x768
β”‚       β”œβ”€β”€ large/          # 1920x1080
β”‚       └── manifest.json   # Image registry
β”‚
β”œβ”€β”€ photos/             # Source photos for processing
β”œβ”€β”€ package.json        # NPM configuration
β”œβ”€β”€ tailwind.config.js  # Tailwind configuration
└── README.md           # This file

Contributing Guidelines

⚠️ IMPORTANT: All changes MUST be made through pull requests. Direct commits to the main branch are not allowed.

Making Changes

  1. Create a new branch from main:

    git checkout main
    git pull origin main
    git checkout -b feature/your-feature-name
  2. Make your changes on the feature branch

  3. Test your changes locally:

    npm run build:test  # Build and run tests
    npm run dev        # Preview locally
  4. Commit and push your branch:

    git add .
    git commit -m "Descriptive commit message"
    git push origin feature/your-feature-name
  5. Create a Pull Request on GitHub:

    • Go to the repository on GitHub
    • Click "Compare & pull request"
    • Provide a clear description of your changes
    • Wait for review and approval

Pull Request Requirements

  • All tests must pass
  • Clear, descriptive commit messages
  • Updated documentation if needed
  • No direct commits to main branch

Automated Deployment

When your PR is merged to main, the site will automatically:

  1. Run all tests
  2. Build the production site
  3. Deploy to the live server

Quick Start

# Install dependencies
npm install

# Build and serve the static site
npm run dev

# Or step by step:
npm run build:images   # Convert HEIC and process all images
npm run build:html     # Generate static HTML with all data inlined
npm run serve          # Start local server

# The site is now fully static - just open public/index.html in any browser!

Available Scripts

Core Build Scripts

  • npm run build:html - Generate static HTML from templates and data files (creates both index.html and index.php)
  • npm run build:css - Build and minify Tailwind CSS
  • npm run build:images - Convert HEIC files and process all images
  • npm run build - Run full build pipeline (images, CSS, HTML, optimization, accessibility, sitemap)

Image Processing

  • npm run process-images - Process images with smart caching (only new/changed files)
  • npm run process-images:force - Force reprocess all images
  • npm run watch-images - Auto-process images on file changes
  • npm run convert-heic - Convert HEIC files to JPG (macOS only)
  • node process-favicon.js - Generate all favicon sizes from favicon-source.png
  • node process-member-photos.js - Process band member photos specifically

Optimization & Enhancement

  • npm run sitemap - Generate sitemap.xml and sitemap.txt

Testing & Quality Assurance

  • npm run test - Run comprehensive site testing (HTML, SEO, accessibility, performance)
  • npm run test:quick - Run quick regex-based tests
  • npm run build:test - Build and test the site

Development

  • npm run serve - Start local Python HTTP server on port 8000
  • npm run dev - Build everything and start local server
  • npm run preview - Preview with Wrangler (Cloudflare)
  • npm run worker:dev - Run Cloudflare Worker locally

Deployment

  • ./deploy.sh staging - Deploy to Cloudflare Pages staging
  • ./deploy.sh prod - Deploy to Cloudflare Pages production
  • ./deploy.sh ftp - Deploy to FTP server (uses .env credentials)
  • npm run deploy - Deploy with Wrangler
  • npm run deploy:staging - Deploy to staging with Wrangler

Utility Scripts

  • npm run clean - Remove processed images and cache
  • ./convert-heic.sh - Shell script for HEIC conversion

Standalone JavaScript Tools

All tools are now in the scripts/ directory:

  • scripts/build.js - Main static site generator
  • scripts/process-images.js - Image processing pipeline
  • scripts/process-favicon.js - Favicon generator
  • scripts/process-members.js - Band member photo processor
  • scripts/generate-sitemap.js - Sitemap generator

Weekly Updates (Automated)

Set up a cron job to automatically rebuild the site weekly:

# Edit crontab
crontab -e

# Add this line (runs every Monday at 2 AM):
0 2 * * 1 /path/to/sindex/update-site.sh --deploy

Or run manually:

./update-site.sh         # Just rebuild locally
./update-site.sh --deploy # Rebuild and deploy to Cloudflare

How to Update

Shows/Events

Edit template/data/shows.json to add or modify upcoming shows:

{
  "date": "2024-03-15",
  "dayOfWeek": "FRI",
  "venue": "The Independent",
  "city": "San Francisco, CA",
  "time": "9:00 PM",
  "ticketUrl": "https://www.theindependentsf.com",
  "featured": true
}

Photos

Simply drop new images into the photos/ directory and run:

npm run process-images     # Process only new/changed images
npm run process-images:force # Force reprocess all images
npm run watch-images       # Auto-process on file changes

Images are automatically:

  • Smart cached - Only new/changed files are processed
  • Converted from HEIC to JPG (on macOS using convert-heic.sh)
  • Resized to multiple sizes (thumbnail, small, medium, large, original)
  • Optimized in both WebP and JPG formats
  • Added to the gallery automatically

Note on HEIC files: If you see HEIC errors, run ./convert-heic.sh first to convert them to JPG.

Social Links

Update URLs in the Connect section as new profiles are created.

To-Do List

  • Create YouTube channel for the band
  • Add real band photos to gallery
  • Integrate mailing list with service (Mailchimp/ConvertKit)
  • Connect shows.json to dynamically load shows
  • Add Google Analytics or similar
  • Set up custom domain
  • Design and add merchandise when available

Site Testing

The project includes comprehensive testing tools to validate HTML, accessibility, SEO, and performance before deployment.

Quick Test

npm run test

This runs the advanced testing suite that checks:

  • HTML Validation: DOCTYPE, meta tags, canonical URLs, structured data
  • Accessibility: ARIA labels, landmarks, alt text, keyboard navigation
  • SEO: Robots meta, sitemap, heading structure, HTTPS resources
  • Performance: File size, minification, resource hints, modern formats
  • Security: Unique IDs, valid links, security practices

Test Results

The test suite provides:

  • βœ… Detailed pass/fail for each check
  • πŸ“Š Category scores (percentage passed)
  • πŸ† Overall site quality score
  • πŸ’‘ Recommendations for improvements

External Testing Tools

For even more comprehensive testing, install these optional tools:

# W3C HTML Validator
npm install -g html-validator-cli
html-validator public/index.html

# Accessibility Testing
npm install -g pa11y
pa11y public/index.html

# Google Lighthouse
npm install -g @lhci/cli
lhci autorun

Online Testing

Deployment

The site supports multiple deployment methods:

Automated GitHub Actions Deployment

The site automatically deploys to FTP when pull requests are merged to the main branch.

Required GitHub Secrets

Go to your repository Settings β†’ Secrets and variables β†’ Actions, and add:

FTP_HOST=server298.com
FTP_USER=your_ftp_username
FTP_PASSWORD=your_ftp_password
FTP_REMOTE_DIR=www/www-2025

When a PR is merged, the workflow will:

  1. Build and test the site
  2. Deploy to FTP
  3. Comment on the PR with deployment status

Manual Deployment

Cloudflare Pages

# Deploy to staging
./deploy.sh staging

# Deploy to production
./deploy.sh prod

FTP Deployment

# Deploy to FTP (uses .env file)
./deploy.sh ftp

Your site will be live at: https://sinisterdexter.net

See DEPLOYMENT.md for detailed instructions including:

  • GitHub auto-deployment setup
  • Custom domain configuration
  • Content updates workflow
  • Rollback procedures

Color Scheme

  • Purple (#9333ea) - Primary brand color
  • Amber (#f59e0b) - Accent color
  • Black & grays - Background and text
  • Gradient combinations for visual interest

Contact

For bookings and inquiries: booking@sinisterdexter.net

Social Media

About

Modern website for Sinister Dexter funk & soul band

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 5