- TypeScript 92.9%
- Nix 4.9%
- CSS 1.2%
- HTML 0.5%
- JavaScript 0.3%
- Other 0.2%
| .forgejo/workflows | ||
| backend | ||
| docker | ||
| frontend | ||
| landing | ||
| nix | ||
| .env.example | ||
| .gitignore | ||
| COMPARISON.md | ||
| docker-compose.standalone.yml | ||
| docker-compose.yml | ||
| flake.lock | ||
| flake.nix | ||
| LICENSE | ||
| menu.png | ||
| project.png | ||
| README.md | ||
typst-web
A self-hosted, collaborative Typst editor. Write and compile Typst documents in the browser, with real-time multi-user editing, git version control, and PDF/ZIP export. It now has typst compiled to WASM, if WASM is supported in your browser, the documents are rendered locally.
AI Slop Disclaimer
Large parts of this codebase were written by ai. not by autonomous agents but by claude code and then reviewed, tested and edited by me. I did this largely because i loathe javascript but really wanted this to exist. I wont claim that this is good code, it does what i wanted. For me this is the ability to have collaborative editing AND git support. I would love to see anyone have a go at that in a less sloppy way, I just want this right now :D. For perspective - this project thus far has cost me less than a yearly typst cloud subscription and i really value having my stuff locally.
Features
- Real-time collaborative editing (Yjs + WebSocket)
- Live SVG preview with source-to-preview sync
- Multi-file projects with binary asset uploads
- Git integration: commit, push, pull, diff gutter, git-over-HTTP and git-over-SSH
- PDF and ZIP export
- Vim mode, syntax highlighting, autocomplete, spellcheck (EN/DE)
- Project sharing via invite link or public PDF URL
- Reusable project templates
- SSO via OpenID Connect (optional)
- WASM Typst compiler to compile locally in your browser
Getting Started
Prerequisites: Docker and Docker Compose.
-
Copy the example env file and set the required secrets:
cp .env.example .envMinimum required values in
.env:JWT_SECRET=<random string> INTERNAL_SECRET=<random string> POSTGRES_PASSWORD=<random string> -
Start the stack:
docker compose up -dThe frontend is available at
http://localhost:3000, the backend athttp://localhost:3001. -
Register an account at
http://localhost:3000.
Git Access
Each project has a built-in git repository. You can interact with it from the Git panel in the editor sidebar, or from any external git client.
HTTP clone:
git clone http://<host>/git/<username>/<project>.git
Authenticate with your email as username and your JWT (from browser localStorage token) as password.
SSH clone: Add your SSH public key under Settings, then:
git clone ssh://git@<host>:2222/<username>/<project>.git
Usernames and project names are slugified (lowercased, spaces replaced with -).
Configuration
All configuration is done via environment variables passed to the backend container. Key variables:
| Variable | Description |
|---|---|
DATABASE_URL |
PostgreSQL connection string |
JWT_SECRET |
Secret for signing auth tokens |
CORS_ORIGIN |
Frontend origin (default: http://localhost:3000) |
APP_URL |
Public frontend URL, used in invite emails |
SMTP_HOST/PORT/USER/PASS/FROM |
Optional SMTP for email invites |
SSH_HOST |
Hostname shown in SSH clone URLs |
OIDC_ISSUER/CLIENT_ID/CLIENT_SECRET/REDIRECT_URI |
Optional OIDC SSO; disables local login when set |
Development
Requirements: Bun, PostgreSQL, the typst CLI.
# Backend
cd backend && bun install && bun run dev
# Frontend
cd frontend && bun install && bun run dev
The frontend dev server proxies API requests to http://localhost:3001. Set DATABASE_URL in the backend before starting.

