Commit graph

41 commits

Author SHA1 Message Date
semantic-release-bot
75f38a9fe2 chore(release): 0.6.0 [skip ci]
# [0.6.0](https://github.com/siddharthksah/Stirling-Image/compare/v0.5.2...v0.6.0) (2026-03-24)

### Features

* extract auto-orient utility and expand test coverage ([e5086ad](e5086ada6e))
2026-03-24 12:37:44 +00:00
Siddharth Kumar Sah
e5086ada6e feat: extract auto-orient utility and expand test coverage
Extract EXIF auto-orientation logic into a shared auto-orient module
used by both single-tool and batch routes. This ensures camera photos
display correctly after processing regardless of entry point.

Also expands e2e and integration tests significantly.
2026-03-24 20:37:14 +08:00
semantic-release-bot
06eabdd045 chore(release): 0.5.2 [skip ci]
## [0.5.2](https://github.com/siddharthksah/Stirling-Image/compare/v0.5.1...v0.5.2) (2026-03-23)

### Bug Fixes

* restore APP_VERSION import used by health endpoint ([7dfa7a2](7dfa7a295d))
2026-03-23 16:49:00 +00:00
Siddharth Kumar Sah
7dfa7a295d fix: restore APP_VERSION import used by health endpoint 2026-03-24 00:48:36 +08:00
semantic-release-bot
3735a749d6 chore(release): 0.5.1 [skip ci]
## [0.5.1](https://github.com/siddharthksah/Stirling-Image/compare/v0.5.0...v0.5.1) (2026-03-23)

### Bug Fixes

* **crop:** use percentCrop from onChange to fix inflated pixel values ([fbdbe09](fbdbe0949a))
2026-03-23 16:42:37 +00:00
Siddharth Kumar Sah
0aa2a5e5de chore: remove swagger deps, parallelize CI jobs
- Remove @fastify/swagger and @fastify/swagger-ui (API docs live on GitHub Pages)
- Run typecheck, build, and docker CI jobs in parallel instead of sequentially
2026-03-24 00:41:54 +08:00
semantic-release-bot
b4a372be3a chore(release): 0.5.0 [skip ci]
# [0.5.0](https://github.com/siddharthksah/Stirling-Image/compare/v0.4.1...v0.5.0) (2026-03-23)

### Bug Fixes

* resolve TypeScript Uint8Array type error with fflate ([1d35db9](1d35db98bf))
* white screen crash when uploading photos with null GPS EXIF data ([70c73d8](70c73d85c9))

### Features

* accept clientJobId in batch endpoint for SSE progress correlation ([2514078](2514078ea1))
* add CSS transform props to ImageViewer for live rotate/flip preview ([267da78](267da78577))
* add live preview callback to RotateSettings, rename button to Apply ([ec192e3](ec192e3d96))
* add MultiImageViewer with arrow navigation and filmstrip ([815a8ed](815a8ed419))
* add processAllFiles batch method to tool processor hook ([846a51a](846a51a9fd))
* add SideBySideComparison component for resize results ([271cab6](271cab647b))
* add ThumbnailStrip filmstrip component ([6521d70](6521d70238))
* conditional result views — side-by-side for resize, live preview for rotate ([59a57f3](59a57f3a00))
* **crop:** add CropCanvas component with visual overlay, grid, and keyboard controls ([1a076be](1a076be9b2))
* **crop:** add react-image-crop dependency ([31d426f](31d426ff6f))
* **crop:** redesign CropSettings with aspect presets, pixel inputs, and grid toggle ([c2c256a](c2c256a180))
* **crop:** wire CropCanvas and CropSettings into tool-page with bidirectional state ([786a671](786a671c39))
* integrate MultiImageViewer and multi-file UX into tool page ([3796533](3796533822))
* merge multi-image UX — batch processing, filmstrip navigation, resize/rotate redesign ([80756d1](80756d1591))
* multi-file metadata display with per-file caching ([474b4a9](474b4a941e))
* rewrite file-store with FileEntry model for multi-image support ([8844b44](8844b44fff))
* rewrite resize settings with tab-based UI (presets, custom, scale) ([bc105fd](bc105fd261))
* wire up batch processing across tool settings components ([9e2c28f](9e2c28f191))
2026-03-23 11:23:50 +00:00
Siddharth Kumar Sah
8a89bc1ec9 Merge branch 'main' of https://github.com/siddharthksah/Stirling-Image 2026-03-23 19:23:17 +08:00
Siddharth Kumar Sah
70c73d85c9 fix: white screen crash when uploading photos with null GPS EXIF data
Samsung Galaxy phones (and others) can have GPS EXIF tags with null
coordinate values when location is disabled. The server returned
_latitude: null, and the client guard used !== undefined which passed
for null, causing null.toFixed() to crash React with no ErrorBoundary.

