Files
SnapOtter/apps/api/package.json
T
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

48 lines
1.2 KiB
JSON

{
"name": "@stirling-image/api",
"version": "0.0.1",
"private": true,
"type": "module",
"scripts": {
"dev": "tsx watch src/index.ts",
"build": "tsc",
"start": "node dist/index.js",
"typecheck": "tsc --noEmit",
"clean": "rm -rf dist"
},
"dependencies": {
"@fastify/cors": "^11.0.0",
"@fastify/multipart": "^9.0.0",
"@fastify/rate-limit": "^10.2.0",
"@fastify/static": "^8.1.0",
"@fastify/swagger": "^9.4.0",
"@fastify/swagger-ui": "^5.2.0",
"@stirling-image/ai": "workspace:*",
"@stirling-image/image-engine": "workspace:*",
"@stirling-image/shared": "workspace:*",
"archiver": "^7.0.1",
"better-sqlite3": "^11.7.0",
"dotenv": "^16.4.0",
"drizzle-orm": "^0.38.0",
"fastify": "^5.2.0",
"jsqr": "^1.4.0",
"p-queue": "^9.1.0",
"pdfkit": "^0.18.0",
"potrace": "^2.1.8",
"qrcode": "^1.5.4",
"sharp": "^0.33.0",
"zod": "^3.24.0"
},
"devDependencies": {
"@types/archiver": "^7.0.0",
"@types/better-sqlite3": "^7.6.0",
"@types/node": "^22.0.0",
"@types/pdfkit": "^0.17.5",
"@types/potrace": "^2.1.5",
"@types/qrcode": "^1.5.6",
"drizzle-kit": "^0.30.0",
"tsx": "^4.19.0",
"typescript": "^5.7.0"
}
}