Commit Graph

8 Commits

Author SHA1 Message Date
Björn Blomberg
05b773c14c first working login and editing of file. bugg is för rendering with tiptap 2026-04-10 19:56:21 +02:00
Björn Blomberg
9d73beb736 feat: implement Git history, diff, and documentAtCommit resolvers 2026-04-10 18:29:55 +02:00
4ba3b7dd49 fix: bind mounts from DOCKER_PATH + real storage reads from disk
docker-compose.yml:
- Switch from named volumes back to bind mounts driven by DOCKER_PATH in .env
- DOCKER_PATH/config → /config, DOCKER_PATH/data → /data
- Works with both Windows paths (C:\...) and Linux paths (/opt/...)

server.go:
- Wire in storage.Store so documents query reads real .adoc files from disk
- handleDocuments: calls store.List("") and store.Read(slug) for actual content
- extractTitle: parses first "= Title" line from AsciiDoc, falls back to slug
- handleSetup: also initialises store after writing config so docs appear immediately
- Single document query (document(slug:...)) reads and returns full content

.env.example:
- Clarify DOCKER_PATH usage with Windows and Linux examples
- Show resulting directory layout on host

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-10 14:45:08 +02:00
542762e441 fix: double config path, stale service worker, empty op-name log
- main.go: DOCKER_PATH=/config + /config.json (was /config/config.json)
- vite.config.ts: skipWaiting+clientsClaim forces new SW immediately;
  navigateFallback: null prevents SW from serving stale index.html;
  globPatterns excludes HTML so navigation always hits the network
- server.go: gqlOpName handles shorthand { field } syntax

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-10 14:16:44 +02:00
8354f5d64c fix+feat: real setup persistence, request logging, improved SPA serving
- server.go now accepts configPath so setup mutation writes config.json to disk
- setup mutation parses GraphQL variables and persists config — no more setup loop
- request logger middleware logs every HTTP request with method/path/status/duration
- GraphQL handler logs operation name and setup/status decisions
- spaHandler simplified: serves real files directly, falls back to index.html
  only for paths that don't exist (fixes potential asset-serving issues)
- health endpoint returns JSON and 503 in setup mode
- main.go logs config path, storage path and db path on startup

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-10 14:03:05 +02:00
d93f3bb888 fix+feat: SPA routing, theme system, modern UI, setup wizard improvements
Fixes:
- Go server now serves index.html for all non-asset paths (SPA fallback)
- Null guard on data.documents prevents undefined.length TypeError
- App.vue waits for checkStatus() before rendering AppLayout (race condition)
- PWA manifest no longer references missing icon files
- index.html applies theme class before paint to prevent flash

Features:
- Theme store: dark/light toggle + 6 accent color presets + custom hex picker
- ThemeToggle component in header dropdown
- CSS custom properties for accent color (--accent-400/500/600/700)
- Tailwind accent-* color utilities driven by CSS vars
- SetupWizard: 3-step flow, password confirmation, LDAP test button,
  animated toggle, review step, proper error/success states
- Sidebar: loading skeleton, active page highlight, null-safe document list
- Global .input, .btn-primary, .btn-secondary, .card component classes
- Stub GraphQL responses for setup/login/testLdapConnection

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-10 13:40:42 +02:00
87821e8988 fix: server starts even without config (REQUIRE_SETUP mode)
main.go no longer fatals on ErrRequireSetup — it passes cfg=nil to NewServer.
NewServer returns REQUIRE_SETUP on every GraphQL call when cfg is nil, and
also adds CORS headers and serves the Vue SPA from /srv/archivum/ui.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-10 13:25:23 +02:00
e6b64e3344 feat: Archivum skeleton — Go/GraphQL backend + Vue 3 PWA frontend
Full project scaffold: multi-stage Dockerfile (ARM64/AMD64), AsciiDoc↔TipTap
bridge, Setup Wizard, CodeMirror source editor, Git-backed storage layer,
LDAP+JWT auth skeleton, Tailwind mobile-first layout, and VS Code build/push
tasks targeting registry at 192.168.0.19:5000.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-10 13:07:01 +02:00