ffmpeg parses untrusted uploads, so it moves out of the server image
into a container of its own (ADR-15):
- Media/: docwell-media, a small Go wrapper around ffmpeg.
POST /v1/split takes a recording and returns the 16 kHz mono MP3
pieces as multipart/mixed. ffmpeg may only open local files and
common audio/video demuxers (no playlists); optional shared token,
a job limit, a timeout and a 1 GB cap.
- Server: DOCWELL_MEDIA_URL and DOCWELL_MEDIA_TOKEN send recordings
over 25 MB to the service. When it is blank or unreachable, the
server uses a local ffmpeg if it has one, else cuts MP3 and WAV in
Go. The server image no longer installs ffmpeg; the all-in-one
image keeps it to stay one container.
- Compose: a media service in every stack, read-only, no
capabilities, on an internal network only docwell-server joins.
- CI tests the new module and checks that only the server reaches
media; the release workflow publishes docwell-media.
- Docs, ADR-15 and the .env examples.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Follow-ups to Phase E (ADR-15):
- Recordings over 25 MB are cut into pieces and transcribed in turn:
with ffmpeg (now in the server and all-in-one images) any format is
re-encoded to 16 kHz mono MP3 in 20-minute pieces; without it, MP3 is
cut at frame boundaries and WAV at sample boundaries in Go.
- PDFs without a text layer are written out by a document-capable chat
model (Anthropic document input, OpenAI file input); Ollama is skipped.
- Phone app: AI answers render as Markdown with tappable citations; the
editing toolbar opens the writing actions on the selection; audio
files get Transcribe. Editor bridge protocol 4 adds setAi,
getSelection, insertMarkdown and transcribe/transcribed.
- The transcript HTML builder moves to @docwell/editor, shared by the
web app and the phone editor.
- An integration test runs chat, Transcribe and writing actions on a
device against a live server; the editor test no longer expects
headings to have only a level.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
docwell-db no longer needs a Docwell image: the stack runs
tajniak81/pocketbase-docker-root as it is, and docwell-server does what
the migrations and pb_hooks used to do inside PocketBase.
On start, docwell-server now:
- waits for PocketBase and imports Docwell's collections from an
embedded snapshot (internal/pbschema). Existing collections and
fields are matched by name, so their data is kept; the admin-managed
users options (OAuth2 providers, magic link) are left untouched.
- writes the DOCWELL_APP_NAME, DOCWELL_WEB_URL, DOCWELL_MAIL_FROM,
DOCWELL_SMTP_* and DOCWELL_S3_* settings into PocketBase, as the
boot hook did.
It also replaces the hook's two routes: token checks use PocketBase's
auth-refresh (the organization name is read as the superuser), and
Docwell's own emails go out over SMTP from the server. PocketBase never
returns the SMTP password, so the server keeps a copy in the
superuser-only instance_settings collection; a password saved before
this change has to be entered once more in the admin panel.
Database/ keeps pb_migrations as the source of the schema;
export-schema.sh regenerates the snapshot from them. Database/Dockerfile
and pb_hooks are removed, the release no longer builds docwell-db, the
AIO image runs PocketBase without migrations or hooks, and the compose
files default DB_IMAGE to the stock image and pass the settings to the
server instead of the database.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Release: pushing a v* tag builds docwell-db, docwell-server, docwell-web
and the all-in-one image for linux/amd64 and linux/arm64 and pushes
them to GHCR, tagged with the version and latest. The build stages run
on the build machine's platform and Go cross-compiles, so arm64 needs no
emulation except for the final apk step (checked by building the server
image for arm64). The compose files name the released images, so
`docker compose up -d` runs a release and `--build` still builds the
checkout; DOCWELL_REGISTRY and DOCWELL_VERSION pick them.
Docs: Docs-Site is a VitePress site with a quick start, every
configuration variable, reverse-proxy setups, backups and upgrades, a
user guide, people and access, the admin panel and the API. CI builds
it, and the Docs workflow publishes it to GitHub Pages. It lives outside
docs/, which stays local planning material.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
docwell-server keeps a Bleve index of page titles and text in
DOCWELL_DATA_DIR. Instead of hooking every write, an indexer polls
PocketBase for pages whose "updated" moved (titles, saved content, trash
and restore all touch it) and sweeps out purged pages every ten minutes.
The index can be thrown away at any time: it rebuilds from the database,
and superadmins can trigger a rebuild.
Searches are limited to the spaces the caller can open, match the last
word as a prefix and forgive one wrong letter. Snippets come back as
plain text with match offsets, so clients never render server HTML.
In the web app, Ctrl+K or the sidebar's search box opens a palette that
shows recent pages until something is typed.
The server containers get a /data volume for the index.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Pages are now shared Yjs documents. docwell-server relays the y-websocket
protocol at /collab (token sent as the first message), flushes updates to
page_yupdates every second, and compacts them into page_ydoc with yrs
compiled to WebAssembly under wazero (ADR-3) after 30 s idle or when the
last editor leaves. Compaction refreshes content_json/content_text and
records page_versions; versions can be listed, previewed and restored.
The editor connects through a small y-protocols provider with carets and
presence. Pages saved before this change are seeded from content_json.
The yrs module lives in Server/ycrdt-wasm and is built by go generate,
CI and the Dockerfiles rather than committed.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Phase 0 foundation for Docwell, an open-source knowledge base:
- Database: PocketBase v0.40.6 with initial schema migrations; users is
the built-in auth collection, plus a hook for token checks and
env-driven app URL/SMTP settings
- Server: Go API (health, version, auth endpoints forwarded to
PocketBase, admin user list) with an embedded Vue admin panel
- Web-App: Go static server and Vue/Tailwind app with Tiptap editor,
sign-in, sign-up, password reset and email verification (EN/PL)
- Desktop-App: Wails v3 host reusing the web app
- Phone-App: Flutter app with sign-in
- Shared packages (editor, ui, api-client), OpenAPI spec, Docker
compose (separate services and all-in-one), GitHub Actions CI
- Docs: feature inventory and architecture/build plan
Licensed under AGPL-3.0-or-later.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>