Imported from billymitchell/DJ-Nerva (
AGENTS.md). Install upstream withnpx skills add billymitchell/DJ-Nerva. Copyright stays with the author.
AGENTS.md
Project Overview
This repository is a static single-page marketing site for DJ Nerva. There is no app framework, bundler, or package-managed build pipeline in the repo. The site is driven by:
index.htmlfor page structure and most copysimplified-style.cssfor all styling and responsive behaviormain.jsfor runtime hero randomization, dynamic theme colors, and gallery rendering- JSON files in the repo root for content that is fetched client-side
The site can be previewed by opening index.html, but a local static server is safer because several features rely on fetch() for JSON files.
Recommended local preview:
python3 -m http.server 5500
Then open http://localhost:5500/.
Runtime Model
Main page flow
index.html loads:
main.jsplaces-map.js
At runtime, main.js:
- Fetches
image_data.jsonandtaglines.json - Picks one image set and one tagline at random
- Updates the hero image and CSS custom properties
- Recolors SoundCloud embeds to match the chosen theme
- Loads
gallery_images.jsononwindow.loadand builds the photo grid
places-map.js:
- Fetches
places_played.json - Initializes the Google map if the
#places-mapcontainer exists - Adds venue markers
- Persists map center/zoom to
localStorage
No framework assumptions
Do not introduce React, build tooling, or a module system unless explicitly asked. The current site is plain HTML/CSS/JS and is easy to deploy as static files.
Source Of Truth
Hand-edited files
These are the primary files agents should edit directly when changing the site:
index.html: content, section order, embeds, map container, script tagssimplified-style.css: visual system and layoutmain.js: hero/theme/gallery behaviorplaces-map.js: Google Maps behaviortaglines.json: rotating hero taglinesplaces_played.json: venue data used by the map
Generated or script-managed files
Treat these as derived artifacts:
image_data.json: generated bybuild-image-manifest.jsgallery_images.json: generated byscripts/build_gallery_manifest.jssoundcloud_tracks.json: generated byscripts/soundcloud_fetch.jsmixcloud_cloudcasts.json: generated byscripts/mixcloud_fetch.js
Do not hand-edit derived JSON unless the user explicitly wants a one-off manual change.
Important HTML Conventions
Auto-managed embed regions
Inside index.html, these marker blocks are script-managed:
<!-- AUTO-SC-START -->to<!-- AUTO-SC-END --><!-- AUTO-MC-START -->to<!-- AUTO-MC-END -->
scripts/soundcloud_fetch.js rewrites the SoundCloud block.
scripts/mixcloud_fetch.js rewrites the Mixcloud block.
If you need to change the structure of generated embed tiles, update the relevant script as well as the current HTML.
Gallery container
The gallery is rendered into #gallery-grid from gallery_images.json. If you remove or rename that container, update main.js.
Places map container
The venue map depends on #places-map. If you move or rename it, update places-map.js.
Data Files
image_data.json
Array of hero image sets. Each object includes:
folderdesktopmobileprimaryColorsecondaryColoraccentColor
desktopPath, mobilePath, and allImages are present but only useful for maintenance scripts. Frontend runtime uses the relative filenames and color fields.
places_played.json
Object with a places array. Each place uses:
namecitylatlnglink
gallery_images.json
Array of image entries with:
filenamepath
Audio feed JSON
soundcloud_tracks.json and mixcloud_cloudcasts.json store fetched metadata and also support regenerating embed markup in index.html.
Maintenance Scripts
Hero image manifest
node build-image-manifest.js
Purpose:
- scans
splash-images/<number>/ - chooses landscape image for desktop and portrait image for mobile
- extracts palette data
- rewrites
image_data.json
Notes:
- This script depends on Node packages that are not declared in a
package.jsonin this repo:image-size,node-vibrant, andchroma-js - Avoid touching this script unless you are also prepared to validate its local dependency setup
Gallery manifest
node scripts/build_gallery_manifest.js
Purpose:
- scans
DJ-images/ - rewrites
gallery_images.json
Run this after adding or removing gallery photos.
Sync places from Google My Maps
node scripts/sync_places_from_google_maps.js
Purpose:
- fetches a Google My Maps KML export
- parses venues
- rewrites
places_played.json - preserves existing
linkvalues where names still match
After running it, manually verify new places and add any missing links.
Inject Google Maps API key
node scripts/inject_maps_key.js
Purpose:
- replaces
YOUR_GOOGLE_MAPS_API_KEYinindex.htmlusing.env
Current repo state note:
index.htmlcurrently loadsplaces-map.js, but the checked-in HTML should be treated carefully around API-key changes.envis gitignored and should never be committed
Refresh SoundCloud embeds
node scripts/soundcloud_fetch.js
Purpose:
- fetches latest SoundCloud track metadata
- rewrites
soundcloud_tracks.json - rewrites the
AUTO-SCblock inindex.html
Refresh Mixcloud embeds
node scripts/mixcloud_fetch.js
Purpose:
- fetches latest Mixcloud cloudcasts
- rewrites
mixcloud_cloudcasts.json - rewrites the
AUTO-MCblock inindex.html
Operational Guidance For Agents
Prefer minimal edits
This project is mostly content and presentation. Keep changes narrow and avoid broad refactors unless requested.
Preserve the static architecture
Prefer:
- editing HTML directly for content changes
- editing CSS directly for layout and styling
- editing small JS utilities in place
Avoid introducing:
- frameworks
- bundlers
- TypeScript
- npm-based architecture changes
unless the user explicitly asks for that migration.
Be careful with stale files
These files exist but are not currently part of the active page load path:
soundcloud.jsmixcloud.jsplay-pause.jsremix-reload.js
Do not assume they are active just because they exist. Check whether they are referenced from index.html before editing them.
Validate after edits
At minimum:
- serve the repo locally
- load the page
- verify hero image rotation still works
- verify gallery images render
- verify map section does not throw console errors
- verify SoundCloud and Mixcloud embeds still appear if you touched the music section
Deployment Notes
The _headers file suggests a static hosting platform that respects per-path cache headers. Keep that file in sync with any major asset-path or caching changes.
Because images are cached aggressively, main.js appends a cache-busting query string to hero images during runtime. Do not remove that behavior without considering stale asset issues.
Secrets
.envis local-only and gitignored- Never commit API keys or tokens
- If a script needs credentials, assume they belong in
.env