Commit Graph
150 Commits
Author SHA1 Message Date
Siddharth Kumar Sah 24644c1c10 feat(stores): add Zustand store for Files page state management
Implements useFilesPageStore with file listing, upload, bulk delete,
selection, checkbox management, search, and tab switching actions.
2026-03-26 01:10:50 +08:00
Siddharth Kumar Sah 8a3a731267 feat(api): add persistent file management helpers to frontend api module
Adds UserFile/UserFileDetail types plus apiListFiles, apiGetFileDetails,
apiUploadUserFiles, apiDeleteUserFiles, getFileThumbnailUrl, and
getFileDownloadUrl to support the Files page.
2026-03-26 01:10:50 +08:00
Siddharth Kumar Sah bf6c30c3c0 feat(tool-factory): auto-save results to persistent file store when fileId provided
Adds optional fileId multipart field; when present, inserts a new versioned
userFiles record after successful processing and returns savedFileId in the
response. Non-fatal — tool processing succeeds even if the save fails.
2026-03-26 01:10:50 +08:00
Siddharth Kumar Sah 4e2aa58767 feat(api): add user files CRUD routes at /api/v1/files/*
Implements all 7 routes for the persistent file library:
list with pagination/search, upload (multi-file), details with recursive
version chain CTE, download stream, on-the-fly Sharp thumbnail, bulk delete
of entire version chains, and save-result for tool output versioning.
Registered in index.ts after fileRoutes.
2026-03-26 01:10:50 +08:00
Siddharth Kumar Sah fbca20d78c feat(storage): add file storage helpers module
Adds ensureStorageDir, saveFile, deleteStoredFile, and getStoredFilePath
utilities that manage the lifecycle of files on the local filesystem
under FILES_STORAGE_PATH.
2026-03-26 01:10:50 +08:00
Siddharth Kumar Sah 4927f574ba feat(env): add FILES_STORAGE_PATH config variable
Adds a FILES_STORAGE_PATH env variable (defaults to ./data/files) to
control where uploaded user files are persisted on disk.
2026-03-26 01:10:50 +08:00
Siddharth Kumar Sah dda37e90cc feat(db): add userFiles table and migration
Introduces the user_files table to track uploaded files per user,
including metadata fields for dimensions, versioning, and tool chains.
2026-03-26 01:10:50 +08:00
Siddharth Kumar Sah c8d2a3f439 docs: add Files page implementation plan
12 sequential tasks covering DB schema, API routes, file storage,
frontend components, tool integration, mobile layout, and E2E testing.
2026-03-26 01:10:50 +08:00
Siddharth Kumar Sah 2375572860 docs: add Files page design spec
Server-persisted file manager with version tracking, modeled after
Stirling-PDF. Covers DB schema, API routes, file storage, frontend
components, and tool processing integration.
2026-03-26 01:10:50 +08:00
semantic-release-bot 5d261398b1 chore(release): 0.7.0 [skip ci]
# [0.7.0](https://github.com/siddharthksah/Stirling-Image/compare/v0.6.0...v0.7.0) (2026-03-24)

### Features

* harden auth, security headers, SVG sanitization, and pipeline ownership ([432cc92](https://github.com/siddharthksah/Stirling-Image/commit/432cc92471b73b73ab9d1be4a82a71d3ed3a88ad))
* **pipeline:** add inline settings configuration for automation steps ([adc7e1c](https://github.com/siddharthksah/Stirling-Image/commit/adc7e1c0370df1687b0660bdff279c90ac9d0871))
v0.7.0
2026-03-24 13:38:48 +00:00
Siddharth Kumar Sah adc7e1c037 feat(pipeline): add inline settings configuration for automation steps
Replace placeholder "default settings" message with actual form controls
when expanding pipeline steps. Each tool now shows its configurable fields
(dimensions, quality, colors, modes, etc.) directly in the pipeline builder.

Covers all 30+ tools with data-driven field definitions: number inputs,
select groups, checkboxes, color pickers, and conditional fields.
2026-03-24 21:38:16 +08:00
Siddharth Kumar Sah 432cc92471 feat: harden auth, security headers, SVG sanitization, and pipeline ownership
- Add password strength validation (8+ chars, uppercase, lowercase, number)
- Add username validation rules
- Optimize API key lookup with SHA-256 prefix (O(1) vs O(n) scan)
- Require password change on default admin first login
- Revoke API keys on password change
- Add session cleanup cron (hourly expired session purge)
- Add Permissions-Policy, HSTS, and CSP security headers in production
- Strengthen SVG sanitizer: block XInclude, foreignObject, processing
  instructions, javascript/data/file URI schemes
- Add userId ownership to pipelines with authorization checks
- Add keyPrefix column to api_keys table
- Update integration tests for new auth behavior
2026-03-24 21:38:06 +08:00
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](https://github.com/siddharthksah/Stirling-Image/commit/e5086ada6e2f4402973f203b726578dd42da4a32))
v0.6.0
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](https://github.com/siddharthksah/Stirling-Image/commit/7dfa7a295de407f45832b68a2ef64acf2f21205f))
v0.5.2
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](https://github.com/siddharthksah/Stirling-Image/commit/fbdbe0949a64d072e4e86d08c7b39372592eaf04))
v0.5.1
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
Siddharth Kumar Sah fbdbe0949a fix(crop): use percentCrop from onChange to fix inflated pixel values
react-image-crop's onChange passes (pixelCrop, percentCrop) — we were
using the first arg (display pixels) but treating them as percentages,
causing values to exceed image dimensions.
2026-03-24 00:41:30 +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](https://github.com/siddharthksah/Stirling-Image/commit/1d35db98bf359c07779522c30b00d8c7a9d3cb89))
* white screen crash when uploading photos with null GPS EXIF data ([70c73d8](https://github.com/siddharthksah/Stirling-Image/commit/70c73d85c992bc724c6b18a2d43789871b318e78))

### Features

* accept clientJobId in batch endpoint for SSE progress correlation ([2514078](https://github.com/siddharthksah/Stirling-Image/commit/2514078ea1feb8e44296e226e37e8e379a20473a))
* add CSS transform props to ImageViewer for live rotate/flip preview ([267da78](https://github.com/siddharthksah/Stirling-Image/commit/267da7857743898e612ba5bb80e24985664bd311))
* add live preview callback to RotateSettings, rename button to Apply ([ec192e3](https://github.com/siddharthksah/Stirling-Image/commit/ec192e3d96d864e3ce47e991ba1c72d6a4ee7cea))
* add MultiImageViewer with arrow navigation and filmstrip ([815a8ed](https://github.com/siddharthksah/Stirling-Image/commit/815a8ed419b82aadec4e07ef4456e9e96b84b65f))
* add processAllFiles batch method to tool processor hook ([846a51a](https://github.com/siddharthksah/Stirling-Image/commit/846a51a9fdf4e8fc4c1b9673f13acde646ae0ca9))
* add SideBySideComparison component for resize results ([271cab6](https://github.com/siddharthksah/Stirling-Image/commit/271cab647bb41872c5e205d6236e35eb7fad0810))
* add ThumbnailStrip filmstrip component ([6521d70](https://github.com/siddharthksah/Stirling-Image/commit/6521d702385f23a7cb9312c1661541943bfe2e03))
* conditional result views — side-by-side for resize, live preview for rotate ([59a57f3](https://github.com/siddharthksah/Stirling-Image/commit/59a57f3a00bbd0c6331d1165594ad4266ce3b536))
* **crop:** add CropCanvas component with visual overlay, grid, and keyboard controls ([1a076be](https://github.com/siddharthksah/Stirling-Image/commit/1a076be9b2cc5f434296f2739a395321368c2177))
* **crop:** add react-image-crop dependency ([31d426f](https://github.com/siddharthksah/Stirling-Image/commit/31d426ff6f02965d20e75e85ff15a8cbc1d1df0b))
* **crop:** redesign CropSettings with aspect presets, pixel inputs, and grid toggle ([c2c256a](https://github.com/siddharthksah/Stirling-Image/commit/c2c256a180640cf046bd1bc46b05065171a4c2dc))
* **crop:** wire CropCanvas and CropSettings into tool-page with bidirectional state ([786a671](https://github.com/siddharthksah/Stirling-Image/commit/786a671c39859ae0bf1f8732c2ff4efe210d2466))
* integrate MultiImageViewer and multi-file UX into tool page ([3796533](https://github.com/siddharthksah/Stirling-Image/commit/37965338228a2fca3623718a7db2f8757a464651))
* merge multi-image UX — batch processing, filmstrip navigation, resize/rotate redesign ([80756d1](https://github.com/siddharthksah/Stirling-Image/commit/80756d15917a877b21a900d282bb6522ae76c2e2))
* multi-file metadata display with per-file caching ([474b4a9](https://github.com/siddharthksah/Stirling-Image/commit/474b4a941e1be43887beac8d2ec57eb703cba260))
* rewrite file-store with FileEntry model for multi-image support ([8844b44](https://github.com/siddharthksah/Stirling-Image/commit/8844b44fff2abfbe3262a113dfc35d83367add05))
* rewrite resize settings with tab-based UI (presets, custom, scale) ([bc105fd](https://github.com/siddharthksah/Stirling-Image/commit/bc105fd261de3c11b279557dba98aaad65214f42))
* wire up batch processing across tool settings components ([9e2c28f](https://github.com/siddharthksah/Stirling-Image/commit/9e2c28f19124fca4bc4f55c0997e2314170ae478))
v0.5.0
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 786a671c39 feat(crop): wire CropCanvas and CropSettings into tool-page with bidirectional state 2026-03-23 19:22:53 +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 c2c256a180 feat(crop): redesign CropSettings with aspect presets, pixel inputs, and grid toggle 2026-03-23 19:19:56 +08:00
Siddharth Kumar Sah 1a076be9b2 feat(crop): add CropCanvas component with visual overlay, grid, and keyboard controls 2026-03-23 19:18:03 +08:00
Siddharth Kumar Sah 31d426ff6f feat(crop): add react-image-crop dependency 2026-03-23 19:17:02 +08:00
Siddharth Kumar Sah db8ac42d4d docs: add interactive crop tool implementation plan 2026-03-23 19:13:43 +08:00
Siddharth Kumar Sah b9de028fd8 docs: add interactive crop tool design spec 2026-03-23 19:08:14 +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](https://github.com/siddharthksah/Stirling-Image/commit/0e7348a0bedb6c47a8025c47b377849169aa7472))
v0.4.1
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](https://github.com/siddharthksah/Stirling-Image/commit/4f984c83acc4bfaa5b9479d80e2bdda05f4a2ccc))

### Features

* add CSS transform props to ImageViewer for live rotate/flip preview ([113bb75](https://github.com/siddharthksah/Stirling-Image/commit/113bb757333e9ad809a401000f3b6b34fa1ef415))
* add live preview callback to RotateSettings, rename button to Apply ([31a9439](https://github.com/siddharthksah/Stirling-Image/commit/31a943962d46fab1eb1efd9f605fc5a0144ddd87))
* add SideBySideComparison component for resize results ([28a8b10](https://github.com/siddharthksah/Stirling-Image/commit/28a8b10fa15fa216d7f53256bea9461650358fb1))
* conditional result views — side-by-side for resize, live preview for rotate ([989e8dc](https://github.com/siddharthksah/Stirling-Image/commit/989e8dc6e47fe123d6333dddf4431a01623e0437))
* rewrite resize settings with tab-based UI (presets, custom, scale) ([02ef3e6](https://github.com/siddharthksah/Stirling-Image/commit/02ef3e6468b36303dfdbc61e18c14dc5eb68d957))
v0.4.0
2026-03-23 07:15:07 +00:00
Siddharth Kumar Sah 4f984c83ac fix: streamline CI/CD — remove broken AI docs updater, fix Docker publish
- Delete ai-docs-updater.yml (never worked: missing ANTHROPIC_API_KEY, tsx not found)
- Delete standalone docker-publish.yml (GITHUB_TOKEN can't trigger cross-workflow)
- Merge Docker build/push into release.yml as dependent job using .release-version
- Add publishCmd to .releaserc.json to signal new releases to Docker job
- Fix deploy-docs.yml: upgrade pnpm@v3→v4, node 20→22, add --frozen-lockfile
- Fix ci.yml: rename job to "Typecheck" (no lint step existed)
2026-03-23 15:14:34 +08:00
Siddharth Kumar Sah 8971debcfc chore: add .worktrees/ to gitignore 2026-03-23 15:14:34 +08:00
Siddharth Kumar Sah 989e8dc6e4 feat: conditional result views — side-by-side for resize, live preview for rotate 2026-03-23 15:14:34 +08:00
Siddharth Kumar Sah 31a943962d feat: add live preview callback to RotateSettings, rename button to Apply 2026-03-23 15:14:34 +08:00
Siddharth Kumar Sah fdaf5656b2 docs: add multi-image UX implementation plan
12-task plan covering file store rewrite, MultiImageViewer with filmstrip,
batch processing with fflate ZIP extraction, multi-file metadata display,
and Docker build verification.
2026-03-23 15:14:34 +08:00
Siddharth Kumar Sah 113bb75733 feat: add CSS transform props to ImageViewer for live rotate/flip preview 2026-03-23 15:14:34 +08:00
Siddharth Kumar Sah 02ef3e6468 feat: rewrite resize settings with tab-based UI (presets, custom, scale) 2026-03-23 15:14:34 +08:00
Siddharth Kumar Sah 28a8b10fa1 feat: add SideBySideComparison component for resize results 2026-03-23 15:14:34 +08:00
Siddharth Kumar Sah 888b9dd51d docs: add resize & rotate/flip UX redesign implementation plan 2026-03-23 15:14:34 +08:00
Siddharth Kumar Sah c8b1639a9e docs: add multi-image UX redesign spec
Design spec for overhauling multi-image upload/preview/processing UX:
- Bottom filmstrip thumbnail strip with left/right navigation arrows
- Hybrid batch processing (apply-to-all with per-file preview)
- Individual + ZIP download options
- Multi-file aware strip-metadata with existing /inspect endpoint
- File store evolution to per-file tracking with FileEntry model
2026-03-23 15:14:34 +08:00
Siddharth Kumar Sah fc01a2f536 docs: address spec review feedback for resize/rotate redesign
Adds: state architecture for rotate preview, dimension data source,
fit mode defaults, mobile layout notes, extensibility guidance.
2026-03-23 15:14:34 +08:00
Siddharth Kumar Sah 308e428a01 docs: add resize & rotate/flip UX redesign spec 2026-03-23 15:14:34 +08:00
Siddharth Kumar Sah 1d35db98bf fix: resolve TypeScript Uint8Array type error with fflate 2026-03-23 14:14:00 +08:00
Siddharth Kumar Sah 474b4a941e feat: multi-file metadata display with per-file caching 2026-03-23 14:11:49 +08:00
Siddharth Kumar Sah 9e2c28f191 feat: wire up batch processing across tool settings components 2026-03-23 14:11:08 +08:00
Siddharth Kumar Sah 846a51a9fd feat: add processAllFiles batch method to tool processor hook 2026-03-23 14:09:09 +08:00
Siddharth Kumar Sah 3796533822 feat: integrate MultiImageViewer and multi-file UX into tool page 2026-03-23 14:07:28 +08:00
Siddharth Kumar Sah 815a8ed419 feat: add MultiImageViewer with arrow navigation and filmstrip 2026-03-23 14:03:59 +08:00