Skip to content

Repository files navigation

Tools

Small, self-contained browser tools. Everything runs client-side — your documents and files stay in the browser — and each tool keeps working offline once you have opened it. The public site may send anonymous page-view analytics to Cloudflare when you are online.

peterhewat.github.io/Tools

Tool What it does
SVG Trace images with a Bézier pen and shapes; combine, align, group and fill with gradients. A searchable library of drawings, exported as clean SVG or PNG.
JSON Format, minify, fold and validate JSON, and fix almost-JSON. Convert it to YAML, CSV, TypeScript types or a JSON Schema.

Running it

Requires Bun.

bun install
bun run dev

bun run dev serves the whole site with hot reload on one port (5170), laid out as it is deployed: the index at /Tools/ and each app beside it, so the links between them work. bun run dev svg does the same and opens that app.

To build and preview the whole site, including the index page:

TOOLS_BASE=/ bun run build && bunx serve dist

On Windows, run that from PowerShell ($env:TOOLS_BASE = '/'; bun run build) or prefix it with MSYS_NO_PATHCONV=1. Git Bash rewrites the bare / into a Windows path and the build bakes that in as the base, which fails quietly: the page loads and every asset 404s.

Adding a tool

bun run new-app color-forge "Color Forge"

That scaffolds apps/color-forge and adds an unlisted entry to packages/catalog. The catalog is the only list — the index page, the build, each page's title and manifest, and the deploy all read from it.

How it is put together

apps/          one folder per tool, plus `home` (the index page)
packages/
  catalog/     which apps exist, and where the site is deployed
  ui/          shared styles, browser helpers, build wiring and the offline service worker
  editor/      the code editor the apps share: CodeMirror 6 behind a small API
  codec/       pure encoding helpers: base64, hex, UTF-8, JSON with error positions
  tsconfig/    shared TypeScript config
scripts/       build and scaffold scripts
docs/          decisions, reference and plans

Each app is TypeScript built by Vite into plain static files, with no runtime framework. Vite is a build tool here, not a foundation: the output is HTML, CSS and ES modules that will still work off any file server in ten years. The one library bundled in is CodeMirror, for editing code, reached only through packages/editor (ADR 003).

Commands

Command What it does
bun run dev [slug] Serve the whole site with hot reload
bun run check Lint, typecheck and format check
bun run test Run the test suites
bun run build Build the whole site into dist/
bun run verify check + test + build
bun run new-app Scaffold a new app

Contributing

See CONTRIBUTING.md. bun run verify is the check CI runs. Everyone taking part follows the Code of Conduct.

License

MIT — see LICENSE.

About

Set of small, self-contained browser tools

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Used by

Contributors

Languages