Skip to content

[Submission] Faldony — self-hosted document archive with durable processing #129

Description

@SixthPhilosopher

Project link

https://github.com/SixthPhilosopher/Faldony

Language

Java

Short description (max 256 chars)

Faldony is a self-hosted, local-first document archive. Every upload becomes a durable Temporal workflow: extract (OCR), embed, finalize — a crash mid-import never loses your file. Search fuses full-text, fuzzy, and vector ranking over a single PostgreSQL dataset.

Long Description

What this is

Faldony is a self-hosted, single-node document archive for personal and
professional files. You upload PDFs, scans, or photos; the system OCRs them,
embeds the text, and makes the whole library searchable — all on hardware
you own, with no cloud vendor in the path.

The problem it solves

Document archives tend to live in one of two extremes: cloud services that
hold your data hostage, or local folders you can never find anything in.
Faldony combines local-first storage with real retrieval — ingest is
automatic and durable, and search understands semantics, typos, and
structure. It is a private, searchable binder that survives crashes and
power cuts.

How it uses Temporal

Temporal is the backbone of the ingest pipeline. Every upload starts a
DocumentProcessingWorkflow — a single durable execution identified by the
document's content hash:

  • OCR + chunking runs as Activities against a self-hosted Docling
    server, polled on durable timers (a restart or crash costs nothing).
  • Embedding runs as another Activity with batch-resumable heartbeats.
  • A Saga compensation registered first guarantees cleanup on any
    permanent failure; cancellation is cooperative, never a terminate.
  • Failures are classified into a durable processing ledger, and a
    Reconciliation Workflow (a Temporal Schedule) self-heals the stack
    every few minutes — resuming transient failures, garbage-collecting
    orphans, and keeping the ledger honest.
  • Live UI progress streams straight from workflow state via the Java SDK's
    Workflow Streams, bridged to Server-Sent Events.

The workflows and activities are visible under
backend/src/main/kotlin/com/kiss/backend/temporal/.

  • DocumentProcessingWorkflow.kt / DocumentActivities.kt — the ingest
    pipeline (extract → embed → single-write finalize)
  • ReconciliationWorkflow.kt / ReconcileActivities.kt — the self-healing
    schedule
  • EmbeddingBackfillWorkflow.kt — the dormant backfill pass
  • TitleUpdateWorkflow.kt — per-document metadata updates

For setup instructions, see the README.

Author(s)

Alessandro Saccinto (SixthPhilosopher)

https://avatars.githubusercontent.com/u/72933724?v=4

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    code exchange submissionCode and/or content about Temporal!triageIssues that Temporal folk need to look at

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions