- Overview: users, organizations, workspaces, spaces, pages, files and
storage (org admins see their organization), plus pages open right now,
the search index size, and version, uptime and database health.
- Users: invite people by email (with resend, revoke and a copyable link
when mail fails) and send a password-reset email.
- Authentication: sign-up on or off, the email-domain allow-list, and
sign-in links by email.
- Branding: instance name, accent colour and logo. The web app shows them
on the sign-in pages and applies the accent colour everywhere.
- Email and Storage: SMTP and S3 settings with test buttons.
- Maintenance: create, download and delete database backups, and a view
of the background jobs with their last run, duration and errors.
On the server, a small jobs registry records each search-indexing pass,
and "search.rebuild" replaces the separate reindex endpoint. A new
instance package serves the dashboard numbers, health and backups.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Editor:
- "/" opens a filterable block menu (text, headings, lists, quote, code,
divider, and image or file upload when the host can store files).
- Selecting text shows a formatting toolbar (bold, italic, strike, code,
link) and, for anyone who may comment, a Comment button.
- "@" finds people in the page's workspace; the mention node is always in
the schema so documents with mentions open in every client.
- The popups are plain DOM in the design system's slash-menu style, so
the framework-free mobile bridge keeps building and can use them.
- Menu words come from the host; the web app passes English or Polish.
Inline comments (basic): commenters cannot edit the document, so a
comment's anchor is a pair of Yjs relative positions stored with the
comment rather than a mark in the text. Highlights follow local edits by
mapping and are re-resolved when comments change or remote edits arrive.
Pages get a comments panel (side column, or a bottom sheet on narrow
screens). Authors and space admins can delete comments.
Server: comments collection and endpoints, and a people lookup any
workspace member may use for mentions.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Editors can give a page a public link that anyone can read without an
account, optionally with the pages under it. The link is the stored
token, so editors can copy it again later; turning sharing off deletes
it and the URL stops working. Reads through a link never reach trashed
pages, pages outside the shared subtree, or their attachments, and are
marked noindex.
The page header gets a Share button: the dialog explains who can open
the page through its space, lists the space's people and groups, copies
the page link and manages the public link. Shared pages open at
/share/<token> in a read-only view with a tree of the shared subpages.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
docwell-server converts between page documents and Markdown or HTML (a
new convert package), so every client and the API get the same results.
Pages export as a download from the page menu; spaces import one page
per .md, .txt or .html file, taking a leading level-1 heading as the
title. Import keeps only what the editor schema knows, which drops
scripts, styles, event handlers and javascript: links; tables become
one paragraph per row until the editor has tables.
The UI package gains DwMenu, a small accessible action menu.
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>
Editors upload files to a page (attach button, paste or drop); images go
into the document as images and other files as download cards. Files are
stored in a new attachments collection, so PocketBase's local or S3
storage applies, and docwell-server streams them after checking the
reader's page access.
Documents keep the file's API path. Because <img> tags cannot send the
Authorization header, clients load files with a short-lived signed file
token (?token=) instead of the session token. Uploads are limited by
DOCWELL_MAX_UPLOAD_MB (default 50), their type is sniffed from the
content, and only images, PDFs and media are served inline, so an
uploaded HTML or SVG file never runs on the API's origin.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Pages can be starred from their header; favorites show in the sidebar
above the spaces, and Home lists the pages visited last. Both are per
user and per workspace, and are filtered by the caller's current rights,
so pages that moved out of reach or into the trash drop out. Visits are
trimmed to the newest 50 per workspace.
The icon set gains the glyphs the rest of Phase 1 needs, and DwIcon can
draw a filled variant for on/off states.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Workspace admins create groups of members, and space admins grant a role
to a whole group. A member's space role is now the highest of their own
grant and their groups' grants. Leaving a workspace drops its group
memberships, and deleting a group removes its space grants (they are not
a real relation, so PocketBase cannot cascade them).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Managers invite people into their organization and workspace admins into
their workspace; the email links to a new /invite page that creates the
account (or attaches an existing one without an organization) and adds the
workspace membership. Invites bypass the signup rules, store only a token
hash, expire after seven days, and return the link so it can be passed on
when mail is not configured. Inviting someone already in the organization
adds them to the workspace directly.
Magic links reuse PocketBase's email OTP: the email now carries a link to
/magic-link next to the code, and the admin settings gain a switch for it.
Managers can also send a user a password-reset email.
The dev proxies read DOCWELL_DEV_API so a dev server can target another
docwell-server.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Superadmins can now change signup rules (on/off and the domain allow-list)
and branding at runtime; the environment variables only seed the defaults.
Mail and S3 storage settings pass through to PocketBase's own settings, and
docwell-server sends its own emails through a PocketBase hook so there is a
single SMTP configuration. The boot hook no longer wipes SMTP settings that
were not set from the environment.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Repository basics:
- CONTRIBUTING.md and CODE_OF_CONDUCT.md (Contributor Covenant 2.1)
- SPDX AGPL-3.0-or-later headers on all hand-written sources, checked in CI
- golangci-lint (shared .golangci.yml), ESLint and Prettier, all run in CI
API codegen from api/openapi.yaml (npm run generate, drift fails CI):
- Go types via oapi-codegen in Server/internal/api
- a contract test that the router and the spec list the same routes
- Dart models via Phone-App/tool/generate_api.dart; the app uses them
Spike: shared Tiptap editor in a Flutter WebView (ADR-4)
- @docwell/editor-bridge builds the editor into one HTML page with a
versioned JSON protocol; Phone-App hosts it with webview_flutter and a
native toolbar. Integration test passes on an Android API 35 emulator.
- flutter_inappwebview dropped: its Android plugin fails on AGP 9.
Spike: Wails v3 desktop (ADR-11)
- system tray, docwell:// deep links (page and space only) with
single-instance hand-off, and the built-in updater with a required
ed25519 signing key. Verified on Windows.
- regenerated build assets register the scheme and drop template
placeholders.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- The main view is an inset panel beside the sidebar; views put their
breadcrumbs and actions in its header via <Teleport to="#app-header">.
- The sidebar resizes from its edge (220-480px, double-click resets) and
folds away with a button or Ctrl+/; both are remembered per browser.
- A workspace card at the top opens a menu to switch, configure or add
a workspace, replacing the select.
- Search sits beside a new-page button, followed by Home and Settings;
space headings show open, trash and add-page actions on hover.
- The footer has a theme button cycling system, light and dark.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Start-up keeps the saved session while the server is unreachable and
retries the refresh; only a 4xx from the server signs the user out.
- Rooms of deleted pages are dropped (on purge, or when a write fails and
the page is gone) instead of retrying their save every second.
- Trashing or restoring a page reconnects its editors (close code 4409),
and open connections recheck access every 30 s; the editor reloads the
page and reopens the document with its new rights.
- Restoring a version or replacing content first keeps unversioned
changes as a "before-restore"/"before-replace" version; whether the
saved document has a version is now worked out when a room loads.
- Destroying the collab provider no longer recurses through awareness
listeners, which overflowed the stack on a 4409 close.
- Caret name labels are hidden from assistive tech.
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>
PageView now mounts @docwell/editor and autosaves the document through
GET/PUT /api/v1/pages/{id}/content. The server stores Tiptap JSON in
pages.content_json and derives content_text and word_count itself.
Saves are last-write-wins until the collab relay replaces them.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Spaces and pages:
- Spaces inside workspaces, open or private, with admin/editor/commenter/viewer
roles that cascade from the workspace role (rules in internal/access)
- Page tree per space with fractional position keys, move with cycle checks,
trash that hides whole subtrees, restore and permanent delete
- OpenAPI, TypeScript client, and web app sidebar tree with drag-and-drop,
page, space, trash and space settings views (EN + PL)
Design system:
- Tokens, type scale, radii and shadows from the design kit in
@docwell/ui/theme.css; Inter, Source Serif 4 and JetBrains Mono bundled
- Vue ports of Button, TextField, Badge, Callout, Icon, Breadcrumbs,
SlashMenu and PageTreeItem, plus Logo; favicons and web manifest
- Web app and admin panel restyled on the new tokens, in light and dark
Also: fix the Vite dev server crashing on /config.json, and stop tracking
the local Design/ and docs/ folders.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Same model as DriverVault, with organizations above workspaces:
- users get a role (user, admin, superadmin) and at most one
organization; existing instance admins become superadmins
- rights cascade: superadmins own everything, org admins own their
organization's workspaces, others get their workspace role
(owner > admin > member > guest) while they stay in the org
- nobody grants a role above their own, acts on someone ranked above
them, or changes their own role; rules live in internal/access as
pure, tested functions
- self-service organizations: an org-less user creates one and becomes
its admin; the last admin can delete it and is demoted
- endpoints for users, orgs, workspaces and members; token cache is
dropped when a user's rights change
- admin panel: Users and Organizations pages scoped to the caller
- web app: organization page, workspace list, workspace settings with
member management (EN/PL)
- fix: organization name missing after login/refresh, and stale tokens
redirecting public pages to sign-in
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>