- Server: validate GPS array values are actual numbers before computing
- Client: use != null guard (catches both null and undefined)
- App: add ErrorBoundary to prevent white screens from any future crash
2026-03-23 19:22:52 +08:00
Siddharth Kumar Sah
80756d1591 feat: merge multi-image UX — batch processing, filmstrip navigation, resize/rotate redesign
Integrates feature/multi-image-ux branch with 20 commits including:
- Multi-image viewer with arrow navigation and filmstrip thumbnails
- Batch processing across all tool settings components
- File store rewrite with FileEntry model for multi-image support
- Resize settings redesigned with tab-based UI (presets, custom, scale)
- Side-by-side comparison for resize results
- Per-file metadata caching in strip-metadata
- Client-side ZIP extraction via fflate
- SSE progress correlation via clientJobId
2026-03-23 17:13:10 +08:00
semantic-release-bot
8815fc883e chore(release): 0.4.1 [skip ci]
## [0.4.1](https://github.com/siddharthksah/Stirling-Image/compare/v0.4.0...v0.4.1) (2026-03-23)

### Bug Fixes

* unify project on port 1349, improve strip-metadata and UI components ([0e7348a](0e7348a0be))
2026-03-23 08:38:56 +00:00
Siddharth Kumar Sah
0e7348a0be fix: unify project on port 1349, improve strip-metadata and UI components
Consolidate all access to localhost:1349 — Vite dev server serves on 1349
and proxies API calls to an internal dev port (13490). Production API
defaults to 1349. Also includes strip-metadata improvements, UI component
updates, and compress operation fixes.
2026-03-23 16:38:27 +08:00
semantic-release-bot
8841dbb677 chore(release): 0.4.0 [skip ci]
# [0.4.0](https://github.com/siddharthksah/Stirling-Image/compare/v0.3.1...v0.4.0) (2026-03-23)

### Bug Fixes

* streamline CI/CD — remove broken AI docs updater, fix Docker publish ([4f984c8](4f984c83ac))

### Features

* add CSS transform props to ImageViewer for live rotate/flip preview ([113bb75](113bb75733))
* add live preview callback to RotateSettings, rename button to Apply ([31a9439](31a943962d))
* add SideBySideComparison component for resize results ([28a8b10](28a8b10fa1))
* conditional result views — side-by-side for resize, live preview for rotate ([989e8dc](989e8dc6e4))
* rewrite resize settings with tab-based UI (presets, custom, scale) ([02ef3e6](02ef3e6468))
2026-03-23 07:15:07 +00:00
Siddharth Kumar Sah
2514078ea1 feat: accept clientJobId in batch endpoint for SSE progress correlation 2026-03-23 14:03:56 +08:00
semantic-release-bot
ddd30f77b0 chore(release): 0.3.1 [skip ci]
## [0.3.1](https://github.com/siddharthksah/Stirling-Image/compare/v0.3.0...v0.3.1) (2026-03-23)

### Bug Fixes

* resolve tsx not found in AI docs updater workflow ([b803b0e](b803b0e443))
2026-03-23 04:10:54 +00:00
semantic-release-bot
acf48432be chore(release): 0.3.0 [skip ci]
# [0.3.0](https://github.com/siddharthksah/Stirling-Image/compare/v0.2.1...v0.3.0) (2026-03-23)

### Bug Fixes

* add SSE progress endpoint to public paths ([b3f590c](b3f590c8b3))
* apply continuous progress bar to erase-object and OCR ([8db84a7](8db84a753c))
* continuous progress bar (no 100%→0% reset) ([28cd950](28cd950ede))
* setError(null) was overriding setProcessing(true) ([b5cc452](b5cc452077))

### Features

