Commit Graph
40 Commits
Author SHA1 Message Date
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
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 SahandGitHub c41d046316 Merge pull request #2 from siddharthksah/phase2-core-tools
Phase 2: Core Tools - Image Engine, 10 Tools, Batch Processing
2026-03-22 04:05:03 +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 1a22522349 feat(web): add before/after image comparison slider component
Draggable split-view slider with clip-path reveals original vs processed
image. Shows file size badges with savings percentage. Supports pointer
events for both mouse and touch. Integrated into tool-page to replace
dropzone after processing completes. Updated file-store with
originalBlobUrl for comparison. Enhanced dropzone with multi-file count
badge and file list display.
2026-03-22 04:03:30 +08:00
Siddharth Kumar Sah 8964bc5cd8 feat(web): add tool settings UI for all core image tools
Adds Zustand file store, useToolProcessor hook for upload/process/download
flow, and 7 settings components: resize (with social media presets), crop
(with aspect ratio presets), rotate/flip, convert, compress (quality +
target size modes), strip-metadata, and color adjustments (brightness,
contrast, saturation, channels, effects). Updates tool-page to render the
appropriate settings panel based on toolId.
2026-03-22 03:56:44 +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 ccac5b885c feat(image-engine): add Sharp wrapper with 14 image operations
Operations: resize, crop, rotate, flip, convert, compress, strip-metadata,
brightness, contrast, saturation, color-channels, grayscale, sepia, invert.
Includes format detection, MIME mapping, metadata parsing, and engine orchestrator.
2026-03-22 03:42:40 +08:00
Siddharth Kumar Sah 5ab4c96ef7 docs: add Phase 2 implementation plan for core tools
Covers image engine (Sharp wrapper with 14 operations), file upload/download
system, generic tool route factory, and first 10 tools (resize, crop, rotate,
convert, compress, strip-metadata, color adjustments, before/after preview,
batch processing with ZIP download). 12 tasks total, ~48 new files.
2026-03-22 03:37:03 +08:00
Siddharth Kumar Sah 8aa4c35db0 fix: remove explicit pnpm version from CI to avoid conflict with packageManager
pnpm/action-setup@v4 errors when both `version` input and `packageManager`
in package.json are set. Let it read the version from package.json instead.
2026-03-22 03:13:48 +08:00
Siddharth Kumar SahandGitHub 7b1ca3aa8a Merge pull request #1 from siddharthksah/phase1-foundation
Phase 1: Foundation - Monorepo, Auth, Layout, Docker
2026-03-22 03:13:08 +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 5c7d1e1f3d feat: add multi-stage Docker build with Python ML dependencies 2026-03-22 03:09:14 +08:00
Siddharth Kumar Sah de3d544ab6 feat: add generic tool page template with settings panel and dropzone 2026-03-22 03:05:45 +08:00
Siddharth Kumar Sah b7900ed4ef feat: add login page with split layout matching Stirling-PDF style 2026-03-22 03:05:42 +08:00
Siddharth Kumar Sah e8dfd2e628 fix: deduplicate react in Vite to prevent zustand hook errors in monorepo 2026-03-22 03:03:07 +08:00
Siddharth Kumar Sah e920021da1 feat: add Stirling-PDF-style layout with sidebar, tool panel, dropzone, and theme toggle 2026-03-22 03:01:23 +08:00
Siddharth Kumar Sah 541e49576c feat: add theme system with dark/light/system support and persistence 2026-03-22 03:01:17 +08:00
Siddharth Kumar Sah 5fa012e44b feat: add Vite + React SPA with Tailwind CSS and routing 2026-03-22 02:57:49 +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
Siddharth Kumar Sah 19e48203bb feat: add image-engine and ai stub packages 2026-03-22 02:44:46 +08:00
Siddharth Kumar Sah f210de1a13 feat: add shared package with types, tool definitions, and constants 2026-03-22 02:44:43 +08:00
Siddharth Kumar Sah 58fbb38fd8 feat: initialize Turborepo monorepo with pnpm workspaces 2026-03-22 02:41:44 +08:00
Siddharth Kumar Sah 7457e0ad47 Add GitHub Actions CI pipeline
- Lint & typecheck on every push/PR
- Build verification
- Docker build test
- Multi-arch Docker publish to GHCR on main (amd64 + arm64)
- Build cache via GitHub Actions cache
- Concurrency control to cancel stale runs
2026-03-22 02:38:56 +08:00
Siddharth Kumar Sah b7998a79f7 Add Phase 1 Foundation implementation plan
15 tasks covering monorepo setup, Fastify API, SQLite/Drizzle,
Better-Auth, React SPA with Stirling-PDF layout, theme system,
login page, tool page template, Docker multi-stage build, and
file cleanup cron.
2026-03-22 02:38:12 +08:00
Siddharth Kumar Sah 84c593dccb Upgrade to production Python ML stack, multi-arch Docker
- Switch from Node.js ONNX to production Python ML libraries:
  rembg, Real-ESRGAN, LaMa, PaddleOCR, MediaPipe
- AI models baked into Docker image for instant reliability
- Multi-architecture support (linux/amd64 + linux/arm64)
- No Docker size limits - reliability over size (expect 3-5GB)
- Object Eraser upgraded from experimental to production (LaMa)
- All AI tools now use state-of-the-art models
2026-03-22 02:38:12 +08:00
Siddharth Kumar Sah c3777a9d68 Fix 22 spec review issues in PRD
Critical: Use Real-ESRGAN ONNX (not UpscalerJS/TF.js) for upscaling,
mark Object Eraser as experimental, switch to Debian slim (not Alpine)
for HEIC/libraw/libjxl support, add libraw for RAW formats.

Significant: Revise Docker target to 700MB-1GB, add SSE progress events,
fix StorageAdapter to use streams, add API error schema, define SQLite
write concurrency model, add CORS/SSRF/rate-limiting specs.
2026-03-22 02:38:12 +08:00
Siddharth Kumar Sah 3c81b51e95 Add Stirling-Image product requirements document
Comprehensive PRD covering tech stack (Vite+React+Fastify+Sharp+SQLite),
37+ image tools across 9 categories, Docker deployment on port 1349,
UI/UX architecture, API spec, and development roadmap.
2026-03-22 02:38:12 +08:00
Siddharth Kumar SahandGitHub cd2690d0ec Initial commit 2026-03-22 02:33:47 +08:00