Skip to content

Architecture

Memet Zx edited this page Nov 14, 2026 · 1 revision

Architecture

Mools is a static site. Everything is prerendered at build time and every tool runs on the client. There is no server to run or secure.

flowchart LR
    R[src/lib/tools.js<br/>tool registry] --> S[Sidebar, search,<br/>home and category pages]
    R --> L[llms.txt, tools.json,<br/>sitemap.xml]
    P[src/routes/category/slug<br/>one page per tool] --> U[ToolPage / ConvertPage<br/>shared UI]
    U --> F[src/lib<br/>tool logic]
    A[src/lib/agentTools.js] --> F
    A --> W[WebMCP in the browser]
    A --> M[mcp/server.js<br/>MCP server]
Loading

Layout

src/lib/          tool logic as pure functions, plus the tool registry (tools.js)
src/components/   shared UI: ToolPage, ConvertPage, OutputCard, Sidebar, CommandPalette...
src/routes/       one folder per tool: <category>/<slug>/+page.svelte
mcp/              the stdio MCP server and its tests
docs/             logo and screenshots used by the README
.github/          deploy and release workflows, issue and pull request templates

The important ideas

One registry drives everything. src/lib/tools.js lists every tool and category. The sidebar, the home page, category pages, the command palette, llms.txt, tools.json and the sitemap are all generated from it. Add one entry and the tool shows up everywhere.

Logic lives in src/lib, not in components. Tools are thin pages over pure functions (textUtils.js, converters.js, generators.js, bulk.js, devUtils.js...). That keeps them easy to test and lets the same function serve the web page, WebMCP and the MCP server.

Shared page components. ToolPage handles the textarea, action buttons, copy and clear, and errors. ConvertPage adds a live output card. OutputCard, ResultList and StatRows render results. A typical tool page is 20 to 40 lines.

Agents get the same tools. src/lib/agentTools.js wraps the logic with JSON Schemas. The browser registers them with WebMCP, and mcp/server.js serves them over MCP. See Agent Support.

Tech stack

Part Choice
Framework SvelteKit 3 with Svelte 5 (runes), adapter-static
Styling Bootstrap 5 with the Halfmoon themes, Bootstrap Icons
Build Vite 8, bun for installs
Tests Vitest (with jsdom for DOM based tools)
Hosting GitHub Pages under /tools
Heavier helpers qrcode, jsbarcode, pdf-lib, heic2any, fflate, yaml, smol-toml, marked, sql-formatter, bcryptjs, loaded only on the pages that need them

Build and deploy

  1. A push to master triggers the Deploy workflow.
  2. It installs dependencies with bun, runs the tests, builds the static site and publishes it to GitHub Pages.
  3. Pushing a version tag triggers the Release workflow. See Releasing.

SvelteKit 3 needs Node 22.17 or newer, so the workflows set up Node 24 next to bun.

Clone this wiki locally