* **ai:** add emit_progress() calls to all Python AI scripts ([7238429](723842988b))
* **ai:** add onProgress callback to all AI wrapper functions ([acb230c](acb230cc98))
* **ai:** rewrite bridge.ts to stream stderr progress via spawn ([7d74ddd](7d74ddd3a6))
* **api:** add SingleFileProgress type and SSE update function ([7eddac5](7eddac5119))
* **api:** wire AI route handlers to SSE progress via clientJobId ([27600a4](27600a4318))
* replace model dropdown with intuitive subject/quality selector in remove-bg ([9aa0371](9aa0371a14))
* **web:** add ProgressCard component ([01d5d66](01d5d66466))
* **web:** add ProgressCard to non-AI tool settings (Group A) ([5c64b30](5c64b306ea))
* **web:** migrate AI tool settings to ProgressCard ([dbd3bf7](dbd3bf737e))
* **web:** rewrite useToolProcessor with XHR upload progress and SSE ([60945fd](60945fd3b3))
2026-03-23 04:03:22 +00:00
Siddharth Kumar Sah
80e536bcf8 chore: remove dead code, add test infrastructure, update docs
- Delete 3 dead files: use-batch-processor.ts, use-i18n.ts, smart-crop.ts (AI package)
- Remove dead getJobProgress function and unused runPythonScript wrapper
- Remove 6 unused imports across API and web apps
- Remove unused shared types (ImageFormat, AppConfig, ApiError, HealthResponse, JobProgress)
  and constants (SUPPORTED_INPUT_FORMATS/OUTPUT_FORMATS, DEFAULT_OUTPUT_FORMAT)
- Remove unused store method (setOriginalBlobUrl) and clean AI package re-exports
- Add test infrastructure: vitest config, unit/integration/e2e tests, fixtures, screenshots
- Add Docker test infrastructure: Dockerfile.test, docker-compose.test.yml
- Add download_models.py for pre-baking AI model weights in Docker
- Add filename sanitization utility (apps/api/src/lib/filename.ts)
- Update .gitignore to exclude coverage/, *.tsbuildinfo, .superpowers/, test artifacts
- Update .dockerignore to exclude test/coverage/IDE artifacts from builds
- Update docs: remove smart crop from AI docs (uses Sharp directly), update bridge docs
2026-03-23 11:46:45 +08:00
Siddharth Kumar Sah
b3f590c8b3 fix: add SSE progress endpoint to public paths
The /api/v1/jobs/ endpoint was blocked by auth middleware.
EventSource doesn't support custom headers so auth tokens can't be
sent. The jobId is a random UUID (unguessable capability token), same
security model as the download endpoint.
2026-03-23 09:16:44 +08:00
Siddharth Kumar Sah
27600a4318 feat(api): wire AI route handlers to SSE progress via clientJobId
Extract clientJobId from multipart form data in all 5 AI route handlers
(remove-background, upscale, blur-faces, erase-object, ocr) and forward
progress callbacks to the SSE system via updateSingleFileProgress.
2026-03-23 01:41:13 +08:00
Siddharth Kumar Sah
7eddac5119 feat(api): add SingleFileProgress type and SSE update function 2026-03-23 01:36:57 +08:00
Siddharth Kumar Sah
4807bd2726 feat: add semantic-release for automated versioning and help dialog
- Set up semantic-release with zero-touch CI pipeline on push to main
- Add version sync script to keep all package.json files and APP_VERSION
  constant in sync automatically
- Consolidate Docker publishing into single tag-triggered workflow that
  pushes to both Docker Hub and ghcr.io with semver tags
- Add help dialog with keyboard shortcuts, getting started guide, and
  resource links
