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>
This commit is contained in:
tajniak81andClaude Opus 5.5 committed 2026-10-30 22:18:25 +01:00
commit 4903bb12dd
264 files changed
+21422

No files matched your search

+78
View File
@@ -0,0 +1,78 @@
<script setup lang="ts">
import type { UserList } from "@docwell/api-client";
import { onMounted, ref, watch } from "vue";
import { api } from "../session";
const perPage = 20;
const page = ref(1);
const search = ref("");
const list = ref<UserList | null>(null);
const error = ref("");
async function load() {
error.value = "";
try {
list.value = await api.admin.listUsers({ page: page.value, perPage, q: search.value });
} catch {
error.value = "Could not load users.";
}
}
let timer: ReturnType<typeof setTimeout> | undefined;
watch(search, () => {
clearTimeout(timer);
timer = setTimeout(() => {
page.value = 1;
load();
}, 250);
});
watch(page, load);
onMounted(load);
</script>
<template>
<div class="flex flex-wrap items-center justify-between gap-3">
<h1 class="text-xl font-semibold">Users</h1>
<input
v-model="search"
type="search"
placeholder="Search name or email"
class="w-full rounded-md border border-border bg-surface px-3 py-1.5 text-sm outline-none focus:border-brand-500 sm:w-64"
/>
</div>
<p v-if="error" role="alert" class="mt-4 text-sm text-red-600">{{ error }}</p>
<div class="mt-6 overflow-x-auto rounded-lg border border-border">
<table class="w-full text-left text-sm">
<thead class="bg-surface-muted text-xs text-fg-muted">
<tr>
<th class="px-4 py-2 font-medium">Name</th>
<th class="px-4 py-2 font-medium">Email</th>
<th class="px-4 py-2 font-medium">Role</th>
<th class="px-4 py-2 font-medium">Status</th>
<th class="px-4 py-2 font-medium">Verified</th>
</tr>
</thead>
<tbody>
<tr v-for="u in list?.items" :key="u.id" class="border-t border-border">
<td class="px-4 py-2 font-medium">{{ u.name }}</td>
<td class="px-4 py-2">{{ u.email }}</td>
<td class="px-4 py-2">{{ u.isAdmin ? "Admin" : "User" }}</td>
<td class="px-4 py-2 capitalize">{{ u.status }}</td>
<td class="px-4 py-2">{{ u.verified ? "Yes" : "No" }}</td>
</tr>
<tr v-if="list && list.items.length === 0">
<td colspan="5" class="px-4 py-6 text-center text-fg-muted">No users found.</td>
</tr>
</tbody>
</table>
</div>
<div v-if="list && list.totalItems > perPage" class="mt-4 flex items-center gap-3 text-sm">
<button class="rounded border border-border px-2 py-1 disabled:opacity-40" :disabled="page <= 1" @click="page--">Previous</button>
<span class="text-fg-muted">Page {{ page }} of {{ Math.ceil(list.totalItems / perPage) }}</span>
<button class="rounded border border-border px-2 py-1 disabled:opacity-40" :disabled="page * perPage >= list.totalItems" @click="page++">
Next
</button>
</div>
</template>