Skip to content

Commit e6351d5

Browse files
committed
feat(dev,html-app): make one-page HTML apps more consistent and discoverable
1 parent 0ed2103 commit e6351d5

47 files changed

Lines changed: 5014 additions & 769 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.env.example

Lines changed: 35 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,44 @@ COURIER_HTTP_REQUEST_CONFIG_AUTH_CONFIG_VALUE="Bearer <generated-kratos-jwt>"
3939
# HTML tool app deployment (dev/tools/)
4040
# SECUTILS_HTML_APP_API_DOMAIN=https://secutils.dev
4141
# SECUTILS_HTML_APP_API_KEY=su_ak_...
42+
#
43+
# Public host where the tools are served. Used by `dev/tools/deploy.ts` to substitute `{{TOOLS_HOST}}` placeholders in
44+
# HTML and skill .md sources before minification (canonical, og:url, og:image, JSON-LD, related-tools links, llms.txt
45+
# entries). Defaults to `tools.secutils.dev`.
46+
# SECUTILS_TOOLS_PUBLIC_HOST=tools.secutils.dev
47+
#
48+
# Absolute path (or path relative to this repo root) to the marketing site's index.html. Read by
49+
# `scripts/tools-check.ts` to verify that every promoted tool is linked from the home page's "Free single-page tools"
50+
# section, and that no non-promoted tool leaked there. The marketing site lives in a separate (private) sibling
51+
# checkout. When unset the marketing-side check is skipped with a warning so contributors without that checkout can
52+
# still run `make tools-check`.
53+
# SECUTILS_TOOLS_PROMO_HOME_INDEX=../<promo-repo>/.../src/index.html
54+
#
55+
# Per-tool responder IDs. Each tool has two sibling responders:
56+
# _<TOOL> -> serves `https://<TOOLS_HOST>/<path>` (text/html)
57+
# _<TOOL>_MD -> serves `https://<TOOLS_HOST>/<path>.md` (text/markdown, the AI agent skill)
58+
# Plus the agent-discovery singletons:
59+
# _LLMS_TXT -> /llms.txt (text/markdown, llmstxt.org index)
60+
# _ROBOTS_TXT -> /robots.txt (text/plain, AI crawler rules + Content Signals + sitemap pointer)
61+
# _SITEMAP_XML -> /sitemap.xml (application/xml, one entry per public surface)
62+
# _AGENT_SKILLS_INDEX -> /.well-known/agent-skills/index.json (application/json, Cloudflare Agent Skills Discovery RFC v0.2.0)
63+
#
64+
# Tools whose source HTML lacks a responder ID are skipped at deploy with a
65+
# yellow warning (existing behavior; this lets you stage rollouts safely).
4266
# SECUTILS_HTML_APP_RESPONDER_ID_INDEX=
43-
# SECUTILS_HTML_APP_RESPONDER_ID_CALC=
4467
# SECUTILS_HTML_APP_RESPONDER_ID_JWT_DEBUGGER=
68+
# SECUTILS_HTML_APP_RESPONDER_ID_JWT_DEBUGGER_MD=
4569
# SECUTILS_HTML_APP_RESPONDER_ID_SAML_DECODER=
70+
# SECUTILS_HTML_APP_RESPONDER_ID_SAML_DECODER_MD=
4671
# SECUTILS_HTML_APP_RESPONDER_ID_MOCK_SAML_IDP=
72+
# SECUTILS_HTML_APP_RESPONDER_ID_MOCK_SAML_IDP_MD=
4773
# SECUTILS_HTML_APP_RESPONDER_ID_CERTIFICATE_DECODER=
74+
# SECUTILS_HTML_APP_RESPONDER_ID_CERTIFICATE_DECODER_MD=
4875
# SECUTILS_HTML_APP_RESPONDER_ID_MARKDOWN_TO_HTML=
76+
# SECUTILS_HTML_APP_RESPONDER_ID_MARKDOWN_TO_HTML_MD=
77+
# SECUTILS_HTML_APP_RESPONDER_ID_ECHO=
78+
# SECUTILS_HTML_APP_RESPONDER_ID_ECHO_MD=
79+
# SECUTILS_HTML_APP_RESPONDER_ID_LLMS_TXT=
80+
# SECUTILS_HTML_APP_RESPONDER_ID_ROBOTS_TXT=
81+
# SECUTILS_HTML_APP_RESPONDER_ID_SITEMAP_XML=
82+
# SECUTILS_HTML_APP_RESPONDER_ID_AGENT_SKILLS_INDEX=

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,6 @@ dist
1313
*.private.env.json
1414
deploy.env
1515
secutils.toml
16+
17+
# Generated by `dev/tools/deploy.ts` from the *.skill.md sources at deploy time.
18+
dev/tools/llms.txt

Makefile

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ DEPLOY_CAMOUFOX_TAG ?=
2020
.PHONY: deploy-dev deploy-dev-api deploy-dev-webui deploy-dev-docs deploy-dev-retrack-api deploy-dev-retrack-scraper
2121
.PHONY: deploy-prod deploy-prod-api deploy-prod-webui deploy-prod-docs deploy-prod-retrack-api deploy-prod-retrack-scraper
2222
.PHONY: deploy-camoufox
23-
.PHONY: deploy-tools
23+
.PHONY: deploy-tools tools-og tools-og-loop tools-check e2e-tools-test
2424

2525
## ---------- Development ----------
2626

@@ -244,9 +244,34 @@ perf-report: ## Open the HTML perf viewer. Load .perf/history.jsonl inside it.
244244

