Image2SVG is a browser-native image-to-SVG converter built with Next.js, TypeScript, and WebAssembly.
- No backend uploads required for core conversion flow.
- Client-side vectorization pipeline with optional optimization.
- Designed to be fast, private, and open for community extension.
- Raster image to SVG conversion in the browser.
- Pipeline architecture in
src/libfor staged processing. - SVG optimization pass via SVGO.
- PWA-ready app shell.
- Next.js 16 + React 19
- TypeScript (strict)
- VTracer WASM
- SVGO
- Vitest for unit tests
- Install dependencies:
pnpm install- Run dev server:
pnpm dev- Open:
http://localhost:3000
pnpm dev— start local dev serverpnpm build— production buildpnpm start— start production serverpnpm lint— run Oxc lint checkspnpm lint:fix— run Oxc lint fixespnpm format— check formatting with Oxc formatterpnpm format:write— apply Oxc formattingpnpm typecheck— run TypeScript checkspnpm test— run unit testspnpm test:watch— watch mode testspnpm test:coverage— generate coverage report
Unit tests live alongside source files (*.test.ts) in src/lib.
Run all tests:
pnpm testPlease read CONTRIBUTING.md before opening a pull request.
Key expectations:
- Keep PRs focused.
- Add/update tests for behavior changes.
- Run lint, typecheck, and tests locally before submitting.
- Use clear commit messages and clean git history.
- License:
LICENSE - Code of Conduct:
CODE_OF_CONDUCT.md - Security:
SECURITY.md
GitHub Actions runs lint, typecheck, tests, and build for pushes to main and pull requests.
- Expand regression tests for vectorization edge cases.
- Add sample-image golden tests for output quality.
- Improve plugin-style extension points in the pipeline.
