danielmiessler.fabric/web
lif a6e9d6ae92
fix(gui): fix Select binding and empty input handling
- Use bind:value for proper two-way binding with Select component
- Handle empty input to clear session when user clears the field
- Skip session change if value unchanged to avoid redundant API calls
- Track previous session to restore when placeholder selected

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-28 10:34:14 +08:00
..
.github john 2024-11-26 08:40:21 2024-11-26 08:50:31 -05:00
.vscode john 2024-11-26 08:40:21 2024-11-26 08:50:31 -05:00
legacy docs: reorganize web documentation and add installation scripts 2025-05-23 17:47:33 -07:00
myfiles Remove personal development notes from tracking 2025-02-19 21:55:00 -05:00
scripts fix typo in script name 2025-05-23 17:51:41 -07:00
src fix(gui): fix Select binding and empty input handling 2025-12-28 10:34:14 +08:00
static fix: optimize oversized logo images reducing package size by 93% 2025-12-25 11:38:34 +08:00
.browserslistrc feat: upgrade PDF.js to v4.2 and refactor worker initialization 2025-05-24 00:29:20 -07:00
.npmrc john 2024-11-26 08:40:21 2024-11-26 08:50:31 -05:00
.prettierignore john 2024-11-26 08:40:21 2024-11-26 08:50:31 -05:00
.prettierrc john 2024-11-26 08:40:21 2024-11-26 08:50:31 -05:00
eslint.config.js john 2024-11-26 08:40:21 2024-11-26 08:50:31 -05:00
jsconfig.json john 2024-11-26 08:40:21 2024-11-26 08:50:31 -05:00
my-custom-theme.ts john 2024-11-26 08:40:21 2024-11-26 08:50:31 -05:00
package.json feat: upgrade pdfjs and add SSR-safe dynamic PDF worker init 2025-12-14 16:12:23 -08:00
pnpm-lock.yaml feat: upgrade pdfjs and add SSR-safe dynamic PDF worker init 2025-12-14 16:12:23 -08:00
postcss.config.cjs john 2024-11-26 08:40:21 2024-11-26 08:50:31 -05:00
postcss.config.js john 2024-11-26 08:40:21 2024-11-26 08:50:31 -05:00
README.md chore: incoming 1794 changelog entry 2025-10-14 07:54:35 -07:00
rollup.config.js House Keeping: Added missing png. Removed more unused 2024-12-30 10:13:46 -05:00
STD-README.md john 2024-11-26 08:40:21 2024-11-26 08:50:31 -05:00
svelte.config.js Development checkpoint - Web UI enhancements with complete directory structure 2025-02-19 21:47:10 -05:00
tailwind.config.ts Updated POSTS to make main 24-12-08 2024-12-24 05:18:36 -05:00
tsconfig.json Updates 2024-12-16 18:40:15 -05:00
vite.config.ts chore: extend proxy timeout in vite.config.ts to 15 minutes 2025-07-21 12:16:15 -07:00

Fabric Web App

A user-friendly web interface for Fabric built with Svelte, Skeleton UI, and Mdsvex.

Fabric Web App Preview Alt: Screenshot of the Fabric web app dashboard showing pattern inputs and outputs.

Table of Contents

Installation

Note

Requires Node.js ≥18 and Fabric installed globally (fabric --version to check).

From the Fabric root directory:

Using npm:

./web/scripts/npm-install.sh

Or using pnpm (recommended for speed):

./web/scripts/pnpm-install.sh

These scripts install Svelte dependencies and patch PDF-to-Markdown libraries (e.g., pdfjs-dist, pdf-to-markdown). Link to scripts:npm-install.sh and pnpm-install.sh

Running the App

Prerequisites

Start Fabric's server in a separate terminal:

fabric --serve

(This exposes Fabric's API at http://localhost:8080)

Launch the Svelte App

In the web/ directory:

Using npm:

npm run dev

Or using pnpm:

pnpm run dev

Visit http://localhost:5173 (default port).

Tip

Sync Svelte types if needed: npx svelte-kit sync

Streamlit UI

For Python enthusiasts, this alternative UI excels at data visualization and chaining complex patterns. It supports clipboard ops across platforms (install pyperclip on Windows, xclip on Linux).

  • macOS: Uses pbcopy and pbpaste (built-in)
  • Windows: Uses pyperclip library (install with pip install pyperclip)
  • Linux: Uses xclip (install with sudo apt-get install xclip or equivalent for your Linux distribution)

Key Features

  • Run and edit patterns with real-time previews.
  • Analyze outputs with charts (via Matplotlib/Seaborn).
  • Export results to Markdown or CSV.

Setup and Run

From web/:

pip install -r requirements.txt #Or: pip install streamlit pandas matplotlib seaborn numpy python-dotenv pyperclip
streamlit run streamlit.py

Access at http://localhost:8501 (default port).

Obsidian Integration

Turn web/src/lib/content/ into an Obsidian vault for note-taking synced with Fabric patterns. It includes pre-configured .obsidian/ and templates/ folders.

Quick Setup

  1. Open Obsidian: File > Open folder as vault > Select web/src/lib/content/
  2. To publish posts, move them to the posts directory (web/src/lib/content/posts).
  3. Use Fabric patterns to generate content directly in Markdown files.

Tip

When creating new posts, make sure to include a date (YYYY-MM-DD), description, tags (e.g., #ai #patterns), and aliases for SEO. Only a date is needed to display a note. Embed images (![alt](path)), link patterns ([[pattern-name]]), or code blocks for reusable snippets—all in standard Markdown.

Contributing

Refer to the Contributing Guide for details on how to improve this content.