No description
  • Go 40.1%
  • JavaScript 32.3%
  • CSS 20.1%
  • HTML 7.2%
  • Shell 0.3%
Find a file
Balázs Grill 40024ef1d0
All checks were successful
Build / build (push) Successful in 1m0s
using qrcode instead
2026-07-07 20:16:07 +02:00
.forgejo/workflows use timestamp in package version 2026-05-27 04:17:28 +02:00
bin removed binary from vc 2026-05-26 12:00:31 +02:00
cmd/dokeep inject build time into binary 2026-05-27 04:01:48 +02:00
frontend label generation 2026-07-07 15:09:05 +02:00
integration label generation 2026-07-07 15:09:05 +02:00
internal using qrcode instead 2026-07-07 20:16:07 +02:00
DESIGN_PRINCIPLES.md refactor: overhaul frontend structure and design for dokeep 2026-05-18 19:17:55 +02:00
embed.go embedding frontend 2026-05-19 18:53:22 +02:00
go.mod label generation 2026-07-07 15:09:05 +02:00
go.sum label generation 2026-07-07 15:09:05 +02:00
README.md label generation 2026-07-07 15:09:05 +02:00
testrun.sh initial commit 2026-05-16 19:24:06 +02:00
UI_API_CONTRACT.md label generation 2026-07-07 15:09:05 +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
    ├── POST /api/documents/{id}/label generate PDF417 label PNG
    ├── 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

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)