Tools site: Markdown editor, JSON editor, 24-hour pastebin
Single FastAPI container with a registry-driven single-page front end, so new tools are one module plus one registry entry. Runs as one container behind a reverse proxy. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
commit
9d910eb147
26 changed files with 2591 additions and 0 deletions
37
app/static/js/registry.js
Normal file
37
app/static/js/registry.js
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
// The list of tools. The sidebar, the home page and the router are all built from it.
|
||||
//
|
||||
// To add a tool: create js/tools/<id>.js exporting mount(el, ctx) (see app.js for ctx),
|
||||
// then add an entry here. A tool owns every path under its `path`, so /paste/abc123
|
||||
// goes to the paste tool with ctx.rest = "abc123".
|
||||
export const TOOLS = [
|
||||
{
|
||||
id: 'markdown',
|
||||
name: 'Markdown',
|
||||
path: '/markdown',
|
||||
category: 'Text',
|
||||
icon: 'M↓',
|
||||
description: 'Write Markdown with a live preview: side by side, editor only or full-page preview.',
|
||||
load: () => import('./tools/markdown.js'),
|
||||
},
|
||||
{
|
||||
id: 'json',
|
||||
name: 'JSON editor',
|
||||
path: '/json',
|
||||
category: 'Data',
|
||||
icon: '{ }',
|
||||
description: 'Validate, prettify and compact JSON, with a live tree view you can edit.',
|
||||
load: () => import('./tools/json.js'),
|
||||
},
|
||||
{
|
||||
id: 'paste',
|
||||
name: 'Pastebin',
|
||||
path: '/paste',
|
||||
category: 'Sharing',
|
||||
icon: '⎘',
|
||||
description: 'Share text with a short link. Pastes are deleted after 24 hours.',
|
||||
load: () => import('./tools/paste.js'),
|
||||
},
|
||||
];
|
||||
|
||||
// Sidebar groups appear in this order; unknown categories go last, alphabetically.
|
||||
export const CATEGORY_ORDER = ['Text', 'Data', 'Sharing'];
|
||||
Loading…
Add table
Add a link
Reference in a new issue