Commit Graph
15 Commits
Author SHA1 Message Date
tajniak81andClaude Opus 5.5 af99dbdcc3 Show the media image override in the split SeaweedFS env example
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-16 18:34:08 +01:00
tajniak81andClaude Opus 5.5 e5b7b980a5 Rename the media network to docwell_media in the other compose stacks
CI / go (Media) (push) Successful in 11m16s
CI / go (Server) (push) Failing after 18m30s
CI / go (Web-App) (push) Successful in 10m21s
CI / frontend (push) Failing after 7m44s
CI / desktop (ubuntu-latest) (push) Successful in 1h3m51s
CI / mobile (push) Failing after 2m5s
CI / docker (push) Successful in 13m19s
CI / desktop (macos-latest) (push) Canceled after 0s
CI / desktop (windows-latest) (push) Canceled after 0s
The dev, prod, prod.s3 and prod.seaweedfs stacks now match the split
SeaweedFS stack: the server and docwell-media services share an internal
network named docwell_media. The media service keeps its name, so the
server still reaches it at http://media:8090.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-16 16:45:08 +01:00
tajniak81andClaude Opus 5.5 1c74f26617 Rename the media network in the split SeaweedFS stack to docwell_media
The server and docwell-media services and the network definition now all
use docwell_media, so the name says which stack the network belongs to.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-16 16:42:44 +01:00
tajniak81andClaude Opus 5.5 9d674e9699 Add invite links with approval, sharing switches, page views and unused-file cleanup
CI / go (Media) (push) Successful in 14m33s
CI / go (Server) (push) Failing after 23m30s
CI / go (Web-App) (push) Canceled after 0s
CI / frontend (push) Failing after 9m30s
CI / desktop (ubuntu-latest) (push) Successful in 1h21m24s
CI / mobile (push) Failing after 4m16s
CI / docker (push) Successful in 1h1m25s
Docs / build (push) Successful in 14m59s
Docs / deploy (push) Skipped
CI / desktop (macos-latest) (push) Canceled after 0s
CI / desktop (windows-latest) (push) Canceled after 0s
Phase G of docs/AFFINE.md (ADR-17):

- Invite links: one per workspace (member or guest, optional end date,
  optional admin approval) on a new /join page. Requests are approved
  (optionally as another role) or declined from workspace settings;
  join_request, join_approved and join_declined notifications reach the
  inbox, phones and the email digest. Workspace admins decide, else the
  organization's admins, else superadmins. Signup honours ?redirect=.
- Workspace switches: allowSharing (off makes every share link answer 404
  until it is back on) and urlPreview (chat apps may show private pages'
  titles). docwell-web writes title and Open Graph tags for known
  link-preview bots, asking docwell-server via DOCWELL_PREVIEW_API_URL;
  search engines are left out.
- Page analytics: page_views counts opens per page, person and day from
  the existing visit call and share-link reads; editors see totals, a
  daily chart and recent viewers in the Info panel. analytics.prune
  drops rows after 400 days.
- Unused files: attachments whose id appears in no page's Yjs state,
  page icon or comment (older than a day) are listed and deleted from
  workspace settings.
- Migration, schema snapshot, OpenAPI, generated clients, translations
  in five languages, phone inbox, compose files and user docs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-16 15:59:55 +01:00
tajniak81andClaude Opus 5.5 6984c7d162 Connect Google Calendar, import OneNote notebooks, sync Readwise, and package the clipper
Phase F follow-ups (ADR-16):

- Calendars: events are now stored in calendar_events by a
  calendars.sync job (every 15 minutes per account, 90 days back and
  400 ahead), so journals open at once and keep showing events while a
  source is down. Google accounts connect with OAuth (calendar.readonly)
  through DOCWELL_GOOGLE_CLIENT_ID/SECRET; reconnecting renews access.
- OneNote: whole notebooks import through Microsoft Graph (Notes.Read,
  DOCWELL_MICROSOFT_CLIENT_ID/SECRET/TENANT) in the background, with
  section groups, sections, subpages, pictures and attached files. The
  Microsoft sign-in lives in memory for an hour and is never stored.
