Skip to content

Repository files navigation

Fontsteal

First cut of the Excalidraw architecture: Chrome extension → Next.js API → Supabase → web feed.

Setup

npm install
cp .env.example .env.local

Create the database table with supabase/schema.sql, then fill .env.local:

FONTSTEAL_API_TOKEN=change-me
SUPABASE_URL=https://your-project.supabase.co
SUPABASE_SERVICE_ROLE_KEY=...
NEXT_PUBLIC_SUPABASE_ANON_KEY=...

Run it:

npm run dev

Open http://localhost:3000.

Extension

  1. Open chrome://extensions.
  2. Enable Developer mode.
  3. Load unpacked → select extension/.
  4. Select text on any http(s) page.
  5. Open Fontsteal, set API URL http://localhost:3000 and your token, then save.

Local dev accepts dev-token only when FONTSTEAL_API_TOKEN is unset and NODE_ENV !== production.

API

curl -X POST http://localhost:3000/api/clips \
  -H 'authorization: Bearer dev-token' \
  -H 'content-type: application/json' \
  -d '{"source_url":"https://example.com","font_family":"Georgia","selected_text":"Hello serif","tags":["demo"]}'
  • GET /api/clips returns public clips.
  • GET /api/clips?mine=1 requires the bearer token and returns clips owned by that token.
  • GET /api/clips/:id returns a public clip.

Checks

npm run check
npm run build

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages