initial release

This commit is contained in:
root
2026-06-03 09:23:53 +08:00
commit cbfaacb466
26 changed files with 3962 additions and 0 deletions
+38
View File
@@ -0,0 +1,38 @@
# web-tool
React 19 + TypeScript 6 + Vite 8 + Tailwind CSS 4.
## Commands
```bash
npm run dev # dev server
npm run build # tsc -b && vite build (typecheck first, then bundle)
npm run lint # eslint .
npm run preview # vite preview (serve built dist/)
```
## Architecture
- **Entry**: `src/main.tsx``src/App.tsx`
- **Tools**: 6 single-file tools in `src/tools/` (JsonTool, Base64Tool, UrlTool, TimestampTool, HtmlEntitiesTool, CaseConverterTool)
- **Nav**: sidebar in `src/components/Sidebar.tsx`; add a new tool by importing in `App.tsx` and registering in `tools` record
- **Styling**: Tailwind CSS v4 — uses `@import "tailwindcss"` (NOT `@tailwind` directives)
## Conventions
- `verbatimModuleSyntax` is on — use `import type` for type-only imports
- `erasableSyntaxOnly` is on — no enums, no namespaces, no parameter properties
- Chinese (zh-CN) labels only, no i18n
## Docker
```bash
docker compose up -d
```
Multi-stage build (node:22-alpine → nginx). Serves via Traefik behind `tool.linkerhand.cc`. Requires external `traefik-net` network.
## Gotchas
- `npm run build` runs `tsc -b` first; fix type errors before expecting a build to succeed
- No test framework or test scripts; nothing to run for verification beyond build + lint