1
0
Fork
You've already forked metaform
0
🪵 Experimental web front-end for Logseq deployed to Cloudflare Pages Functions.
  • TypeScript 58.9%
  • Svelte 26%
  • PLpgSQL 7.2%
  • Just 4.6%
  • JavaScript 1.8%
  • Other 1.5%
2024年01月28日 14:27:40 -05:00
src feat: upgrade to sveltekit@2.0.0 2024年01月28日 14:27:40 -05:00
static feat: upgrade to sveltekit@2.0.0 2024年01月28日 14:27:40 -05:00
.env.example feat: upgrade to sveltekit@2.0.0 2024年01月28日 14:27:40 -05:00
.gitignore chore: 🔧 run scaffolding 2022年05月23日 16:07:12 +08:00
.node-version feat: upgrade to sveltekit@2.0.0 2024年01月28日 14:27:40 -05:00
.npmrc chore: 🔧 run scaffolding 2022年05月23日 16:07:12 +08:00
.prettierrc chore: 🔧 run scaffolding 2022年05月23日 16:07:12 +08:00
bun.lockb feat: upgrade to sveltekit@2.0.0 2024年01月28日 14:27:40 -05:00
COPYING docs: 📚️ license work 2022年05月23日 16:07:18 +08:00
justfile feat: upgrade to sveltekit@2.0.0 2024年01月28日 14:27:40 -05:00
package.json feat: upgrade to sveltekit@2.0.0 2024年01月28日 14:27:40 -05:00
README.md feat: upgrade to sveltekit@2.0.0 2024年01月28日 14:27:40 -05:00
svelte.config.js feat: upgrade to sveltekit@2.0.0 2024年01月28日 14:27:40 -05:00
tsconfig.json feat: upgrade to sveltekit@2.0.0 2024年01月28日 14:27:40 -05:00
vite.config.ts feat: upgrade to sveltekit@2.0.0 2024年01月28日 14:27:40 -05:00

Metaform

Experimental web front-end for Logseq.

Features

  • Display Logseq data on the open web.
  • Edge-side page and block embeds.
  • Web form to upload Logseq JSON exports.
  • REST endpoints for page and block data.
  • Works with JavaScript disabled.

Demo

View pre-recorded live demo on Twitter.

How it works

  1. Upload triggers data extraction to Postgres database hosted on Supabase.
  2. Page assembled on-the-fly inside Cloudflare edge function using Web Workers.
  3. Functions perform server-side transclusion using recursive async reducer functions.
  4. API endpoints called whenever a reducer needs more data.
  5. Svelte components used to assemble display.
  6. Display logic searches content for embed tags and injects available data.

Performance

Lighthouse tests on Cloudflare have shown depth 6 page embeds with 300ms first paint.

Requirements

Online use

  1. Copy source to your own GitHub repo
  2. Create accounts on Supabase and Cloudflare Pages
  3. Run setup.sql in Supabase SQL editor
  4. Add Supabase environment variables
  5. Push commit to GitHub to deploy to Cloudflare
  6. Navigate to Pages site
  7. Upload Logseq JSON export from upload page

Development

You must have Bun and a recent Node.js LTS. Using fnm a Node.js LTS will be installed automatically.

  1. Copy source code into a working directory
  2. Create .env.local by copying .env.example (See Online use for settings.)
  3. Run command bun install to install dependencies
  4. Run setup.sql in the Supabase SQL editor
  5. Start dev server with bunx vite dev use h for help

Justfile

Just is like make only a little more forgiving. Installation instructions.

  • just list recipes
  • just supabase run supabase cli commands with bunx
  • just dev start a vite dev server with bun
  • just test run api tests with curl
  • just build build for production with vite
  • just preview preview build with vite
  • just clean spic and span edition
  • List recipes to view more