Files
Docwell/README.md
T
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

3.7 KiB

Docwell

An open-source, self-hostable knowledge base and collaborative document editor. It is wiki-first like Docmost and Outline, and will grow Notion-style databases later.

  • docs/FEATURES.md: feature inventory of the reference apps, with Docwell priorities
  • docs/PLAN.md: architecture, decisions (ADRs) and roadmap

Status: Phase 0 scaffold. All services build and run, but no product features exist yet.

Components

Folder What Stack
Database/ docwell-db: storage, private service PocketBase v0.40.6 + JS migrations
Server/ docwell-server: the only public API, plus the admin panel at /admin/ Go 1.26, Vue 3, Tailwind CSS 4
Web-App/ docwell-web: serves the end-user web app Go 1.26, Vue 3, Tailwind CSS 4, Tiptap
Desktop-App/ Desktop app; reuses the web app UI Wails v3
Phone-App/ Mobile app (Android, iOS) Flutter
Packages/ Shared frontend code: @docwell/editor, @docwell/ui, @docwell/api-client TypeScript
Docker/ The three services as separate containers docker compose
Docker-AIO/ Everything in one container docker compose

Quick start (Docker)

cd Docker
cp .env.example .env    # change the passwords
docker compose up --build

The first account you sign up becomes the instance admin, which unlocks the admin panel. To test sign-up emails (verification, password reset) locally, set DOCWELL_SMTP_HOST=mailpit and DOCWELL_SMTP_PORT=1025 in .env, start with docker compose --profile dev up --build, and read the emails at http://localhost:8025.

Authentication

Accounts live in PocketBase's built-in users auth collection. PocketBase stores the passwords, issues the tokens, and sends the verification and password-reset emails. It stays private: apps call /api/v1/auth/* on docwell-server, which forwards to PocketBase and adds Docwell's rules:

  • sign-up on or off (DOCWELL_SIGNUP_ENABLED) and an email-domain allow-list (DOCWELL_SIGNUP_DOMAINS)
  • the first account becomes the instance admin
  • disabled accounts (status = disabled) can't sign in

Tokens are sent as Authorization: Bearer <token>. Email codes (OTP), MFA and OAuth2 providers are switched on in PocketBase's users collection settings; the web app already handles codes and MFA. See ADR-6 in docs/PLAN.md.

All-in-one container instead (one port, 3000; admin at http://localhost:3000/admin/):

cd Docker-AIO
PB_ADMIN_PASSWORD=change-me docker compose up --build

Development

Requirements: Go 1.26+, Node 22+, Flutter 3.44+, Wails CLI v3, and the PocketBase binary (see Database/README.md).

npm install

Run each piece in its own terminal:

# 1. Database (from Database/)
./bin/pocketbase serve --dir ./pb_data --migrationsDir ./pb_migrations

# 2. API server (from Server/)
DOCWELL_PB_EMAIL=admin@docwell.test DOCWELL_PB_PASSWORD=devpassword123 go run ./cmd/docwell-server

# 3. Web app with hot reload (from the repo root): http://localhost:5173
npm run dev:web

# 4. Admin panel with hot reload: http://localhost:5174/admin/
npm run dev:admin

# Desktop app (from Desktop-App/)
wails3 dev

# Mobile app (from Phone-App/), e.g. on an Android emulator
flutter run

Tests and checks:

go test ./Server/... ./Web-App/... ./Desktop-App/
npm run typecheck && npm test
cd Phone-App && flutter analyze && flutter test

After changing api/openapi.yaml, regenerate the TypeScript types:

npm run generate -w @docwell/api-client

License

GNU Affero General Public License v3.0 or later.