From bcdc4bdf8210e299ff7af5f93cde8c2f1dd69a83 Mon Sep 17 00:00:00 2001 From: SnapOtter Date: Fri, 8 May 2026 15:23:22 +0800 Subject: [PATCH] docs: add color-blindness tool to API docs and update tool counts --- README.md | 2 +- apps/api/src/openapi.yaml | 44 ++++++++++++++++++++++++++++++ apps/docs/.vitepress/config.mts | 4 +-- apps/docs/api/rest.md | 1 + apps/docs/guide/architecture.md | 2 +- apps/docs/guide/getting-started.md | 2 +- apps/docs/index.md | 4 +-- 7 files changed, 52 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 81ed481d..88605445 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ ## Key Features -- **48 image tools** - Resize, crop, compress, convert, watermark, color adjust, vectorize, create GIFs, find duplicates, generate passport photos, and more +- **49 image tools** - Resize, crop, compress, convert, watermark, color adjust, vectorize, create GIFs, find duplicates, generate passport photos, and more - **Local AI** - Remove backgrounds, upscale images, restore and colorize old photos, erase objects, blur faces, enhance faces, extract text (OCR). All on your hardware - no internet required - **Pipelines** - Chain tools into reusable workflows with unlimited steps. Batch process unlimited images at once - **REST API** - Every tool available via API with API key auth. Interactive docs at `/api/docs` diff --git a/apps/api/src/openapi.yaml b/apps/api/src/openapi.yaml index 83a10284..6d2f0cca 100644 --- a/apps/api/src/openapi.yaml +++ b/apps/api/src/openapi.yaml @@ -2053,6 +2053,50 @@ paths: schema: $ref: "#/components/schemas/UnauthorizedError" + /api/v1/tools/color-blindness: + post: + tags: [Tools] + summary: Color blindness simulation + description: Simulate how an image appears to people with various types of color vision deficiency. + security: + - bearerAuth: [] + requestBody: + required: true + content: + multipart/form-data: + schema: + type: object + required: [file] + properties: + file: + type: string + format: binary + description: Image file to process + settings: + type: string + description: | + JSON string with options: + - `simulationType` (enum, default "deuteranomaly") -- Type of color vision deficiency to simulate. One of: protanopia, deuteranopia, tritanopia, protanomaly, deuteranomaly, tritanomaly, achromatopsia, blueConeMonochromacy + responses: + "200": + description: Processed image + content: + application/json: + schema: + $ref: "#/components/schemas/ToolResponse" + "400": + description: Invalid input + content: + application/json: + schema: + $ref: "#/components/schemas/Error" + "401": + description: Authentication required + content: + application/json: + schema: + $ref: "#/components/schemas/UnauthorizedError" + /api/v1/tools/gif-tools: post: tags: [Tools] diff --git a/apps/docs/.vitepress/config.mts b/apps/docs/.vitepress/config.mts index 60d7e2a5..0f31aa8b 100644 --- a/apps/docs/.vitepress/config.mts +++ b/apps/docs/.vitepress/config.mts @@ -4,7 +4,7 @@ import llmstxt from "vitepress-plugin-llms"; export default defineConfig({ title: "SnapOtter", description: - "Documentation for SnapOtter - A Self Hosted Image Manipulator. 48 tools, local AI, pipelines, REST API.", + "Documentation for SnapOtter - A Self Hosted Image Manipulator. 49 tools, local AI, pipelines, REST API.", base: "/", appearance: { initialValue: "light" }, srcDir: ".", @@ -48,7 +48,7 @@ export default defineConfig({ `, customTemplateVariables: { description: - "SnapOtter is a self-hosted, open-source image processing platform with 48 tools including AI/ML. Runs in a single Docker container with GPU auto-detection.", + "SnapOtter is a self-hosted, open-source image processing platform with 49 tools including AI/ML. Runs in a single Docker container with GPU auto-detection.", details: "Resize, compress, convert, remove backgrounds, upscale, run OCR, and more - without sending images to external services.", }, diff --git a/apps/docs/api/rest.md b/apps/docs/api/rest.md index 28cdb5e0..01268de4 100644 --- a/apps/docs/api/rest.md +++ b/apps/docs/api/rest.md @@ -131,6 +131,7 @@ curl -X POST http://localhost:1349/api/v1/tools//batch \ | `adjust-colors` | Adjust Colors | `brightness`, `contrast`, `exposure`, `saturation`, `temperature`, `tint`, `hue`, `sharpness`, `red`, `green`, `blue`, `effect` (none/grayscale/sepia/invert) | | `sharpening` | Sharpening | `method` (adaptive/unsharp-mask/high-pass), `sigma`, `m1`, `m2`, `x1`, `y2`, `y3`, `amount`, `radius`, `threshold`, `strength`, `kernelSize` (3/5), `denoise` (off/light/medium/strong) | | `replace-color` | Replace Color | `sourceColor`, `targetColor` (replacement), `makeTransparent`, `tolerance` | +| `color-blindness` | Color Blindness Simulation | `simulationType` (protanopia/deuteranopia/tritanopia/protanomaly/deuteranomaly/tritanomaly/achromatopsia/blueConeMonochromacy, default "deuteranomaly") | ### AI Tools diff --git a/apps/docs/guide/architecture.md b/apps/docs/guide/architecture.md index 28c1cf66..f3f4ce32 100644 --- a/apps/docs/guide/architecture.md +++ b/apps/docs/guide/architecture.md @@ -43,7 +43,7 @@ Shared TypeScript types, constants (like `APP_VERSION` and tool definitions), an ### API (`apps/api`) -A Fastify v5 server exposing 48 tool routes (33 standard image operations + 15 AI-powered) that handles: +A Fastify v5 server exposing 49 tool routes (33 standard image operations + 15 AI-powered) that handles: - File uploads, temporary workspace management, and persistent file storage - User file library with version chains (`user_files` table) -- each processed result links back to its source file and records which tool was applied, with auto-generated thumbnails for the Files page - Tool execution (routes each tool request to the image engine or AI bridge) diff --git a/apps/docs/guide/getting-started.md b/apps/docs/guide/getting-started.md index da86571f..3de508d5 100644 --- a/apps/docs/guide/getting-started.md +++ b/apps/docs/guide/getting-started.md @@ -64,7 +64,7 @@ pnpm dev ## What You Can Do -### Image Processing (48 Tools) +### Image Processing (49 Tools) | Category | Tools | |----------|-------| diff --git a/apps/docs/index.md b/apps/docs/index.md index a80c9219..6959051b 100644 --- a/apps/docs/index.md +++ b/apps/docs/index.md @@ -4,7 +4,7 @@ layout: home hero: name: "SnapOtter" text: "A Self Hosted Image Manipulator" - tagline: 48 tools. Local AI. No cloud. Your images never leave your home. + tagline: 49 tools. Local AI. No cloud. Your images never leave your home. actions: - theme: brand text: Get started @@ -14,7 +14,7 @@ hero: link: /api/rest features: - - title: 48 Image Tools + - title: 49 Image Tools details: Resize, crop, compress, convert, watermark, color adjust, vectorize, create GIFs, build collages, generate passport photos, find duplicates, and more. - title: Local AI details: 15 AI-powered tools - remove backgrounds, upscale, enhance images, restore and colorize old photos, erase objects, blur faces, enhance faces, extract text (OCR), fix fake transparency. All on your hardware, no internet required.