- Sync all versions to 0.2.1 to match Docker Hub latest
2026-03-22 21:25:14 +08:00
Siddharth Kumar Sah
ce03aad10f feat: production Docker, Playwright tests, settings API, and bug fixes
- Add user management endpoints (register, list, delete, change password)
- Add API key management (create, list, delete)
- Add settings persistence endpoints (get, put)
- Wire settings dialog to real backend (People, API Keys, System, Security)
- Fix login auth flow (window.location.href for full reload)
- Fix download URLs returning 401 (make public since UUIDs are unguessable)
- Fix border tool shadowColor validation (accept 6-8 hex digits)
- Fix remove-bg alpha matting fallback (retry without on failure)
- Fix AI tool silent fallbacks (report errors instead of no-ops)
- Add checkerboard background to before/after slider for transparency
- Add progress bars to all AI tool components
- Add Playwright E2E test suite (131 tests across 9 test files)
- Rewrite Dockerfile for production (tsx runtime, pre-baked AI models)
- Add .dockerignore for faster builds
- Add proper accessible labels to login form
2026-03-22 19:28:57 +08:00
Siddharth Kumar Sah
de829003ad fix: resolve 3 critical UX bugs - home upload, auth, and form submit
1. Home page file drop now shows quick-action tool selector
2. Auth disabled by default in dev (Docker still defaults to true)
3. Tool settings wrapped in forms - Enter key triggers processing
2026-03-22 11:04:20 +08:00
Siddharth Kumar Sah
80bb0e29a0 fix: make port 1349 the UI port in all modes
Dev mode: Vite serves UI on 1349, Fastify API on 1350 (proxied)
Production/Docker: Fastify serves both UI and API on 1349
2026-03-22 10:31:11 +08:00
Siddharth Kumar Sah
263447a81e feat(api): add pipeline execution, save, and list endpoints
Add pipelines table to SQLite schema with Drizzle migration.
Implement POST /api/v1/pipeline/execute (sequential multi-tool processing),
POST /api/v1/pipeline/save, GET /api/v1/pipeline/list,
DELETE /api/v1/pipeline/:id. Pipeline execution validates all tool IDs
and settings before processing, chains output of each step as input
to the next.
2026-03-22 04:41:51 +08:00
Siddharth Kumar Sah
5524939b6f feat: add Phase 4 AI tools with Python bridge and 6 new tools
Add Python bridge (packages/ai/src/bridge.ts) that calls Python scripts
via child_process with venv-first fallback to system python3. Implements
6 AI-powered tools:

- Remove Background: rembg-based with U2-Net/IS-Net models
- Image Upscaling: Real-ESRGAN with Lanczos fallback
- OCR/Text Extraction: Tesseract + PaddleOCR engines
- Face/PII Blur: MediaPipe face detection with configurable blur
- Object Eraser: LaMa inpainting with mask-based input
- Smart Crop: Sharp attention-based entropy cropping (no Python needed)

