No description
  • Go 62%
  • JavaScript 19.4%
  • CSS 10.6%
  • HTML 7.2%
  • Shell 0.8%
Find a file
2026-05-16 19:24:06 +02:00
bin initial commit 2026-05-16 19:24:06 +02:00
cmd/dokeep initial commit 2026-05-16 19:24:06 +02:00
frontend initial commit 2026-05-16 19:24:06 +02:00
internal initial commit 2026-05-16 19:24:06 +02:00
go.mod initial commit 2026-05-16 19:24:06 +02:00
README.md initial commit 2026-05-16 19:24:06 +02:00
testrun.sh initial commit 2026-05-16 19:24:06 +02:00
UI_API_CONTRACT.md initial commit 2026-05-16 19:24:06 +02:00

dokeep

A lightweight document management UI backed by Perkeep.

Documents are stored as Perkeep permanodes with file blob content. dokeep provides a focused browsing, searching, and tagging interface on top of Perkeep's content-addressable storage.


Features

  • Browse and search documents stored in Perkeep
  • View document metadata (title, tags, notes)
  • Edit and save metadata back to Perkeep permanode attributes
  • Bulk-tag multiple documents at once
  • Inline preview via <iframe> (PDFs render natively in the browser)
  • Thumbnail generation: pdftoppm for PDFs, SVG placeholder fallback

Architecture

Browser (SPA)
    │
    ▼
dokeep HTTP server  (:8080)
    ├── GET /                          static frontend files
    ├── GET /api/documents             search + paginate
    ├── GET /api/documents/{id}        document detail
    ├── PATCH /api/documents/{id}/metadata  update title/tags/note
    ├── POST /api/documents/bulk-tags  bulk add/remove tag
    ├── GET /api/documents/{id}/preview    stream blob
    └── GET /api/documents/{id}/thumbnail  generated thumbnail
           │
           ▼
    Perkeep server  (:3179)

The backend proxies the Perkeep API directly — no database or local state. Metadata mutations go through Perkeep's /camli/sig/sign endpoint (the Perkeep server handles the cryptographic signing).


Perkeep data model

Frontend field Perkeep permanode attribute
title title
tags[] tag (repeated)
note description
file content camliContent → file blob

Only permanodes whose camliContent points to a recognised document MIME type are surfaced (PDF, Word, Excel, PowerPoint, ODT, ODS, ODP, plain text).


Prerequisites


Building

go build -o dokeep ./cmd/dokeep

Running

./dokeep

The server listens on :8080 by default and expects Perkeep at http://localhost:3179.

Configuration

All settings are controlled via environment variables:

Variable Default Description
PERKEEP_URL http://localhost:3179 Perkeep server base URL
PERKEEP_AUTH (empty) Basic auth credentials as user:password
LISTEN_ADDR :8080 Address for the dokeep HTTP server
FRONTEND_DIR ./frontend Path to the static frontend files

Example with a password-protected Perkeep instance:

PERKEEP_URL=http://192.168.1.10:3179 \
PERKEEP_AUTH=myuser:mypassword \
LISTEN_ADDR=:9090 \
./dokeep

Authentication

dokeep does not implement its own authentication. Access control is handled at the reverse proxy level (e.g. nginx, Caddy, Tailscale). See frontend/nginx.conf for an example nginx configuration.


Project layout

cmd/dokeep/         entry point and configuration
internal/
  perkeep/
    client.go       HTTP client wrapper for Perkeep
    search.go       document search and describe
    mutations.go    attribute claim signing and upload
  api/
    server.go       HTTP router and static file serving
    documents.go    list and detail handlers
    metadata.go     metadata update handler
    bulk.go         bulk tagging handler
    preview.go      thumbnail and preview handlers
frontend/           vanilla JS SPA (HTML/CSS/JS)