245245
## ---------- Tool Apps ----------
246246

247-
deploy-tools: ## Deploy dev/tools HTML apps to responders (ARGS="calc jwt-debugger" to deploy specific tools).
247+
deploy-tools: ## Deploy dev/tools HTML apps to responders (ARGS="jwt-debugger echo" to deploy specific tools; also handles *.skill.md and llms.txt).
248248
node --env-file=.env dev/tools/deploy.ts $(ARGS)
249249

250+
tools-og: ## Regenerate the per-tool 1200x630 OG images (dark + light) into components/secutils-docs/static/img/og/.
251+
cd e2e && npx playwright test --config=playwright.tools.config.ts og.spec.ts $(ARGS)
252+
253+
tools-og-loop: ## Run tools-og repeatedly to verify OG screenshots are byte-stable (RUNS=N default 10).
254+
@rm -rf $(E2E_LOOP_DIR) && mkdir -p $(E2E_LOOP_DIR); \
255+
pass=0; fail=0; \
256+
for i in $$(seq 1 $(RUNS)); do \
257+
echo "--- Run $$i/$(RUNS) ---"; \
258+
rm -rf e2e/test-results; \
259+
if (cd e2e && npx playwright test --config=playwright.tools.config.ts og.spec.ts $(ARGS)) > $(E2E_LOOP_DIR)/run-$$i.log 2>&1; then \
260+
pass=$$((pass+1)); echo "PASS"; \
261+
else \
262+
fail=$$((fail+1)); echo "FAIL → $(E2E_LOOP_DIR)/run-$$i.log"; \
263+
[ -d e2e/test-results ] && cp -r e2e/test-results $(E2E_LOOP_DIR)/artifacts-run-$$i || true; \
264+
fi; \
265+
done; \
266+
echo "=== Results: $$pass/$(RUNS) passed, $$fail/$(RUNS) failed ==="; \
267+
echo "Logs and artifacts: $(E2E_LOOP_DIR)"
268+
269+
e2e-tools-test: ## Run the e2e/tools/ Playwright suite against $(BASE_URL) (default https://tools.secutils.dev). Use ARGS for extra flags.
270+
cd e2e && npx playwright test --config=playwright.tools.config.ts $(ARGS)
271+
272+
tools-check: ## Validate that the promo home Free-tools section matches `<meta name="su-tool-promote">` in dev/tools/. Read-only, no browser.
273+
@node scripts/tools-check.ts
274+
250275
## ---------- Docker Cleanup ----------
251276

252277
docker-df: ## Show Docker disk usage summary.

README.md

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,24 @@ Secutils.dev adheres to [open security principles](https://en.wikipedia.org/wiki
3030

3131
![Secutils.dev Web Security](https://github.com/secutils-dev/.github/blob/main/profile/web_security.png?raw=true)
3232

33+
## Free single-page tools
34+
35+
A handful of focused, no-signup, browser-only tools is hosted at [tools.secutils.dev](https://tools.secutils.dev/). Every tool ships with a stable shareable URL (drop a link into a ticket, an MCP agent, or a postmortem) and an AI-agent skill at `/<slug>.md` so coding assistants can drive the tool directly from a `WebFetch` call.
36+
37+
| Tool | What it does | AI-agent skill |
38+
|-------------------------------------------------------------------|--------------------------------------------------------------------|---------------------------------------------------------------|
39+
| [JWT Debugger](https://tools.secutils.dev/jwt) | Decode, verify, and sign HMAC JSON Web Tokens | [`/jwt.md`](https://tools.secutils.dev/jwt.md) |
40+
| [SAML Decoder](https://tools.secutils.dev/saml) | Inspect SAML responses, requests, and metadata | [`/saml.md`](https://tools.secutils.dev/saml.md) |
41+
| [PEM Certificate Decoder](https://tools.secutils.dev/pem) | Inspect PEM-encoded X.509 certificate chains | [`/pem.md`](https://tools.secutils.dev/pem.md) |
42+
| [Markdown to HTML](https://tools.secutils.dev/md-to-html) | Self-contained HTML and PDF export from Markdown | [`/md-to-html.md`](https://tools.secutils.dev/md-to-html.md) |
43+
| [HTTP Echo / Mock Response](https://tools.secutils.dev/echo) | Build a customizable HTTP response, served as a shareable URL | [`/echo.md`](https://tools.secutils.dev/echo.md) |
44+
45+
The aggregate index of all skills (including specialized ones not listed above) is published at [tools.secutils.dev/llms.txt](https://tools.secutils.dev/llms.txt) following the [llmstxt.org](https://llmstxt.org/) convention. Source HTML for every tool lives in [`dev/tools/`](dev/tools/) (see [`dev/tools/AGENTS.md`](dev/tools/AGENTS.md) for the deploy/SEO recipe).
46+
3347
## Prerequisites
3448

3549
- [Rust](https://www.rust-lang.org/tools/install) (stable toolchain)
36-
- [Node.js](https://nodejs.org/) 22+ (see `.nvmrc`)
50+
- [Node.js](https://nodejs.org/) 24+ (see `.nvmrc`)
3751
- [Docker](https://docs.docker.com/get-docker/) and [Docker Compose](https://docs.docker.com/compose/install/)
3852

3953
## Getting Started
153 KB
Loading
137 KB
Loading
155 KB
Loading
139 KB
Loading
147 KB
Loading
131 KB
Loading

0 commit comments

Comments
 (0)