From ba394b8fac152aea36c64a3a942adeaf8decc662 Mon Sep 17 00:00:00 2001 From: tajniak81 <13187254+tajniak81@users.noreply.github.com> Date: Sat, 31 Oct 2026 16:11:07 +0100 Subject: [PATCH] Finish Phase 0: lint, codegen, contributor docs and the two remaining spikes 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 --- .github/scripts/spdx.mjs | 46 + .github/workflows/ci.yml | 32 + .gitignore | 5 + .golangci.yml | 34 + .prettierignore | 17 + .prettierrc.json | 3 + CODE_OF_CONDUCT.md | 44 + CONTRIBUTING.md | 61 + Database/entrypoint.sh | 1 + Database/pb_hooks/docwell.pb.js | 2 + .../1761850000_initial_schema.js | 2 + .../pb_migrations/1761900000_organizations.js | 2 + Database/pb_migrations/1762000000_collab.js | 2 + Desktop-App/build/config.yml | 5 + Desktop-App/build/darwin/Info.dev.plist | 74 +- Desktop-App/build/darwin/Info.plist | 64 +- Desktop-App/build/ios/Info.dev.plist | 109 +- Desktop-App/build/ios/Info.plist | 105 +- Desktop-App/build/ios/LaunchScreen.storyboard | 4 +- Desktop-App/build/ios/entitlements.plist | 13 +- Desktop-App/build/ios/project.pbxproj | 38 +- Desktop-App/build/linux/desktop | 12 +- Desktop-App/build/linux/nfpm/nfpm.yaml | 21 +- Desktop-App/build/windows/info.json | 16 +- .../build/windows/nsis/wails_tools.nsh | 12 +- Desktop-App/build/windows/wails.exe.manifest | 2 +- Desktop-App/deeplink.go | 103 ++ Desktop-App/deeplink_test.go | 69 + .../bindings/docwell/desktop/index.ts | 2 + .../bindings/docwell/desktop/linkservice.ts | 21 + Desktop-App/frontend/bindings/events/index.ts | 6 + Desktop-App/frontend/src/main.ts | 15 +- Desktop-App/frontend/vite.config.ts | 2 + Desktop-App/go.mod | 1 + Desktop-App/go.sum | 2 + Desktop-App/main.go | 37 +- Desktop-App/settings.go | 2 + Desktop-App/settings_test.go | 2 + Desktop-App/tray.go | 46 + Desktop-App/updates.go | 53 + Desktop-App/updates_test.go | 91 ++ Docker-AIO/start.sh | 1 + Packages/api-client/src/index.test.ts | 19 +- Packages/api-client/src/index.ts | 16 +- Packages/editor-bridge/dist/index.html | 153 ++ Packages/editor-bridge/index.html | 13 + Packages/editor-bridge/package.json | 29 + .../editor-bridge/scripts/copy-to-apps.mjs | 11 + Packages/editor-bridge/src/bridge.test.ts | 56 + Packages/editor-bridge/src/bridge.ts | 153 ++ Packages/editor-bridge/src/main.ts | 17 + Packages/editor-bridge/src/protocol.ts | 58 + Packages/editor-bridge/src/style.css | 18 + Packages/editor-bridge/src/transport.ts | 24 + Packages/editor-bridge/tsconfig.json | 7 + Packages/editor-bridge/vite.config.ts | 18 + Packages/editor/package.json | 2 + Packages/editor/src/DocwellEditor.vue | 1 + Packages/editor/src/editor.css | 76 +- Packages/editor/src/extensions.ts | 2 + Packages/editor/src/index.ts | 2 + Packages/editor/src/provider.ts | 2 + Packages/ui/src/DwBadge.vue | 1 + Packages/ui/src/DwBreadcrumbs.vue | 7 +- Packages/ui/src/DwButton.vue | 4 +- Packages/ui/src/DwCallout.vue | 8 +- Packages/ui/src/DwIcon.vue | 1 + Packages/ui/src/DwLogo.vue | 1 + Packages/ui/src/DwSlashMenu.vue | 7 +- Packages/ui/src/DwTextField.vue | 1 + Packages/ui/src/DwTreeItem.vue | 5 +- Packages/ui/src/icons.ts | 14 +- Packages/ui/src/index.ts | 2 + Packages/ui/src/theme.css | 14 +- Packages/ui/src/theme.ts | 2 + Phone-App/android/gradle.properties | 4 + Phone-App/assets/editor/.gitkeep | 0 Phone-App/integration_test/editor_test.dart | 90 ++ Phone-App/lib/api/docwell_api.dart | 42 +- Phone-App/lib/api/generated/models.dart | 965 ++++++++++++ Phone-App/lib/editor/bridge.dart | 170 +++ Phone-App/lib/editor/editor_screen.dart | 161 ++ Phone-App/lib/main.dart | 42 +- Phone-App/pubspec.lock | 105 +- Phone-App/pubspec.yaml | 9 +- Phone-App/test/editor_bridge_test.dart | 79 + Phone-App/test/widget_test.dart | 8 + Phone-App/tool/generate_api.dart | 299 ++++ README.md | 19 +- Server/admin/src/App.vue | 1 + Server/admin/src/main.ts | 30 +- Server/admin/src/session.ts | 2 + Server/admin/src/style.css | 2 + Server/admin/src/views/LoginView.vue | 7 +- Server/admin/src/views/OrganizationsView.vue | 12 +- Server/admin/src/views/OverviewView.vue | 6 +- Server/admin/src/views/PlaceholderView.vue | 1 + Server/admin/src/views/UsersView.vue | 47 +- Server/admin/vite.config.ts | 2 + Server/go.mod | 30 +- Server/go.sum | 177 ++- Server/internal/access/access.go | 2 + Server/internal/access/access_test.go | 2 + Server/internal/access/spaces.go | 2 + Server/internal/access/spaces_test.go | 2 + Server/internal/admin/embed.go | 2 + Server/internal/api/api.gen.go | 614 ++++++++ Server/internal/api/api.go | 7 + Server/internal/api/oapi-codegen.yaml | 5 + Server/internal/apperr/apperr.go | 2 + Server/internal/auth/auth.go | 2 + Server/internal/auth/auth_test.go | 2 + Server/internal/collab/hub.go | 4 +- Server/internal/collab/hub_test.go | 2 + Server/internal/collab/protocol.go | 2 + Server/internal/collab/store.go | 2 + Server/internal/config/config.go | 2 + Server/internal/config/config_test.go | 2 + Server/internal/directory/content.go | 2 + Server/internal/directory/directory.go | 2 + Server/internal/directory/pages.go | 2 + Server/internal/directory/position.go | 2 + Server/internal/directory/position_test.go | 2 + Server/internal/directory/spaces.go | 2 + Server/internal/httpapi/auth.go | 4 +- Server/internal/httpapi/auth_test.go | 2 + Server/internal/httpapi/collab.go | 4 +- Server/internal/httpapi/contract_test.go | 66 + Server/internal/httpapi/directory.go | 4 +- Server/internal/httpapi/router.go | 26 +- Server/internal/httpapi/router_test.go | 2 + Server/internal/httpapi/spaces.go | 4 +- Server/internal/httpapi/spaces_test.go | 2 + Server/internal/store/pocketbase/client.go | 2 + .../internal/store/pocketbase/client_test.go | 4 +- Server/internal/ycrdt/pool.go | 2 + Server/internal/ycrdt/ycrdt.go | 4 +- Server/internal/ycrdt/ycrdt_test.go | 2 + Server/ycrdt-wasm/build.sh | 1 + Spikes/yrs-wasm/build.sh | 1 + Spikes/yrs-wasm/go/timing_test.go | 2 + Spikes/yrs-wasm/go/yrs.go | 2 + Spikes/yrs-wasm/go/yrs_test.go | 2 + Web-App/frontend/public/site.webmanifest | 2 +- Web-App/frontend/src/App.vue | 1 + Web-App/frontend/src/api.ts | 2 + Web-App/frontend/src/app.ts | 3 + Web-App/frontend/src/components/AppLayout.vue | 36 +- Web-App/frontend/src/components/AuthCard.vue | 1 + Web-App/frontend/src/components/FormField.vue | 10 +- .../frontend/src/components/PageHistory.vue | 21 +- Web-App/frontend/src/components/PageList.vue | 1 + Web-App/frontend/src/components/PageShell.vue | 1 + .../frontend/src/components/PageTreeNode.vue | 24 +- .../src/components/ServerStatus.test.ts | 2 + .../frontend/src/components/ServerStatus.vue | 1 + .../src/components/WorkspaceSwitcher.vue | 13 +- .../frontend/src/composables/useFormErrors.ts | 2 + .../frontend/src/composables/useSidebar.ts | 2 + Web-App/frontend/src/i18n.ts | 2 + Web-App/frontend/src/lib/tree.test.ts | 2 + Web-App/frontend/src/lib/tree.ts | 2 + Web-App/frontend/src/main.ts | 2 + Web-App/frontend/src/platform.ts | 4 + Web-App/frontend/src/router.ts | 8 +- Web-App/frontend/src/stores/auth.test.ts | 2 + Web-App/frontend/src/stores/auth.ts | 2 + Web-App/frontend/src/stores/spaces.ts | 2 + .../frontend/src/stores/workspaces.test.ts | 2 + Web-App/frontend/src/stores/workspaces.ts | 2 + Web-App/frontend/src/style.css | 2 + Web-App/frontend/src/views/HomeView.vue | 1 + Web-App/frontend/src/views/NotFoundView.vue | 1 + .../src/views/auth/ForgotPasswordView.vue | 14 +- Web-App/frontend/src/views/auth/LoginView.vue | 37 +- .../src/views/auth/ResetPasswordView.vue | 5 +- .../frontend/src/views/auth/SignupView.vue | 22 +- .../src/views/auth/VerifyEmailView.vue | 1 + Web-App/frontend/src/views/page/PageView.vue | 30 +- .../src/views/settings/OrganizationView.vue | 18 +- .../frontend/src/views/space/NewSpaceView.vue | 8 +- .../src/views/space/SpaceSettingsView.vue | 20 +- .../frontend/src/views/space/SpaceView.vue | 6 +- .../frontend/src/views/space/TrashView.vue | 14 +- .../src/views/workspace/NewWorkspaceView.vue | 1 + .../views/workspace/WorkspaceSettingsView.vue | 20 +- Web-App/frontend/vite.config.ts | 2 + Web-App/internal/spa/spa.go | 2 + Web-App/internal/spa/spa_test.go | 2 + eslint.config.js | 40 + go.work.sum | 16 + package-lock.json | 1354 +++++++++++++++++ package.json | 19 +- 193 files changed, 6425 insertions(+), 399 deletions(-) create mode 100644 .github/scripts/spdx.mjs create mode 100644 .golangci.yml create mode 100644 .prettierignore create mode 100644 .prettierrc.json create mode 100644 CODE_OF_CONDUCT.md create mode 100644 CONTRIBUTING.md create mode 100644 Desktop-App/deeplink.go create mode 100644 Desktop-App/deeplink_test.go create mode 100644 Desktop-App/frontend/bindings/docwell/desktop/linkservice.ts create mode 100644 Desktop-App/frontend/bindings/events/index.ts create mode 100644 Desktop-App/tray.go create mode 100644 Desktop-App/updates.go create mode 100644 Desktop-App/updates_test.go create mode 100644 Packages/editor-bridge/dist/index.html create mode 100644 Packages/editor-bridge/index.html create mode 100644 Packages/editor-bridge/package.json create mode 100644 Packages/editor-bridge/scripts/copy-to-apps.mjs create mode 100644 Packages/editor-bridge/src/bridge.test.ts create mode 100644 Packages/editor-bridge/src/bridge.ts create mode 100644 Packages/editor-bridge/src/main.ts create mode 100644 Packages/editor-bridge/src/protocol.ts create mode 100644 Packages/editor-bridge/src/style.css create mode 100644 Packages/editor-bridge/src/transport.ts create mode 100644 Packages/editor-bridge/tsconfig.json create mode 100644 Packages/editor-bridge/vite.config.ts create mode 100644 Phone-App/assets/editor/.gitkeep create mode 100644 Phone-App/integration_test/editor_test.dart create mode 100644 Phone-App/lib/api/generated/models.dart create mode 100644 Phone-App/lib/editor/bridge.dart create mode 100644 Phone-App/lib/editor/editor_screen.dart create mode 100644 Phone-App/test/editor_bridge_test.dart create mode 100644 Phone-App/tool/generate_api.dart create mode 100644 Server/internal/api/api.gen.go create mode 100644 Server/internal/api/api.go create mode 100644 Server/internal/api/oapi-codegen.yaml create mode 100644 Server/internal/httpapi/contract_test.go create mode 100644 eslint.config.js create mode 100644 go.work.sum diff --git a/.github/scripts/spdx.mjs b/.github/scripts/spdx.mjs new file mode 100644 index 0000000..d74b699 --- /dev/null +++ b/.github/scripts/spdx.mjs @@ -0,0 +1,46 @@ +// SPDX-License-Identifier: AGPL-3.0-or-later +// +// Checks that hand-written source files carry an SPDX license header, or adds it. +// Usage: node .github/scripts/spdx.mjs . [--check] +import { execFileSync } from "node:child_process"; +import { readFileSync, writeFileSync } from "node:fs"; +import { join } from "node:path"; + +const repo = process.argv[2]; +const check = process.argv.includes("--check"); +const ID = "SPDX-License-Identifier: AGPL-3.0-or-later"; + +const files = execFileSync("git", ["ls-files", "--cached", "--others", "--exclude-standard"], { + cwd: repo, + encoding: "utf8", +}) + .split("\n") + .filter((f) => /\.(go|ts|vue|dart|js|mjs|rs|sh|css)$/.test(f)) + .filter((f) => !f.endsWith(".d.ts")) + .filter((f) => !f.startsWith("Desktop-App/build/") && !f.startsWith("Desktop-App/frontend/bindings/")) + .filter((f) => !f.includes("node_modules/") && !f.startsWith("Phone-App/build/")); + +const missing = []; +for (const f of files) { + const path = join(repo, f); + let src = readFileSync(path, "utf8"); + if (src.includes("SPDX-License-Identifier")) continue; + if (/^\/\/ Code generated .* DO NOT EDIT\.$/m.test(src)) continue; + missing.push(f); + if (check) continue; + const ext = f.split(".").pop(); + if (ext === "vue") src = `\n${src}`; + else if (ext === "css") src = `/* ${ID} */\n\n${src}`; + else if (ext === "sh") { + if (src.startsWith("#!")) { + const nl = src.indexOf("\n"); + src = `${src.slice(0, nl + 1)}# ${ID}\n${src.slice(nl + 1)}`; + } else src = `# ${ID}\n\n${src}`; + } else src = `// ${ID}\n\n${src}`; + writeFileSync(path, src); +} +console.log(`${check ? "missing" : "added"}: ${missing.length}`); +if (check && missing.length) { + console.log(missing.join("\n")); + process.exit(1); +} diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 284783e..2fd0a60 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -22,6 +22,14 @@ jobs: run: | rustup target add wasm32-wasip1 go generate ./internal/ycrdt + - name: Go types are up to date + if: matrix.module == 'Server' + working-directory: Server + env: + GOWORK: "off" + run: | + go generate ./internal/api + git diff --exit-code internal/api - name: Vet and test working-directory: ${{ matrix.module }} env: @@ -30,6 +38,13 @@ jobs: test -z "$(gofmt -l .)" || (gofmt -l . && exit 1) go vet ./... go test -race ./... + - name: Lint + uses: golangci/golangci-lint-action@v8 + env: + GOWORK: "off" + with: + version: v2.14 + working-directory: ${{ matrix.module }} frontend: runs-on: ubuntu-latest @@ -40,6 +55,10 @@ jobs: node-version: 24 cache: npm - run: npm ci + - name: License headers + run: node .github/scripts/spdx.mjs . --check + - run: npm run lint + - run: npm run format:check - name: API types are up to date run: | npm run generate -w @docwell/api-client @@ -74,6 +93,14 @@ jobs: run: | go test ./... go build -o bin/ . + - name: Lint + if: runner.os == 'Linux' + uses: golangci/golangci-lint-action@v8 + env: + GOWORK: "off" + with: + version: v2.14 + working-directory: Desktop-App mobile: runs-on: ubuntu-latest @@ -86,6 +113,11 @@ jobs: with: channel: stable - run: flutter pub get + - name: Dart models are up to date + run: | + dart run tool/generate_api.dart + git diff --exit-code lib/api/generated + - run: dart format --set-exit-if-changed lib test tool - run: flutter analyze - run: flutter test diff --git a/.gitignore b/.gitignore index 68dd08a..fc806e0 100644 --- a/.gitignore +++ b/.gitignore @@ -34,3 +34,8 @@ coverage.out # Local design kit and planning docs (not part of the build) /Design/ /docs/ + +# Editor page built by Packages/editor-bridge and copied into the apps +/Phone-App/assets/editor/* +!/Phone-App/assets/editor/.gitkeep +/Phone-App/android/build/ diff --git a/.golangci.yml b/.golangci.yml new file mode 100644 index 0000000..25733c9 --- /dev/null +++ b/.golangci.yml @@ -0,0 +1,34 @@ +# golangci-lint v2, shared by every Go module (run from the module folder). +version: "2" + +linters: + default: standard + enable: + - bodyclose + - errorlint + - gosec + - misspell + - unconvert + settings: + errcheck: + exclude-functions: + # Writing a response body fails only when the client went away. + - (net/http.ResponseWriter).Write + - (*encoding/json.Encoder).Encode + - (*github.com/coder/websocket.Conn).CloseNow + gosec: + excludes: + - G104 # unchecked errors: errcheck covers these, with the exclusions above + exclusions: + presets: + - std-error-handling + paths: + # Wails project template, regenerated by the Wails CLI. + - build/ + rules: + - path: _test\.go + linters: [errcheck, gosec] + # yrs.wasm is wasm32: its pointers and lengths are 32-bit by definition. + - path: internal/ycrdt/ + text: G115 + linters: [gosec] diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 0000000..3023a28 --- /dev/null +++ b/.prettierignore @@ -0,0 +1,17 @@ +node_modules/ +dist/ +Phone-App/ +Spikes/ +Desktop-App/build/ +Desktop-App/frontend/bindings/ +Packages/api-client/src/schema.d.ts +*.md +*.yaml +*.yml +package-lock.json +target/ +pb_data/ +Database/ +Docker*/ +api/ +.claude/ diff --git a/.prettierrc.json b/.prettierrc.json new file mode 100644 index 0000000..963354f --- /dev/null +++ b/.prettierrc.json @@ -0,0 +1,3 @@ +{ + "printWidth": 120 +} diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md new file mode 100644 index 0000000..9b5f963 --- /dev/null +++ b/CODE_OF_CONDUCT.md @@ -0,0 +1,44 @@ +# Code of Conduct + +Docwell follows the [Contributor Covenant, version 2.1](https://www.contributor-covenant.org/version/2/1/code_of_conduct/). This page summarizes it; the linked text is the one that applies. + +## Our pledge + +We want taking part in Docwell to be a harassment-free experience for everyone, whatever their age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, caste, colour, religion, or sexual identity and orientation. + +## Expected behaviour + +- Be kind and patient with other people. +- Respect differing opinions, viewpoints and experiences. +- Give constructive feedback, and accept it gracefully. +- Take responsibility for your mistakes, apologise to the people they affected, and learn from them. +- Focus on what is best for the community as a whole. + +## Unacceptable behaviour + +- Sexualized language or imagery, and sexual attention or advances of any kind. +- Trolling, insulting or derogatory comments, and personal or political attacks. +- Public or private harassment. +- Publishing someone else's private information, such as a physical or email address, without their explicit permission. +- Any other conduct that could reasonably be considered inappropriate in a professional setting. + +## Scope + +This applies in every project space (issues, pull requests, discussions, chat) and when someone officially represents the project in public. + +## Reporting + +Report unacceptable behaviour to the maintainers privately through GitHub (a direct message to a maintainer, or a private security advisory for anything sensitive). Every report is reviewed promptly and fairly, and maintainers keep the reporter's identity private. + +## Enforcement + +Maintainers decide what action to take, following the Covenant's enforcement guidelines: + +1. **Correction**: a private, written warning explaining what was inappropriate. +2. **Warning**: a warning with consequences for continued behaviour, including no interaction with the people involved for a set time. +3. **Temporary ban**: no interaction with the community for a set time. +4. **Permanent ban**: no interaction with the community at all. + +## Attribution + +Adapted from the [Contributor Covenant](https://www.contributor-covenant.org), version 2.1, licensed under [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/). diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..889bb49 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,61 @@ +# Contributing to Docwell + +Thanks for helping. This page covers how to set up the repository, the checks a change has to pass, and how to send it. + +By taking part you agree to follow the [Code of Conduct](CODE_OF_CONDUCT.md). + +## Before you start + +- For anything bigger than a small fix, open an issue first so we can agree on the approach. +- Feature priorities (MVP, v1, v2) are fixed per phase. Work outside the current phase is unlikely to be merged yet. +- Report security problems privately to the maintainers, not in a public issue. + +## Setup + +Follow **Development** in the [README](README.md): Go 1.26+, Node 22+, Rust with the `wasm32-wasip1` target, Flutter 3.44+, the Wails v3 CLI and the PocketBase binary. + +```bash +npm install +``` + +## Checks + +CI runs all of these. Run the ones for the parts you touched before you push. + +| Area | Commands | +|---|---| +| Go (`Server/`, `Web-App/`, `Desktop-App/`) | `gofmt -l .`, `go vet ./...`, `golangci-lint run`, `go test ./...` (from each module) | +| Frontend (`Packages/`, `Server/admin/`, `Web-App/frontend/`, `Desktop-App/frontend/`) | `npm run lint`, `npm run format:check`, `npm run typecheck`, `npm test` (from the repo root) | +| Mobile (`Phone-App/`) | `dart format --set-exit-if-changed lib test`, `flutter analyze`, `flutter test` | +| API contract | `npm run generate` (from the repo root) after editing `api/openapi.yaml`, and commit the regenerated files | +| License headers | `node .github/scripts/spdx.mjs . --check` | + +`npm run format` and `npm run lint:fix` fix most frontend problems for you. + +## API changes + +`api/openapi.yaml` is the source of truth for every client. Change it first, then regenerate: + +- TypeScript types: `Packages/api-client/src/schema.d.ts` +- Go types: `Server/internal/api/api.gen.go` +- Dart models: `Phone-App/lib/api/generated/` + +`npm run generate` regenerates all three. CI fails if the committed files differ from what the contract generates. + +## Code style + +- Match the code around your change: naming, comment density and idiom. +- Authorization rules belong in `Server/internal/access` as pure functions with tests. +- Every new source file starts with `SPDX-License-Identifier: AGPL-3.0-or-later` in a comment. `node .github/scripts/spdx.mjs .` adds it. +- Comments and docs are in plain English: short sentences, and explain why rather than what. + +## Commits and pull requests + +- Keep each pull request to one change. Split refactors from behaviour changes. +- Write commit subjects in the imperative ("Add page trash", not "Added page trash"). +- Describe what changed, why, and how you tested it. Include screenshots for UI changes. +- Add or update tests for behaviour changes. + +## License + +Docwell is licensed under the [GNU AGPL v3.0 or later](LICENSE). By sending a contribution you agree that it is licensed under the same terms. diff --git a/Database/entrypoint.sh b/Database/entrypoint.sh index 9a3ba5e..89d0929 100644 --- a/Database/entrypoint.sh +++ b/Database/entrypoint.sh @@ -1,4 +1,5 @@ #!/bin/sh +# SPDX-License-Identifier: AGPL-3.0-or-later set -eu : "${PB_ADMIN_EMAIL:?PB_ADMIN_EMAIL is required}" diff --git a/Database/pb_hooks/docwell.pb.js b/Database/pb_hooks/docwell.pb.js index 927020b..2a495e6 100644 --- a/Database/pb_hooks/docwell.pb.js +++ b/Database/pb_hooks/docwell.pb.js @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: AGPL-3.0-or-later + /// // Token check used by docwell-server: returns the "users" record that owns the diff --git a/Database/pb_migrations/1761850000_initial_schema.js b/Database/pb_migrations/1761850000_initial_schema.js index 5ebb3af..2ece767 100644 --- a/Database/pb_migrations/1761850000_initial_schema.js +++ b/Database/pb_migrations/1761850000_initial_schema.js @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: AGPL-3.0-or-later + /// // Initial Docwell schema. All record API rules stay null (superuser only): PocketBase diff --git a/Database/pb_migrations/1761900000_organizations.js b/Database/pb_migrations/1761900000_organizations.js index 71828ed..37649ab 100644 --- a/Database/pb_migrations/1761900000_organizations.js +++ b/Database/pb_migrations/1761900000_organizations.js @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: AGPL-3.0-or-later + /// // Organizations and the role hierarchy (same model as DriverVault): diff --git a/Database/pb_migrations/1762000000_collab.js b/Database/pb_migrations/1762000000_collab.js index 93a4e99..2ea9527 100644 --- a/Database/pb_migrations/1762000000_collab.js +++ b/Database/pb_migrations/1762000000_collab.js @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: AGPL-3.0-or-later + /// // Collaboration storage. The server talks to PocketBase over JSON only, so the diff --git a/Desktop-App/build/config.yml b/Desktop-App/build/config.yml index aefeea7..3858107 100644 --- a/Desktop-App/build/config.yml +++ b/Desktop-App/build/config.yml @@ -67,6 +67,11 @@ dev_mode: type: primary exit_policy: shutdown +# URL schemes the installers register with the OS (deeplink.go handles them). +protocols: + - scheme: docwell + description: Docwell link + # File Associations # More information at: https://v3.wails.io/noit/done/yet fileAssociations: diff --git a/Desktop-App/build/darwin/Info.dev.plist b/Desktop-App/build/darwin/Info.dev.plist index 8065bda..2074df5 100644 --- a/Desktop-App/build/darwin/Info.dev.plist +++ b/Desktop-App/build/darwin/Info.dev.plist @@ -1,34 +1,46 @@ + - - CFBundlePackageType - APPL - CFBundleName - My Product - CFBundleExecutable - docwell-desktop.exe - CFBundleIdentifier - com.example.docwelldesktop - CFBundleVersion - 0.1.0 - CFBundleGetInfoString - This is a comment - CFBundleShortVersionString - 0.1.0 - CFBundleIconFile - icons - CFBundleIconName - appicon - LSMinimumSystemVersion - 12.0.0 - NSHighResolutionCapable - true - NSHumanReadableCopyright - © 2026, My Company - NSAppTransportSecurity - - NSAllowsLocalNetworking - - - + + CFBundleExecutable + docwell-desktop + CFBundleGetInfoString + Docwell desktop app + CFBundleIconFile + icons + CFBundleIconName + appicon + CFBundleIdentifier + app.docwell.desktop + CFBundleName + Docwell + CFBundlePackageType + APPL + CFBundleShortVersionString + 0.0.1 + CFBundleURLTypes + + + CFBundleURLName + wails.com.docwell + CFBundleURLSchemes + + docwell + + + + CFBundleVersion + 0.0.1 + LSMinimumSystemVersion + 12.0.0 + NSAppTransportSecurity + + NSAllowsLocalNetworking + + + NSHighResolutionCapable + true + NSHumanReadableCopyright + Copyright (c) 2026 Docwell contributors + \ No newline at end of file diff --git a/Desktop-App/build/darwin/Info.plist b/Desktop-App/build/darwin/Info.plist index 86ffe83..272ef52 100644 --- a/Desktop-App/build/darwin/Info.plist +++ b/Desktop-App/build/darwin/Info.plist @@ -1,29 +1,41 @@ + - - CFBundlePackageType - APPL - CFBundleName - My Product - CFBundleExecutable - docwell-desktop.exe - CFBundleIdentifier - com.example.docwelldesktop - CFBundleVersion - 0.1.0 - CFBundleGetInfoString - This is a comment - CFBundleShortVersionString - 0.1.0 - CFBundleIconFile - icons - CFBundleIconName - appicon - LSMinimumSystemVersion - 12.0.0 - NSHighResolutionCapable - true - NSHumanReadableCopyright - © 2026, My Company - + + CFBundleExecutable + docwell-desktop + CFBundleGetInfoString + Docwell desktop app + CFBundleIconFile + icons + CFBundleIconName + appicon + CFBundleIdentifier + app.docwell.desktop + CFBundleName + Docwell + CFBundlePackageType + APPL + CFBundleShortVersionString + 0.0.1 + CFBundleURLTypes + + + CFBundleURLName + wails.com.docwell + CFBundleURLSchemes + + docwell + + + + CFBundleVersion + 0.0.1 + LSMinimumSystemVersion + 12.0.0 + NSHighResolutionCapable + true + NSHumanReadableCopyright + Copyright (c) 2026 Docwell contributors + \ No newline at end of file diff --git a/Desktop-App/build/ios/Info.dev.plist b/Desktop-App/build/ios/Info.dev.plist index 69e11d4..2ef756d 100644 --- a/Desktop-App/build/ios/Info.dev.plist +++ b/Desktop-App/build/ios/Info.dev.plist @@ -1,61 +1,56 @@ - - CFBundleExecutable - docwell-desktop.exe - CFBundleIdentifier - com.example.docwelldesktop.dev - CFBundleName - My Product (Dev) - CFBundleDisplayName - My Product (Dev) - CFBundlePackageType - APPL - CFBundleShortVersionString - 0.1.0-dev - CFBundleVersion - 0.1.0 - LSRequiresIPhoneOS - - MinimumOSVersion - 15.0 - UILaunchStoryboardName - LaunchScreen - UIRequiredDeviceCapabilities - - arm64 - - UISupportedInterfaceOrientations - - UIInterfaceOrientationPortrait - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - UISupportedInterfaceOrientations~ipad - - UIInterfaceOrientationPortrait - UIInterfaceOrientationPortraitUpsideDown - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - NSAppTransportSecurity - - NSAllowsArbitraryLoads - - NSAllowsLocalNetworking - - - - WailsDevelopmentMode - - - NSHumanReadableCopyright - © 2026, My Company - - - CFBundleGetInfoString - This is a comment - - + + CFBundleDisplayName + Docwell (Dev) + CFBundleExecutable + docwell-desktop + CFBundleGetInfoString + Docwell desktop app + CFBundleIdentifier + app.docwell.desktop.dev + CFBundleName + Docwell (Dev) + CFBundlePackageType + APPL + CFBundleShortVersionString + 0.0.1-dev + CFBundleVersion + 0.0.1 + LSRequiresIPhoneOS + + MinimumOSVersion + 15.0 + NSAppTransportSecurity + + NSAllowsArbitraryLoads + + NSAllowsLocalNetworking + + + NSHumanReadableCopyright + Copyright (c) 2026 Docwell contributors + UILaunchStoryboardName + LaunchScreen + UIRequiredDeviceCapabilities + + arm64 + + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + WailsDevelopmentMode + + \ No newline at end of file diff --git a/Desktop-App/build/ios/Info.plist b/Desktop-App/build/ios/Info.plist index 8c775f0..3031591 100644 --- a/Desktop-App/build/ios/Info.plist +++ b/Desktop-App/build/ios/Info.plist @@ -1,59 +1,54 @@ - - CFBundleExecutable - docwell-desktop.exe - CFBundleIdentifier - com.example.docwelldesktop - CFBundleName - My Product - CFBundleDisplayName - My Product - CFBundlePackageType - APPL - CFBundleShortVersionString - 0.1.0 - CFBundleVersion - 0.1.0 - LSRequiresIPhoneOS - - MinimumOSVersion - 15.0 - UILaunchStoryboardName - LaunchScreen - UIRequiredDeviceCapabilities - - arm64 - - UISupportedInterfaceOrientations - - UIInterfaceOrientationPortrait - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - UISupportedInterfaceOrientations~ipad - - UIInterfaceOrientationPortrait - UIInterfaceOrientationPortraitUpsideDown - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - NSAppTransportSecurity - - NSAllowsArbitraryLoads - - NSAllowsLocalNetworking - - - - - NSHumanReadableCopyright - © 2026, My Company - - - CFBundleGetInfoString - This is a comment - - + + CFBundleDisplayName + Docwell + CFBundleExecutable + docwell-desktop + CFBundleGetInfoString + Docwell desktop app + CFBundleIdentifier + app.docwell.desktop + CFBundleName + Docwell + CFBundlePackageType + APPL + CFBundleShortVersionString + 0.0.1 + CFBundleVersion + 0.0.1 + LSRequiresIPhoneOS + + MinimumOSVersion + 15.0 + NSAppTransportSecurity + + NSAllowsArbitraryLoads + + NSAllowsLocalNetworking + + + NSHumanReadableCopyright + Copyright (c) 2026 Docwell contributors + UILaunchStoryboardName + LaunchScreen + UIRequiredDeviceCapabilities + + arm64 + + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + \ No newline at end of file diff --git a/Desktop-App/build/ios/LaunchScreen.storyboard b/Desktop-App/build/ios/LaunchScreen.storyboard index 6938944..6980009 100644 --- a/Desktop-App/build/ios/LaunchScreen.storyboard +++ b/Desktop-App/build/ios/LaunchScreen.storyboard @@ -16,14 +16,14 @@ -