diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..295b77e --- /dev/null +++ b/.gitignore @@ -0,0 +1,27 @@ + +# ── GSD baseline (auto-generated) ── +.DS_Store +Thumbs.db +*.swp +*.swo +*~ +.idea/ +.vscode/ +*.code-workspace +.env +.env.* +!.env.example +node_modules/ +.next/ +dist/ +build/ +__pycache__/ +*.pyc +.venv/ +venv/ +target/ +vendor/ +*.log +coverage/ +.cache/ +tmp/ diff --git a/README.md b/README.md new file mode 100644 index 0000000..91a5596 --- /dev/null +++ b/README.md @@ -0,0 +1,26 @@ +# Kerf + +Modular raster-to-vector conversion engine + 2D sign/patch design canvas. + +## Repository Structure + +``` +engine/ — Kerf Engine (standalone API, Python/FastAPI) +app/ — Kerf App frontend (React) [future] +server/ — Kerf App backend API [future] +docker/ — Dockerfiles and compose configs [future] +``` + +## Kerf Engine + +The engine is a self-contained FastAPI service that accepts raster images and returns clean vector output (SVG, DXF). + +### Quick Start + +```bash +cd engine +pip install -e ".[dev]" +uvicorn main:app --host 0.0.0.0 --port 8000 +``` + +API docs available at `http://localhost:8000/docs`. diff --git a/engine/.gitignore b/engine/.gitignore new file mode 100644 index 0000000..8165030 --- /dev/null +++ b/engine/.gitignore @@ -0,0 +1,2 @@ +*.egg-info/ +.eggs/ diff --git a/engine/api/__init__.py b/engine/api/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/engine/main.py b/engine/main.py new file mode 100644 index 0000000..8ba9053 --- /dev/null +++ b/engine/main.py @@ -0,0 +1,14 @@ +"""Kerf Engine — raster-to-vector conversion API.""" + +from fastapi import FastAPI + +app = FastAPI( + title="Kerf Engine", + description="Raster-to-vector conversion pipeline with Potrace and VTracer modes", + version="0.1.0", +) + + +@app.get("/health") +async def health(): + return {"status": "ok"} diff --git a/engine/pipeline/__init__.py b/engine/pipeline/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/engine/pyproject.toml b/engine/pyproject.toml new file mode 100644 index 0000000..5390ba1 --- /dev/null +++ b/engine/pyproject.toml @@ -0,0 +1,28 @@ +[build-system] +requires = ["setuptools>=68.0", "wheel"] +build-backend = "setuptools.build_meta" + +[project] +name = "kerf-engine" +version = "0.1.0" +description = "Kerf Engine — raster-to-vector conversion pipeline" +requires-python = ">=3.11" +dependencies = [ + "fastapi>=0.110", + "uvicorn[standard]>=0.29", + "opencv-python-headless>=4.9", + "pypotrace>=0.3", + "vtracer>=0.6", + "python-multipart>=0.0.9", + "Pillow>=10.2", +] + +[tool.setuptools.packages.find] +include = ["pipeline*", "api*"] + +[project.optional-dependencies] +dev = [ + "pytest>=8.0", + "httpx>=0.27", + "ruff>=0.3", +] diff --git a/engine/tests/__init__.py b/engine/tests/__init__.py new file mode 100644 index 0000000..e69de29