TL;DR

Threlmark’s local-first architecture treats the user’s disk as the primary source of truth, allowing for portable, offline-capable, and resilient project management. Its design simplifies synchronization, enhances privacy, and reduces backend reliance.

Imagine a project management tool that never relies on a server. No cloud, no login, just plain files sitting on your disk. That’s the magic of Threlmark’s local-first architecture. It’s a different way to think about data—where your device’s storage isn’t just a cache but the ultimate authority.

This approach changes everything: how you handle concurrency, integrate external tools, and trust your data. In this article, I’ll break down how Threlmark’s disk-is-the-contract philosophy works, why it’s so powerful, and what you can learn from it to build resilient, portable apps of your own.

Disk is the contract: inside Threlmark’s architecture — ThorstenMeyerAI.com
ThorstenMeyerAI.com
Threlmark · Technical Deep-Dive
Threlmark · architecture

Disk is the contract: inside a local-first roadmap hub

A Next.js app on top of plain JSON files — no database, no cloud, no accounts. The key decision: the on-disk layout IS the API. Everything else cascades from taking that seriously.

Next.js · TypeScript · JSON-on-disk · MIT · part 2 of the Threlmark series
01The core decision

There is no server-of-record — the files are the record

The UI and any external tool reach the same files through the same discipline. The data root defaults to ~/.threlmark — home-based, because it’s a shared hub every one of your apps points at.

~/.threlmark/ ├─ threlmark.json # manifest ├─ links.json # dependency graph ├─ projects// │ ├─ project.json # meta + wipLimits │ ├─ board.json # lane ordering │ ├─ items/.json # ONE card per file ← source of truth │ ├─ suggestions/ # the Inbox (drop-zone) │ ├─ handoffs/ # recorded agent handoffs │ ├─ reports/ # agent report drop-zone │ └─ ROADMAP.md # human-readable mirror ├─ shared/items/ # cards many projects ref └─ archive/ # archived, still readable

Inspectable

Every artifact is a file you can cat, diff, grep, commit.

Portable · no lock-in

Back up with cp, sync with Dropbox / git, migrate trivially.

Interoperable

Any tool in any language joins by reading / writing files.

Restartable

No in-memory state to lose — stateless over the files.

02Making files safe
SANDISK 1TB Extreme Portable SSD (Old Model) - Up to 1050MB/s, USB-C, USB 3.2 Gen 2, IP65 Water and Dust Resistance, Updated Firmware - External Solid State Drive - SDSSDE61-1T00-G25

SANDISK 1TB Extreme Portable SSD (Old Model) – Up to 1050MB/s, USB-C, USB 3.2 Gen 2, IP65 Water and Dust Resistance, Updated Firmware – External Solid State Drive – SDSSDE61-1T00-G25

Get NVMe solid state performance with up to 1050MB/s read and 1000MB/s write speeds in a portable, high-capacity…

As an affiliate, we earn on qualifying purchases.

As an affiliate, we earn on qualifying purchases.

Two disciplined patterns instead of a database

„Just use files“ is easy to get wrong. These two patterns — ported from a battle-tested sibling app — are what make file-based state sound rather than reckless.

Pattern 1

Atomic writes

Write to a temp file in the same dir, then rename() over the target. Rename is atomic on one filesystem — a crash mid-write leaves the complete old file or the complete new one, never a half.

write .tmp-pid-rand fsync rename() over target
Pattern 2 · one file per item

The board heals itself

A single roadmap.json array races when two tools write at once. One file per card makes writes collision-free. Lane order lives in board.json and reconciles on read.

The payoff: an external tool never touches board.json. It writes an item file — the board fixes itself on Threlmark’s next read. Unknown keys are preserved, so the contract is forward-compatible.
03Derived, never stored
Free Fling File Transfer Software for Windows [PC Download]

Free Fling File Transfer Software for Windows [PC Download]

Intuitive interface of a conventional FTP client

As an affiliate, we earn on qualifying purchases.

As an affiliate, we earn on qualifying purchases.

The numbers can’t drift from the files

Anything computable from item state is computed — so the displayed numbers can never disagree with the underlying JSON. Priority is the clearest example: it’s calculated on read, never persisted.

priority — computed on read

Impact weighted heaviest; effort the only axis that subtracts. Reused verbatim from the original tool, so imported cards rank identically.

priority = max(0, round(impact·3 + evidence·2 + fit·2effort·1.5))
a 5 / 5 / 5 / 4 card 29
work-item age
now − lane-entry time. Past threshold (dev 7d, ranked 21d, idea 60d) → stale.
cycle time
first DevelopmentDone. Derived from append-only transitions[].
throughput
items reaching Done per ISO week, 8-week window.
WIP
count per lane; over the cap shows 3 / 2 in red.
04The closed agent loop · press play
Amazon

