# CLAUDE.md

This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.

## Project Overview

PulseJT is an Adobe After Effects CEP (Common Extensibility Platform) panel extension for previewing GIFs, images, and videos. It runs inside After Effects 2020-2025+ as a dockable panel.

## Architecture

**CEP Extension Structure:**
- `CSXS/manifest.xml` - Extension manifest defining After Effects compatibility (v17.x-25.x), panel dimensions, and CEP runtime (v11.0)
- `.debug` - Debug configuration for CEP development (port 8092)
- `CSInterface.js` - Adobe's CEP interface library for host application communication

**Frontend (HTML/CSS/JS):**
- `index.html` - Main panel UI with modals (settings, update logs), theme grid, media controls
- `style.css` - Complete styling including 12 color themes (blue, jay, naten, shammy, etc.)
- `JS/bundle.js` - Main application bundle (ES5 compatible, no modules) containing:
  - Version management and update modal system
  - IndexedDB service for media history persistence
  - Pan/zoom functionality with transform state
  - Drag-and-drop media loading
  - FFmpeg video conversion for MOV/AVI files
  - Theme system with localStorage persistence
  - Toast notifications and loading states

**Binary Dependencies:**
- `bin/win/ffmpeg.exe` and `bin/mac/ffmpeg` - Bundled FFmpeg for video format conversion

## Key Technical Details

- Uses IIFE pattern `(function() { 'use strict'; ... })()` - no ES6 modules due to CEP compatibility
- State persisted via localStorage (theme, volume, pan/zoom, fit mode) and IndexedDB (media history)
- Supports file drop, file input, and media from file paths
- Video playback with mute toggle and volume control
- Fit modes: fill (cover), contain, stretch

## Storage Keys

All localStorage keys prefixed with `gifPreview.`:
- `theme`, `fitMode`, `volume`, `audioMuted`
- `panX`, `panY`, `scale`, `uiHidden`
- `cornersEnabled`, `historyLimit`, `lastSeenVersion`
- `licenseKey`, `licenseValid`, `licenseData`, `hardwareId`

## Development

No build system - edit files directly. To test:
1. Enable CEP debug mode in After Effects (see Adobe CEP documentation)
2. Place extension in CEP extensions folder
3. Restart After Effects and open Window > Extensions > PulseJT

For debugging, use Chrome DevTools at `localhost:8092` when debug mode is enabled.
