Skip to content

Repository files navigation

Undraft

Host and share SPAs as versioned, shareable URLs. Add comments, see visitor analytics, push new versions from the CLI or API.

This is the open-source core of Undraft. A commercial hosted version at undraft.page adds billing, team plans, and a fully managed experience — see CONTRIBUTING.md for what lives where.

Features

  • Upload: drag-and-drop a ZIP or single HTML file; get a shareable URL
  • Versions: every upload is a version; roll back anytime
  • Comments: collaborative comments anchored to elements in the SPA (Yjs CRDT)
  • Analytics: built-in click/scroll tracking (stored in your own DB)
  • Text editing: inline edits to HTML content, saved as new versions
  • CLI: undraft publish ./build.zip from your terminal
  • Public REST API: /api/v1/* for programmatic integration (OpenAPI spec in docs/openapi.yaml)

Stack

  • Backend: Hono on Node 22
  • DB: Postgres (Drizzle ORM)
  • Storage: local filesystem or GCS
  • Frontend: React 19 + Vite, Tailwind
  • Overlay: vanilla TS, Shadow DOM
  • CLI: Commander + Node

Self-hosting

pnpm install
cp .env.example .env     # fill in values
docker compose up -d db  # start local Postgres
pnpm db:migrate          # push schema
pnpm dev                 # API + dashboard

Open http://localhost:5173, sign in with Google OAuth (you need your own client ID — see .env.example), upload a ZIP, share the URL.

For production self-hosting see docs/self-hosting.md.

Testing

pnpm test       # all packages
pnpm typecheck

Contributing

See CONTRIBUTING.md. License: Apache 2.0.

About

Host and share any HTML file or AI-generated web app as a versioned URL. Pin comments, track analytics, push new versions from the CLI or REST API. Self-hosted, Apache 2.0.

Topics

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages