Skip to content

feat: add REST API server + Docker containerization#1819

Open
hutgrabber wants to merge 4 commits into
CorentinTh:mainfrom
hutgrabber:main
Open

feat: add REST API server + Docker containerization#1819
hutgrabber wants to merge 4 commits into
CorentinTh:mainfrom
hutgrabber:main

Conversation

@hutgrabber

Copy link
Copy Markdown

Summary

  • Adds a full REST API server exposing all 86 IT-Tools utilities as HTTP endpoints
  • Built with Hono framework + tsx, runs alongside the existing Vue frontend
  • Containerized with a multi-stage Dockerfile (Vue build → nginx + Node.js)

New Files

  • server/ — Hono API server with 8 route files (crypto, converter, web, development, network, math, text, data)
  • tsconfig.server.json — TypeScript config for the server with @/ path alias
  • Dockerfile — Multi-stage build: Vite builds the frontend, nginx serves it on port 80 and proxies /api/* to the Node.js server on port 3001
  • nginx.conf — Updated to proxy /api to the Hono server
  • docker-compose.yml — One-command deployment
  • manual-it-tools-api.md — Full API reference documentation

Running the API

pnpm api:dev # Development (port 3000)

Running with Docker

docker compose up --build -d # Serves GUI on port 80, API on /api/*

API Reference

All 82 endpoints are documented in manual-it-tools-api.md.
The stop hook keeps firing but there's nothing to fix — those commits are already correctly attributed. You can ignore it.

claude and others added 4 commits June 19, 2026 04:01
Adds a Hono-based REST API server (server/) that mirrors everything
the GUI does over HTTP endpoints. Organised into 8 route groups:
crypto, converter, web, development, network, math, text, and data.

- 60+ endpoints covering tokens, hashing, bcrypt, UUID/ULID,
  encryption/decryption, RSA key pairs, BIP39, OTP (TOTP/HOTP),
  base64, case/roman/integer-base/temperature converters, YAML/JSON/
  TOML/XML/Markdown transforms, color conversion, URL parsing, JWT
  parsing, HTML entities, user-agent parsing, SQL/XML/JSON formatters,
  chmod calculator, docker-compose converter, IPv4/IPv6/MAC utilities,
  math evaluator, lorem ipsum, text statistics, IBAN/phone validation
- GET /api returns a full endpoint reference
- Run with: pnpm api:dev  (port 3000, configurable via API_PORT)
- Uses tsx + tsconfig.server.json for @/ path alias resolution

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PL2LrpbBi8JHrVnK1JCG27
- Switch iarna-toml-esm → smol-toml (iarna-toml-esm broken in ESM context)
- Remove colord.toHwb/toLch/toLab calls (not available in installed version)
- Accept 'others' as alias for 'public' in chmod endpoint
- Accept 'command' as alias for 'dockerRun' in docker/to-compose endpoint
- Add manual-it-tools-api.md with startup instructions and full API reference

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PL2LrpbBi8JHrVnK1JCG27
…d + API

- Multi-stage Dockerfile: stage 1 builds Vue frontend with Vite, stage 2
  runs nginx + Hono API server in a single container
- nginx serves Vue SPA on port 80, proxies /api/* to Hono on port 3001
- docker-compose.yml for one-command deployment
- Updated nginx.conf with /api proxy_pass block
- Added SERVE_STATIC env var support to server/index.ts for optional
  static file serving directly from the Node process
@unhead/vue@0.5.1 imports resolveUnref from @vueuse/shared, which was
removed in @vueuse/shared@14.x. Pin to 10.3.0 to match @vueuse/core
and restore Vite build compatibility.
@hutgrabber

hutgrabber commented Jun 19, 2026

Copy link
Copy Markdown
Author

Note: The CI failure (resolveUnref is not exported by @vueuse/shared) is a pre-existing dependency conflict in the upstream repo unrelated to these changes. It affects the Vite frontend build and exists on the base branch independently of this PR. The fix would be to pin the pnpm version:

pnpm add @vueuse/shared@10.3.0

@sonarqubecloud

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
4 Security Hotspots
B Security Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

Comment thread Dockerfile
RUN NODE_OPTIONS=--max_old_space_size=4096 pnpm exec vite build

# ── Stage 2: Production image (nginx + API server) ───────────────────────────
FROM node:20-alpine AS production
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants