Commit Graph
85 Commits
Author SHA1 Message Date
Siddharth Kumar Sah 88001a8410 docs: add resize & rotate/flip UX redesign spec 2026-03-23 12:35:19 +08:00
Siddharth Kumar Sah b803b0e443 fix: resolve tsx not found in AI docs updater workflow
Use pnpm exec from apps/docs workspace where tsx is installed,
update pnpm/action-setup to v4, and align Node version to 22.
2026-03-23 12:10:33 +08: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](https://github.com/siddharthksah/Stirling-Image/commit/b3f590c8b35fb396cf298187f241e45827ea1db8))
* apply continuous progress bar to erase-object and OCR ([8db84a7](https://github.com/siddharthksah/Stirling-Image/commit/8db84a753cd8dbd522146aa25e85bb454b032490))
* continuous progress bar (no 100%→0% reset) ([28cd950](https://github.com/siddharthksah/Stirling-Image/commit/28cd950ede6d0fc03e0d7cca0a013d883ea00238))
* setError(null) was overriding setProcessing(true) ([b5cc452](https://github.com/siddharthksah/Stirling-Image/commit/b5cc45207758c25867833fad961744a37df36fda))

### Features

* **ai:** add emit_progress() calls to all Python AI scripts ([7238429](https://github.com/siddharthksah/Stirling-Image/commit/723842988b39a8d9ea4f5b0cdd97569ff0c65f68))
* **ai:** add onProgress callback to all AI wrapper functions ([acb230c](https://github.com/siddharthksah/Stirling-Image/commit/acb230cc98193766fc978098c12dfedf08a0a339))
* **ai:** rewrite bridge.ts to stream stderr progress via spawn ([7d74ddd](https://github.com/siddharthksah/Stirling-Image/commit/7d74ddd3a6a466f1863412b36501c663fd642194))
* **api:** add SingleFileProgress type and SSE update function ([7eddac5](https://github.com/siddharthksah/Stirling-Image/commit/7eddac5119d1db3cbf831c735c5b78f0c92728ef))
* **api:** wire AI route handlers to SSE progress via clientJobId ([27600a4](https://github.com/siddharthksah/Stirling-Image/commit/27600a431805d54b32875dbe5a58f05cfcdbe2a1))
* replace model dropdown with intuitive subject/quality selector in remove-bg ([9aa0371](https://github.com/siddharthksah/Stirling-Image/commit/9aa0371a1452540557aca9f2195032c5c16ce3fb))
* **web:** add ProgressCard component ([01d5d66](https://github.com/siddharthksah/Stirling-Image/commit/01d5d66466a7bcf4a0c0f454f7b4d58f7e1e7801))
* **web:** add ProgressCard to non-AI tool settings (Group A) ([5c64b30](https://github.com/siddharthksah/Stirling-Image/commit/5c64b306ead8b6214dee6d51e8dae25fb47ff7e8))
* **web:** migrate AI tool settings to ProgressCard ([dbd3bf7](https://github.com/siddharthksah/Stirling-Image/commit/dbd3bf737e4692279ba5b7c3d860779193a21b5f))
* **web:** rewrite useToolProcessor with XHR upload progress and SSE ([60945fd](https://github.com/siddharthksah/Stirling-Image/commit/60945fd3b3674d2026f3f717cd3d123951126933))
v0.3.0
2026-03-23 04:03:22 +00:00
Siddharth Kumar Sah 9aa0371a14 feat: replace model dropdown with intuitive subject/quality selector in remove-bg
Replace technical AI model names with user-friendly controls:
- Subject type buttons (People/Products/General) with icons
- Quality selector (Fast/Balanced/Best) with time estimates
- Passport/ID photo checkbox for portrait-optimized processing
- Models selected automatically based on user's choices
2026-03-23 12:02:35 +08: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 8db84a753c fix: apply continuous progress bar to erase-object and OCR
Same fix as the hook: upload=0-15%, server processing=15-100%.
2026-03-23 09:49:20 +08:00
Siddharth Kumar Sah 28cd950ede fix: continuous progress bar (no 100%→0% reset)
Upload occupies 0-15% of the bar, server processing 15-100%.
SSE progress from the server is scaled into the 15-100 range.
The bar now moves smoothly from start to finish.
2026-03-23 09:47:53 +08:00
Siddharth Kumar Sah b5cc452077 fix: setError(null) was overriding setProcessing(true)
The Zustand setError() setter has a side effect: it sets
processing=false. When called after setProcessing(true), it
immediately killed the processing state, so the ProgressCard
never rendered. Fix: call setError(null) before setProcessing(true).
2026-03-23 09:32: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 dbd3bf737e feat(web): migrate AI tool settings to ProgressCard
Replace AIProgressBar and inline progress indicators with the new
ProgressCard component across all 5 AI tool settings. The three
useToolProcessor-based tools (remove-bg, blur-faces, upscale) now
destructure `progress` from the hook. The two custom-fetch tools
(erase-object, ocr) gain inline XHR upload tracking + SSE processing
progress with elapsed timer.
2026-03-23 01:46:05 +08:00
Siddharth Kumar Sah 5c64b306ea feat(web): add ProgressCard to non-AI tool settings (Group A)
Replace Loader2 spinner buttons with ProgressCard in all 13 non-AI tool
settings components that use useToolProcessor. Each now shows upload
progress, elapsed time, and processing phase during operations.
2026-03-23 01:45:58 +08:00
Siddharth Kumar Sah 60945fd3b3 feat(web): rewrite useToolProcessor with XHR upload progress and SSE 2026-03-23 01:42:27 +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 acb230cc98 feat(ai): add onProgress callback to all AI wrapper functions 2026-03-23 01:39:52 +08:00
Siddharth Kumar Sah 01d5d66466 feat(web): add ProgressCard component 2026-03-23 01:39:40 +08:00
Siddharth Kumar Sah 723842988b feat(ai): add emit_progress() calls to all Python AI scripts 2026-03-23 01:38:19 +08:00
Siddharth Kumar Sah 7d74ddd3a6 feat(ai): rewrite bridge.ts to stream stderr progress via spawn 2026-03-23 01:37:12 +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 77a394869b docs: add implementation plan for real progress bars
11-task plan covering backend SSE progress, Python stderr emission,
bridge.ts spawn rewrite, ProgressCard component, hook rewrite, and
migration of all 33 tool settings components.
2026-03-23 01:35:29 +08:00
Siddharth Kumar Sah 4c6b65a4b1 docs: add design spec for real progress bars
Spec covers real upload progress (XHR), server-side progress via SSE
for AI tools (Python stderr → bridge.ts → SSE), and a unified
ProgressCard component replacing the fake time-based AIProgressBar.
2026-03-22 22:28:03 +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
v0.2.1
2026-03-22 21:25:14 +08:00
Siddharth Kumar Sah fb1d366d5f fix: use U2-Net as default model (fast, 2s) with BiRefNet as opt-in
BiRefNet-Lite times out on first load (~60s+ for 973MB model).
U2-Net works in 2 seconds. Users can still select BiRefNet for
higher quality when they're willing to wait. Added timing hints
in model descriptions and increased timeout for BiRefNet models.
2026-03-22 21:08:37 +08:00
Siddharth Kumar Sah cf68eaf732 chore: update lockfile for docs workspace 2026-03-22 21:01:36 +08:00
Siddharth Kumar Sah 6668615750 docs: add VitePress documentation site with GitHub Pages deployment
Rewrites all documentation with accurate project details (Fastify, port
1349, single-container Docker, all 33+ tools, full database schema).
Adds getting started guide and configuration reference. Updates help and
settings dialogs to link to the docs site.
2026-03-22 21:00:37 +08:00
Siddharth Kumar Sah 977b5f5ec0 fix: bridge.ts ENOENT check for Python venv fallback 2026-03-22 20:52:51 +08:00
Siddharth Kumar Sah 818d2acd94 fix: Python bridge fallback only on missing venv, not script errors
The bridge.ts catch block was catching ALL errors from the venv Python
and falling back to system python3. This masked real script errors
(like rembg model loading failures) by reporting "rembg not installed"
from the system python3 fallback. Now only falls back on ENOENT (venv
binary not found).
2026-03-22 20:41:04 +08:00
Siddharth Kumar Sah 2bdc367767 fix: use BiRefNet-Lite as default model and fix JSON parsing
- Switch default from birefnet-general (973MB, 4min) to
  birefnet-general-lite (faster, still SOTA quality)
- Fix Python script stdout pollution — progress messages now go to
  stderr so the JSON result parser doesn't break
- Pre-download birefnet-general-lite in Docker build
2026-03-22 20:07:39 +08:00
Siddharth Kumar Sah 77ee8469d8 feat: upgrade to BiRefNet SOTA background removal model
- Switch default model from U2-Net to BiRefNet (state-of-the-art)
- Add 6 model options: BiRefNet, BiRefNet Lite, BiRefNet Portrait,
  BRIA RMBG, IS-Net, U2-Net
- Add animated progress bar with stage indicators (loading model,
  analyzing, removing, refining edges) and elapsed timer
- Add intuitive background color presets (Transparent, White, Black,
  Red, Green, Blue) as clickable buttons + custom color picker
- Handle background color compositing in Python (PIL alpha composite)
- Add checkerboard pattern to before/after slider for transparency
- Pre-bake BiRefNet model (973MB) in Docker image for instant use
2026-03-22 19:51:35 +08:00
Siddharth Kumar Sah 22b08c0475 ci: add GitHub Actions workflow for Docker Hub auto-publish
Triggers on push to main and version tags. Requires DOCKERHUB_USERNAME
and DOCKERHUB_TOKEN secrets configured in GitHub repo settings.
2026-03-22 19:29:57 +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 06c5ee5996 feat(web): redesign home page upload flow and add auth guard
Home page: after uploading an image, shows tool selector on the left
(quick actions + all 37 tools by category) with image preview on the
right. Stays on the main page — no popup overlay.

Auth: when AUTH_ENABLED=true, unauthenticated users are redirected to
/login. Default credentials admin/admin. When auth is disabled (dev
default), no redirect happens.
2026-03-22 11:19:41 +08:00
Siddharth Kumar Sah 71541032a6 docs: add comprehensive README matching Stirling-PDF style
Badges, one-liner Docker quick-start, key capabilities, full tool table,
supported formats, configuration reference, docker-compose example,
development guide, and tech stack summary.
2026-03-22 11:14:35 +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 ab0b0344b9 feat(web): add Stirling-PDF-style file preview, review panel, and tool chaining UX
After upload: dropzone replaced by image viewer with zoom controls.
After processing: review panel shows result preview, file info, download,
undo button, and suggested next tools for chaining.
2026-03-22 10:47:46 +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 2723d6a75a chore: clean up codebase and update .gitignore
Remove old UI research screenshots, .DS_Store files, temp dirs.
Add patterns for .vite/, tmp/, apps/api/data/, and screenshot PNGs.
2026-03-22 10:25:48 +08:00
Siddharth Kumar SahandGitHub 97b0ffb841 Merge pull request #5 from siddharthksah/phase5-automation-polish
Phase 5: Automation, Pipeline Builder, Settings, Mobile, i18n
2026-03-22 04:43:42 +08:00
Siddharth Kumar Sah 580208de83 feat(web): add mobile responsive layout with bottom navigation
Add useMobile hook for viewport detection (<768px). Update AppLayout
with hamburger menu, slide-over sidebar overlay, and fixed bottom
navigation bar (Tools, Automate, Files, Settings) for mobile. Update
Sidebar with expanded mode for mobile overlay. Update ToolPage to
stack settings above dropzone on mobile with collapsible panel. Add
new routes for /automate and /fullscreen. Integrate Settings dialog
and keyboard shortcuts at the App root level.
2026-03-22 04:42:31 +08:00
Siddharth Kumar Sah 6d67b106ca feat(web): add fullscreen tool grid view
Create /fullscreen page showing all 37 tools grouped by 9 categories
in a card grid layout. Each category card has a colored header with
icon and tool count badge. Includes search bar, Show/Hide Details
toggle for tool descriptions, and button to switch back to sidebar view.
2026-03-22 04:42:25 +08:00
Siddharth Kumar Sah cd020c2342 feat(web): add i18n architecture with English translations
Create translation key system in packages/shared/src/i18n/ with full
English locale covering common actions, all 37 tools, settings sections,
auth, pipeline, and navigation strings. Add useI18n hook that returns
typed translations. Architecture enables adding new languages by
creating locale files matching the TranslationKeys type.
2026-03-22 04:42:19 +08:00
Siddharth Kumar Sah 939bc2e001 feat(web): add keyboard shortcuts for tool navigation
Register global keyboard shortcuts: Cmd/Ctrl+K to focus search,
Cmd/Ctrl+/ for tools view, Cmd/Ctrl+Shift+D to toggle theme,
Cmd/Ctrl+Alt+1-8 for quick tool navigation. Uses platform-aware
mod key detection (Cmd on Mac, Ctrl on Windows/Linux).
2026-03-22 04:42:14 +08:00
Siddharth Kumar Sah 0cd3d71a63 feat(web): add settings dialog with general, security, API keys, and about sections
Create modal settings dialog matching Stirling-PDF's pattern with sidebar
navigation. Includes General (user info, logout, default view, version),
System Settings (app name, upload limit, theme, locale), Security
(change password form), API Keys (generate, copy, regenerate), and
About (version, description, links) sections.
2026-03-22 04:42:06 +08:00
Siddharth Kumar Sah 60541c1765 feat(web): add pipeline builder UI with saved automations and templates
Create Automate page at /automate with pipeline builder component.
Includes 5 preset templates (Social Media Ready, Privacy Clean, Web
Optimization, Profile Picture, Watermark Batch), saved automation
management, step reordering, and pipeline execution with download.
2026-03-22 04:41:57 +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 SahandGitHub 8e8ba34dd8 Merge pull request #4 from siddharthksah/phase4-ai-tools
Phase 4: AI Tools - Background Removal, Upscaling, OCR, Face Blur
2026-03-22 04:32:37 +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 SahandGitHub a8cc611eb2 Merge pull request #3 from siddharthksah/phase3-advanced-tools
Phase 3: Advanced Tools - 19 additional tools
2026-03-22 04:22:33 +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