whatisgithub

What is octo-docs-backend?

mininglamp-oss/octo-docs-backend — explained in plain English

Analysis updated 2026-05-18

19TypeScriptAudience · developerComplexity · 4/5Setup · moderate

In one sentence

The real-time backend for a collaborative document editor, syncing live edits between users and handling permissions, storage, and PDF export.

Mindmap

mindmap
  root((octo-docs-backend))
    What it does
      Real time doc sync
      Permission checks
      PDF export
    Tech stack
      TypeScript
      Hocuspocus and Yjs
      MySQL and Redis
      Typst
    Use cases
      Sync live edits
      Manage invites
      Export PDFs
      Revoke access live
    Status
      Runnable scaffold
      Some TODO gaps
      Design contract driven
    Audience
      Backend developers
      Docs product teams

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Run the WebSocket server that keeps multiple editors' documents in sync in real time.

USE CASE 2

Manage document creation, invites, and per-document permissions through the REST API.

USE CASE 3

Export a stored document to a PDF file using the built-in Typst compilation pipeline.

USE CASE 4

Revoke or downgrade a user's access to a document while they are actively editing.

What is it built with?

TypeScriptNode.jsHocuspocusYjsMySQLRedisTypst

How does it compare?

mininglamp-oss/octo-docs-backend7y-9/agentsmd-checkavacocloud/avaco-deno
Stars191919
LanguageTypeScriptTypeScriptTypeScript
Setup difficultymoderateeasymoderate
Complexity4/52/53/5
Audiencedeveloperdeveloperdeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · moderate Time to first run · 1h+

Needs Node.js 20+, MySQL, and Redis running, the typst binary is only required for PDF export.

So what is it?

Octo Docs Backend is the real-time collaboration engine behind a document editing product called Octo Docs. It handles the part of a Google Docs style app that lets many people type into the same document at once and see each other's changes appear instantly, using a technology called Yjs paired with a sync server called Hocuspocus. The service is split into two connected pieces. A WebSocket server keeps every connected editor's copy of a document in sync in real time, checking who is allowed to view or edit before letting changes through. A separate REST API handles document management tasks like creating documents, inviting people to a document, and issuing short-lived tokens that prove a user is allowed to join a live editing session. Documents are stored as a compact binary format in MySQL, and Redis is used to broadcast changes between servers and cache permission information so access checks stay fast. Permissions in this project belong to each document individually rather than being inherited from a folder or team, and access can be revoked in real time even while someone is actively editing. The project also includes a PDF export feature: it converts a document into a typesetting format called Typst and compiles it into a PDF using a separate lightweight program, with limits in place on file size, image count, and how long a single export is allowed to run. This is a backend service written in TypeScript for Node.js, meant to be run alongside a front-end editor rather than used on its own. Getting it running requires Node.js 20 or newer, a MySQL database, and a Redis instance, though its automated tests can run without any of those by using mocked data. The project describes itself as a runnable scaffold, meaning the core paths work but some integration pieces are still marked as unfinished with TODO notes in the code. It follows a written design contract document that spells out exactly how permissions, tokens, and document storage are supposed to behave.

Copy-paste prompts

Prompt 1
Explain how this backend keeps a live document in sync between multiple editors using Hocuspocus and Yjs.
Prompt 2
Walk me through setting up MySQL, Redis, and environment variables to run this server locally.
Prompt 3
Show me how the two-layer collab token system works between the octo session token and the WebSocket handshake.
Prompt 4
Describe how the PDF export pipeline converts a document to Typst and compiles it safely.

Frequently asked questions

What is octo-docs-backend?

The real-time backend for a collaborative document editor, syncing live edits between users and handling permissions, storage, and PDF export.

What language is octo-docs-backend written in?

Mainly TypeScript. The stack also includes TypeScript, Node.js, Hocuspocus.

How hard is octo-docs-backend to set up?

Setup difficulty is rated moderate, with roughly 1h+ to a first successful run.

Who is octo-docs-backend for?

Mainly developer.

Open on GitHub → Ask about another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.