chore: Created engine/ Python project with FastAPI skeleton, all depend…
- "engine/pyproject.toml" - "engine/main.py" - "engine/.gitignore" - "README.md" GSD-Task: S01/T01
This commit is contained in:
parent
1adcbb3348
commit
7411bf3ed4
8 changed files with 97 additions and 0 deletions
27
.gitignore
vendored
Normal file
27
.gitignore
vendored
Normal file
|
|
@ -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/
|
||||||
26
README.md
Normal file
26
README.md
Normal file
|
|
@ -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`.
|
||||||
2
engine/.gitignore
vendored
Normal file
2
engine/.gitignore
vendored
Normal file
|
|
@ -0,0 +1,2 @@
|
||||||
|
*.egg-info/
|
||||||
|
.eggs/
|
||||||
0
engine/api/__init__.py
Normal file
0
engine/api/__init__.py
Normal file
14
engine/main.py
Normal file
14
engine/main.py
Normal file
|
|
@ -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"}
|
||||||
0
engine/pipeline/__init__.py
Normal file
0
engine/pipeline/__init__.py
Normal file
28
engine/pyproject.toml
Normal file
28
engine/pyproject.toml
Normal file
|
|
@ -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",
|
||||||
|
]
|
||||||
0
engine/tests/__init__.py
Normal file
0
engine/tests/__init__.py
Normal file
Loading…
Add table
Reference in a new issue