Each tool includes: Python script, TypeScript wrapper, API route,
and React settings component. All Python scripts handle ImportError
gracefully with clear installation messages.
2026-03-22 04:31:49 +08:00
Siddharth Kumar Sah
9c55dd32c4 feat: add replace-color tool and update tool page routing
- Add replace-color tool with pixel-level color replacement and tolerance
- Register all 19 new Phase 3 tools in routes/tools/index.ts
- Map all new tool IDs to settings components in tool-page.tsx
- Add PDF, ZIP, ICO, JSON content types to download route
- Install qrcode, jsqr, potrace, pdfkit dependencies
2026-03-22 04:21:10 +08:00
Siddharth Kumar Sah
b88d0d0af8 feat: add format tools (SVG-to-raster, vectorize, GIF) and optimization (rename, favicon, image-to-PDF)
Add 6 tools for format conversion and optimization extras:
- svg-to-raster: SVG to PNG/JPG/WebP at custom resolution
- vectorize: raster to SVG via potrace (B&W and color modes)
- gif-tools: animated GIF resize, frame extraction, optimization
- bulk-rename: pattern-based file renaming with ZIP output
- favicon: generate all favicon/app icon sizes with manifest.json
- image-to-pdf: combine images into PDF using pdfkit
2026-03-22 04:20:54 +08:00
Siddharth Kumar Sah
b8aba1719c feat: add layout tools (collage, splitting, border/frame)
Add 3 layout and composition tools with API routes and frontend settings:
- collage: multi-image grid layout with configurable gap and background
- split: image grid splitting with ZIP output (reuses archiver pattern)
- border: borders, rounded corners via SVG mask, padding, and shadows
2026-03-22 04:20:43 +08:00
Siddharth Kumar Sah
0c3c64eeac feat: add utility tools (image info, compare, duplicates, color palette, QR, barcode)
Add 6 utility tools with API routes and frontend settings:
- info: read-only image metadata inspector with channel histogram
- compare: side-by-side pixel diff with similarity percentage
- find-duplicates: dHash perceptual hashing for duplicate detection
- color-palette: frequency-based dominant color extraction
- qr-generate: QR code generator from text/URL (custom JSON route)
- barcode-read: QR code reader using jsQR
2026-03-22 04:20:35 +08:00
Siddharth Kumar Sah
aeaf783ee4 feat: add watermark, text overlay, and image composition tools
Add 4 watermark/overlay tools with API routes and frontend settings:
- watermark-text: SVG text overlay with tiling, position, opacity, rotation
- watermark-image: logo/image watermark with position, opacity, scale
- text-overlay: styled text on images with shadow and background box
- compose: layer images with position, opacity, and blend modes
2026-03-22 04:20:26 +08:00
Siddharth Kumar Sah
ce641168c1 feat(api,web): add batch processing with ZIP download and SSE progress
Backend: POST /api/v1/tools/:toolId/batch accepts multiple files +
settings, processes via p-queue with CONCURRENT_JOBS concurrency limit,
streams ZIP response using archiver. Tool registry in tool-factory
enables batch to reuse any registered tool's process function. SSE
endpoint at GET /api/v1/jobs/:jobId/progress provides real-time updates.
Handles partial failures gracefully, preserves filenames, deduplicates
collisions. Frontend: use-batch-processor hook handles upload, SSE
progress tracking, and automatic ZIP download.
2026-03-22 04:03:38 +08:00
Siddharth Kumar Sah
37112af779 feat(api): add resize, crop, rotate, convert, compress, metadata, and color tool routes
Seven tool route files using the createToolRoute factory, registering 10 API
endpoints total (color adjustments covers 4 tool IDs). Also fixes the tool
factory generic to properly infer Zod output types and clamps the compress
binary-search quality to 1-100.
2026-03-22 03:56:34 +08:00
Siddharth Kumar Sah
d53f6733b8 feat(api): add generic tool route factory for all image tools
- createToolRoute<T> factory: handles multipart parsing, file validation,
  Zod settings validation, workspace management, and error handling
- Each tool only needs to provide toolId, settingsSchema, and process function
- Registers POST /api/v1/tools/:toolId routes automatically
- Tool registry stub at routes/tools/index.ts ready for tool implementations
- Catches Sharp errors and returns clean API error envelopes (422)
2026-03-22 03:48:11 +08:00
Siddharth Kumar Sah
ece341e8c4 feat(api): add multipart file upload, workspace management, and download routes
- Register @fastify/multipart plugin with size limits from env config
- Workspace manager: createWorkspace, getWorkspacePath, cleanupWorkspace
- File validation: magic byte detection, format check, megapixel limit
- POST /api/v1/upload: multipart upload with validation, returns jobId + file metadata
- GET /api/v1/download/:jobId/:filename: serve files with Content-Disposition
- Path traversal guards on all file-serving endpoints
- Add @stirling-image/image-engine and sharp as API dependencies
- Add apiUpload, getDownloadUrl, apiDownloadBlob to web client
2026-03-22 03:47:54 +08:00
Siddharth Kumar Sah
4069f4db42 feat: add Swagger/OpenAPI documentation at /api/docs
Registers @fastify/swagger and @fastify/swagger-ui, adds /api/docs to
public auth paths, and wires up static serving + cleanup cron in
index.ts.
2026-03-22 03:09:33 +08:00
Siddharth Kumar Sah
8bda22033f feat: add automatic workspace file cleanup cron 2026-03-22 03:09:26 +08:00
Siddharth Kumar Sah
1d8761a976 feat: serve React SPA from Fastify in production mode 2026-03-22 03:09:20 +08:00
Siddharth Kumar Sah
3cb7123070 feat: add authentication with default admin user
Implement custom auth using crypto.scrypt password hashing and UUID
session tokens. Includes login/logout/session endpoints, preHandler
middleware that skips public routes, and automatic default admin
creation on first startup.
2026-03-22 02:55:10 +08:00
Siddharth Kumar Sah
a24c6dd014 feat: add SQLite database with Drizzle ORM schema and migrations 2026-03-22 02:51:57 +08:00
Siddharth Kumar Sah
1e7fb11da0 feat: add Fastify API server with health check and env config 2026-03-22 02:46:34 +08:00