privacy-focused local file storage device

As an affiliate, we earn on qualifying purchases.

As an affiliate, we earn on qualifying purchases.

A handoff is a first-class flow event

The genuinely 2026-shaped part: most building is done by AI agents, so Threlmark closes the loop. Watch a card go from ranked to Done without anyone dragging it.

Handoff → report → self-move

The brief carries a reporting protocol. The agent reports through REST or the filesystem — and a done report moves the card itself.

Ranked
Add price-drop alertsscore 31 · ready
Development
Handed off 🤖
Done
▶ preferred — REST
POST /api/projects/:id/
items/:itemId/report

Direct call. Applied immediately.

▶ fallback — filesystem
drop reports/.json
→ ingested on read

Robust even if the server’s down at finish time.

🤖 claude done: price-drop alerts shipped · typecheck + lint + build passed — card moved to Done
05Portfolio score & deployment
ENGPOW Expanding File Folder Important Document Organizer Fireproof Document Bag-A4 Size, 25 Pockets,Color Labels,Non-Itchy Silicone Coated Portable Filing Organizer Folder(14.3" x 9.8")

ENGPOW Expanding File Folder Important Document Organizer Fireproof Document Bag-A4 Size, 25 Pockets,Color Labels,Non-Itchy Silicone Coated Portable Filing Organizer Folder(14.3" x 9.8")

DOUBLE LAYERS PROTECTION:Our newly designed file folder uses different materials than other folder.Double Layered design, high quality Black…

As an affiliate, we earn on qualifying purchases.

As an affiliate, we earn on qualifying purchases.

A small formula, and an honest hosting caveat

Because items are globally addressable (/), the Portfolio ranks everything together by a status-weighted score — finishing beats starting, blockers get a boost.

Portfolio ranking — status-weighted

In-flight work floats to the top; bottlenecks cost the most, so blockers get nudged up.

score = priority · statusWeight (+ 0.1 · blockedCount · priority)
1.3
development
1.0
ranked
0.85
idea
0.15
done
Path 1

Static read-only demo

Seeded data, writes to localStorage. Try-before-you-clone.

Path 2

Personal Node instance

Password-gated, persistent backed-up THRELMARK_DATA_DIR.

Path 3

Multi-tenant SaaS

Add accounts + per-tenant isolation. A separate build.