- Readwise: an hourly sync with the person's sealed access token; new
  books get a page under "Readwise", new highlights are appended once.
  New readwise_syncs collection.
- internal/oauth: signed states and one callback route per provider,
  routed by purpose. directory gains ImportConverted and CallerOf.
- Phone app: "Today's journal" on the home screen and calendar events
  on journal pages.
- Web clipper: `npm run package` builds Chrome/Edge, Firefox and source
  zips; store/ holds listing texts, permission notes and a privacy
  policy.
- OpenAPI, generated clients, translations, compose and .env examples,
  and user docs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-16 14:59:34 +01:00
tajniak81andClaude Opus 5.5 8c39b0aacb Run ffmpeg in its own docwell-media service
CI / go (Media) (push) Successful in 11m59s
CI / go (Server) (push) Failing after 18m26s
CI / go (Web-App) (push) Canceled after 0s
CI / frontend (push) Failing after 8m35s
CI / desktop (ubuntu-latest) (push) Successful in 1h10m6s
CI / mobile (push) Failing after 3m43s
CI / docker (push) Successful in 1h2m44s
Docs / build (push) Successful in 11m58s
Docs / deploy (push) Skipped
CI / desktop (macos-latest) (push) Canceled after 0s
CI / desktop (windows-latest) (push) Canceled after 0s
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>
2026-11-16 10:52:34 +01:00
tajniak81andClaude Opus 5.5 3c7403ddf9 Create the first superadmin from DOCWELL_ADMIN_EMAIL on start
When DOCWELL_ADMIN_EMAIL and DOCWELL_ADMIN_PASSWORD are set (and
optionally DOCWELL_ADMIN_NAME), docwell-server creates that account as
superadmin on start while the instance has no accounts. Once any account
exists it changes nothing, so restarts never reset the password or a role
changed in the admin panel. Without them, the first sign-up still wins.

Pass the variables through every compose file, document them in the
.env examples and the configuration, access and quick-start guides.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-13 22:32:29 +01:00
tajniak81andClaude Opus 5.5 b9be8be156 Run docwell-db as a stock PocketBase and let the server set it up
CI / go (Server) (push) Failing after 22m50s
CI / go (Web-App) (push) Canceled after 0s
CI / frontend (push) Failing after 8m47s
CI / desktop (ubuntu-latest) (push) Successful in 2h56m50s
CI / mobile (push) Failing after 5m33s
CI / docker (push) Successful in 1h43m8s
Docs / build (push) Successful in 16m2s
Docs / deploy (push) Skipped
CI / desktop (macos-latest) (push) Canceled after 0s
CI / desktop (windows-latest) (push) Canceled after 0s
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>
2026-11-13 20:09:38 +01:00
tajniak81andClaude Opus 5.5 ef2c81d062 Move PocketBase to port 8070
CI / go (Server) (push) Successful in 23m34s
CI / go (Web-App) (push) Successful in 12m21s
CI / frontend (push) Failing after 10m55s
Docs / build (push) Canceled after 0s
Docs / deploy (push) Canceled after 0s
CI / desktop (ubuntu-latest) (push) Successful in 1h57m19s
CI / mobile (push) Failing after 5m8s
CI / docker (push) Failing after 41m19s
CI / desktop (macos-latest) (push) Canceled after 0s
CI / desktop (windows-latest) (push) Canceled after 0s
docwell-db's base image (tajniak81/pocketbase-docker-root) listens on
8070 by default. Use that port everywhere instead of overriding it to
8090: the Database image, every Docker compose file and .env example,
the AIO start script, docwell-server's DOCWELL_PB_URL default, and the
docs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-13 18:23:55 +01:00
tajniak81andClaude Opus 5.5 ad26727521 Add production compose variants and base docwell-db on the PocketBase image
CI / go (Server) (push) Successful in 16m33s
CI / go (Web-App) (push) Successful in 12m1s
CI / frontend (push) Failing after 6m32s
CI / desktop (ubuntu-latest) (push) Failing after 21m52s
CI / desktop (macos-latest) (push) Canceled after 0s
CI / desktop (windows-latest) (push) Canceled after 0s
CI / mobile (push) Failing after 5m2s
CI / docker (push) Successful in 18m56s
Docs / build (push) Successful in 10m45s
Docs / deploy (push) Skipped
Docker/ and Docker-AIO/ each get docker-compose.prod.yml plus S3,
SeaweedFS and SeaweedFS-split variants, with matching .env.prod*.example
templates and a README.

