WOLF TO DEV

~/projets $ ls

Projects

Two personal open source projects you can try online. Each one was designed, tested and deployed solo, to the same standards: invariants enforced by the database, measured behavior, recovery after failure.

01 //

Corpus: ask your documents a question

live demo v1.2.0 MIT license Python · FastAPI · PostgreSQL
corpus-8jf9.onrender.com/demo
The Corpus demo: a question asked of the documentation; the answer cites its source and page

A multi-tenant RAG platform. Organizations upload PDFs (even scanned ones) and Word, HTML or Markdown files; workers index them in the background; every question gets a streamed answer that cites its sources down to the page.

It plugs into any website with a single script tag, and answers "not in the documents" rather than making things up.

Free hosting: the first load can take a minute.

From uploaded document to cited answer

architecture.md
Corpus architecture: ingestion (upload, durable queue, worker, PostgreSQL) then question (rewriting, hybrid search, re-ranking, answer)

Under the hood

  • Multi-tenancy enforced by the database: PostgreSQL Row-Level Security, composite foreign keys; a query that forgets its filter cannot leave its tenant.
  • Durable ingestion: task queue on PostgreSQL, FOR UPDATE SKIP LOCKED, leases and heartbeats, protection against zombie workers.
  • Hybrid search: vector and full-text in parallel, RRF fusion, cross-encoder re-ranking.
  • Operable: Prometheus metrics, OpenTelemetry traces, Grafana dashboard, load shedding with 503s beyond capacity.

Measured, not assumed

Search quality · 40 annotated questions, CPU only
StrategyRecall@1MRRp50
Full-text only0.7380.8697 ms
Vector only0.5500.71717 ms
Hybrid (RRF)0.8380.92919 ms
Hybrid + cross-encoder0.9000.958870 ms
40/ssearches, 0% errors, on 2 vCPUs (k6 load test)
77 msp95 search latency at 40 searches per second
190tests: isolation, concurrency, crash recovery

The first overload test exposed a connection pool deadlock that made the API collapse instead of degrading gracefully. It is fixed and covered by a regression test.

02 //

Flowline: processes that survive crashes

live demo v0.1.0 MIT license TypeScript · Node.js · PostgreSQL
onboarding.ts
const onboarding = defineWorkflow({
  name: "onboarding",
  async run({ input, step }) {
    const account = await step.run("create-account",
      () => api.createAccount(input.userId));
    await step.run("send-welcome",
      () => mailer.send(account.email));
    // no worker blocked for 14 days
    await step.sleep("trial", 14 * DAY);
    const paid = await step.waitForEvent("payment",
      "billing.paid", { match: { userId: input.userId },
      timeoutMs: 3 * DAY });
    return paid ? "converted" : "churned";
  },
});

A durable execution engine: a business process is written as a plain async TypeScript function. It survives crashes, sleeps for days and waits for external events, without tying up a thread, a process or a connection.

  • Journal first: every completed step is written before the code moves on.
  • Deterministic replay: on resume, steps already done return their recorded result.
  • Leases and fencing: a crashing worker loses nothing, a zombie worker corrupts nothing.

Tested by killing real processes

Four workers run 60 six-step workflows; the test kills one at random with SIGKILL, twelve times, usually mid-step, and replaces it.

60six-step workflows, four workers
12hard kills, usually mid-step
0lost results; each step written to the journal exactly once, each side effect present exactly once

Throughput on a laptop, 4 cores

WorkersRuns/sSteps/s
1155 to 215465 to 640
4535 to 8501,600 to 2,540
16545 to 8151,640 to 2,450

98 tests, the same behavioral suite run against in-memory storage and PostgreSQL, continuous integration on Node 22 and 24, tested Docker image.

Visual editor and live runs

flowline-demo.onrender.com
The Flowline visual editor: an order tracking workflow, step by step
runs · journal of a run
The Flowline dashboard: two completed runs and the journal of one of them, step by step

Want to talk about it?

An architecture to challenge, a contract, a question about one of these projects.