The elegant part: the store interface src/lib/*/store.ts is the natural seam — the same boundary that keeps the local tool simple is the one you’d extend for multi-tenancy. The architecture doesn’t fight that future; it just doesn’t pay for it until you need it.
ThorstenMeyerAI.com
Threlmark · open source (MIT) · github.com/MeyerThorsten/threlmark · part 2 of a series · file layout, formula, weights & agent-loop channels are Threlmark’s actual mechanics.

Key Takeaways

  • Treat your disk as the source of truth—every file is a window into your data.
  • Use one file per item to prevent conflicts, simplify updates, and enable self-healing boards.
  • Atomic writes are the backbone of safe concurrency—write to a temp file, then rename.
  • Sync is just background copying—no need for complex protocols or real-time sync engines.
  • Local storage enhances privacy and control—your data stays with you, no central server required.

Why Your Disk Is the True Boss of Your Data

Threlmark’s core idea is simple but revolutionary: your local disk isn’t just a place to store data—it’s the ultimate source of truth. This means every change, every state, every piece of info lives in plain files. When you open your project, the app reads from the disk—no API calls, no central database.

For example, instead of a single `roadmap.json` that tracks all cards, Threlmark creates one JSON file per card inside an `items/` folder. You can open any of these files directly with a text editor, see the exact state of a task, and even modify it manually. It’s like having a transparent, portable, and always-up-to-date record.

Why Your Disk Is the True Boss of Your Data
Why Your Disk Is the True Boss of Your Data

How Making Files the API Simplifies Everything

Using files as the API means every tool, script, or person can read or write data without complex protocols or locking. Threlmark structures its data into a clear directory layout—`items/`, `suggestions/`, `reports/`, and more. Each file acts as a tiny, atomic unit of work.

For instance, if you want to update a task’s status, you simply overwrite its JSON file atomically. No race conditions, no conflicts—just straightforward file operations. This approach makes the system inherently resilient to crashes and easy to back up or migrate.

The Power of One File Per Item (No Big JSON Lists!)

Naively, many projects store everything in one big JSON array. But that’s a recipe for conflicts and clobbering. Threlmark uses one file per item—each card gets its own JSON file.

This design allows external tools to update individual items without reading or rewriting everything. Plus, a background process can reconcile the list of items with their actual files, healing inconsistencies automatically. Imagine editing a task in Vim, saving it, and seeing it instantly reflected in your project’s roadmap.

The Power of One File Per Item (No Big JSON Lists!)
The Power of One File Per Item (No Big JSON Lists!)

How Threlmark Handles Concurrency Without Locking

Concurrency in file-based systems sounds tricky, but Threlmark makes it simple. Because each item is a separate file, simultaneous edits don’t clash—each writer atomically replaces its file. Learn more about how Threlmark handles concurrency.

For example, if two scripts update different tasks at once, each overwrites its target file independently. The system then reconciles the `board.json` to reflect the current state. This approach sidesteps race conditions common in traditional systems.

Sync? It’s Just Background Noise—Not the System’s Heart

In Threlmark, sync isn’t the core mechanism—it’s an afterthought. Because the data lives on your disk, syncing is just copying files between devices or to cloud storage. No special protocol needed.

Imagine editing a task on your laptop, then later opening the same project on your tablet. The files are the same—they’re just synced in the background via Dropbox, Syncthing, or whatever you prefer. No API calls, no server to mediate.

Sync? It’s Just Background Noise—Not the System’s Heart
Sync? It’s Just Background Noise—Not the System’s Heart

Conflict Resolution and Data Integrity — No Magic, Just Rules

When two devices edit the same file offline, conflicts happen. Threlmark relies on user or external tool intervention, or simple last-write-wins. Because each file is atomic, conflicts are straightforward to spot and resolve.

For example, if two versions of a task differ, you can compare them with `diff`, choose which to keep, and overwrite the file. The system avoids corruption by never overwriting in place but always replacing files atomically.

Privacy, Security, and User Control—All on Your Device

Because all data is stored locally, Threlmark naturally enhances privacy. No central server stores your info—your disk is the source of truth. You control backups, encryption, and sharing.

For instance, you can encrypt your `~/.threlmark` folder with full disk encryption, making it nearly impossible for prying eyes to access sensitive project data.

Privacy, Security, and User Control—All on Your Device
Privacy, Security, and User Control—All on Your Device

Developer Win: Building Resilient Apps with Simple Tools

For developers, this architecture is a dream. It sidesteps complex databases, migration issues, and server dependencies. Just read and write files, handle conflicts, and let the OS do the rest.

Threlmark’s approach is especially appealing for solo devs or small teams aiming for durability and portability. You can back up your entire project with a simple copy, move it anywhere, and keep working.

What Does This Mean for Your Projects?

Adopting a disk-is-the-contract mindset can turn your app into a resilient, portable, and privacy-respecting tool. It’s perfect for offline work, multi-device setups, or if you want full control over your data.

Imagine running a team’s project management system that works seamlessly offline, never loses data, and can be migrated in a heartbeat. That’s the promise of local-first architecture.

Frequently Asked Questions

What exactly does ‚disk is the contract‘ mean?

It means your local files are the definitive source of truth for your data. The app reads from and writes to these files directly, making your data portable, safe, and independent of any central server.

How does Threlmark handle multiple devices or offline work?

Since all data lives on your disk, you can work offline without issues. Synchronization happens in the background through file copying, so switching devices or reconnecting is seamless—just sync your folders.

Is this approach safe from data corruption or conflicts?

Yes. Threlmark uses atomic file operations to prevent corruption. Conflicts are handled through simple tools like diff, and the system always rewrites files atomically, avoiding partial writes or data loss.

Can I manually edit my project files without breaking the system?

Absolutely. Since each file is a standalone JSON, you can edit them with any text editor. The system will reconcile these changes automatically, making manual tweaks safe and straightforward.

What are the main benefits of a local-first system like Threlmark?

You gain better control, privacy, offline resilience, and portability. Plus, you reduce backend complexity and can back up or migrate your entire project by copying files—no lock-in or cloud dependency required.

Conclusion

In a world obsessed with cloud and central servers, Threlmark’s architecture proves that the simplest idea often works best. Making disk the contract turns your device into a resilient, portable fortress of your data—no dependencies, no lock-in, just pure control.

Next time you build or choose a tool, ask: where is my data truly owned? If it’s on your disk, you’re already on the right path. Because in the end, the disk isn’t just storage—it’s the contract that keeps your work safe, flexible, and yours.

What Does This Mean for Your Projects?
What Does This Mean for Your Projects?
You May Also Like

Build vs Buy a Prebuilt AI Workstation

Struggling to choose between building or buying your AI workstation? Discover the latest trends, costs, and tips to make the right call for your needs.