docwell-db is now built FROM tajniak81/pocketbase-docker-root, which
creates the superuser and serves PocketBase on 8090; data moves to
/pb/pb_data. The boot hook applies DOCWELL_S3_* settings when set.
The AIO start script accepts PB_ENCRYPTION_KEY. The base image is
amd64-only, so the docwell-db release builds amd64 only for now.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-12 11:39:01 +01:00
tajniak81andClaude Opus 5.5 63bf9ae273 Add templates, backlinks, table of contents, math and diagrams
Editor blocks:
- Math with KaTeX, inline ($...$) and as blocks ($$...$$). Clicking a
  formula opens its LaTeX source.
- Mermaid diagrams. The text is stored and each client draws it, with a
  live preview while editing. Mermaid uses strict security.
- Draw.io and Excalidraw drawings, stored as SVG attachments that carry
  the editable scene. Draw.io opens diagrams.net in a frame (address set
  by DOCWELL_DRAWIO_URL). Excalidraw loads React only when opened.
- A table of contents block that follows the page's headings.
- "[[" page links, and following a page link inside the app (Ctrl/Cmd
  click while editing).

Mermaid and Excalidraw are handed in by the host, so the single-file
mobile bridge leaves them out. There diagrams show as their text and
drawings as pictures.

Pages now record which pages they link to, kept current on every save
and backfilled at startup. A page lists the pages linking to it that
the reader can open. Any editor can mark a page as a template, and an
empty page offers the workspace's templates. Applying one copies its
content as a history version, and an untitled page also takes the
template's title.

Markdown and HTML export keep Mermaid, math, drawings and mentions, and
Markdown import turns mermaid fences back into diagrams. Attachments
named .svg are typed image/svg+xml and served inline under the existing
sandbox CSP, so drawings display.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 22:55:03 +01:00
tajniak81andClaude Opus 5.5 dbe49b892f Add multi-arch release images and a documentation site
CI / go (Server) (push) Canceled after 0s
CI / go (Web-App) (push) Canceled after 0s
CI / frontend (push) Canceled after 0s
CI / desktop (macos-latest) (push) Canceled after 0s
CI / desktop (ubuntu-latest) (push) Canceled after 0s
CI / desktop (windows-latest) (push) Canceled after 0s
CI / mobile (push) Canceled after 0s
CI / docker (push) Canceled after 0s
Docs / build (push) Canceled after 0s
Docs / deploy (push) Canceled after 0s
Release / images (., Docker-AIO/Dockerfile, docwell) (push) Canceled after 0s
Release / images (., Server/Dockerfile, docwell-server) (push) Canceled after 0s
Release / images (., Web-App/Dockerfile, docwell-web) (push) Canceled after 0s
Release / images (Database, Database/Dockerfile, docwell-db) (push) Canceled after 0s
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>
2026-10-31 17:45:16 +01:00
tajniak81andClaude Opus 5.5 25e7ca19a5 Add full-text search with Bleve and the Ctrl+K palette
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>
2026-10-31 16:57:55 +01:00
tajniak81andClaude Opus 5.5 e33a99241e Add instance settings and mail delivery through PocketBase
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>
2026-10-31 16:22:53 +01:00
tajniak81andClaude Opus 5.5 4903bb12dd Scaffold Docwell monorepo with PocketBase authentication
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>
2026-10-30 22:18:25 +01:00