TL;DR

Threlmark treats the local disk as the primary source of truth, enabling offline access, fast updates, and interoperability. This design simplifies consistency, reduces dependencies, and empowers tools to work freely without locking into a server.

Imagine a project management app that works perfectly offline, updates instantly, and plays nicely with any tool you throw at it. That’s the promise of Threlmark’s architecture — a system where your disk isn’t just storage, but the contract itself. When your data lives on your device’s disk, you gain speed, control, and flexibility like never before.

This isn’t just about local storage; it’s a radical shift in how software thinks about data. No more server bottlenecks, no lock-in. You hold the keys, and every file is a building block for your workflow. Today, I’ll show you how Threlmark’s local-first design works, why it matters, and what makes it a game-changer for anyone who builds or uses project tools.

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
Amazon

offline project management software

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
Amazon

local-first file synchronization tool

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

JSON file management app

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
Amazon

disk-based data storage system

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

  • Making the disk the contract turns your data into a transparent, portable, and lock-free source of truth.
  • Single-file per item storage simplifies concurrency, avoiding race conditions and conflicts.
  • Atomic writes and tolerant merge ensure data safety even during crashes or simultaneous edits.
  • Self-healing boards keep workflows accurate without manual intervention.
  • File-based systems enable seamless integration with external tools and AI agents.

Why Making the Disk the Contract Changes Everything

In Threlmark, the disk isn’t just storage — it’s the source of truth. This means your entire project data, from cards to dependencies, lives in plain JSON files that any tool can read or write. No API server, no database, just files on your machine.

For example, when you move a task from “In Progress” to “Done,” the app updates a single JSON file in your `items/` folder. That file is the definitive record. If you open it with a text editor, you see the exact state of that task, down to timestamps and metadata. This approach ensures everything is transparent, portable, and hackable.

According to Threlmark’s creator, this design keeps data safe from lock-in and makes collaboration effortless, because anyone can peek into the files and understand the structure without special permissions or APIs. It’s a simple, reliable contract — the disk is the API.

Why Making the Disk the Contract Changes Everything
Why Making the Disk the Contract Changes Everything

How Local-First Means Offline Work Is Always Possible

When your data lives on your disk, you can work anywhere, anytime. No internet? No problem. For instance, you and your teammate update the roadmap on your laptops during a flight. When you’re back online, Threlmark syncs the changes seamlessly.

It’s like writing notes on a paper planner. Your work is always accessible, instantly editable, and never dependent on a server’s response. This makes the user experience snappy and reliable, especially in areas with spotty internet.

Research from the local-first movement shows that apps built this way reduce UI friction — no loading spinners, no error messages about lost connections. You just keep working.

The Power of One File Per Item — Concurrency Made Simple

Threlmark’s decision to store each task or card in its own JSON file is a game-changer. Instead of updating a big list, it updates just one file. This means no conflicts or race conditions when multiple tools or devices edit data.

Imagine two browsers editing different cards. Because each card is a small, atomic file, they won’t step on each other’s toes. The system reads all files, reconciles differences, and keeps everything consistent — all without locks or complicated coordination.

This approach isn’t just clever; it’s practical. It allows external tools to add, modify, or remove cards instantly, making collaboration smooth and predictable.

The Power of One File Per Item — Concurrency Made Simple
The Power of One File Per Item — Concurrency Made Simple

The Board Self-Heals — Keeping Your Workflow in Sync

Threlmark’s board isn’t just a static list; it’s a living, breathing structure that checks itself each time you look at it. It compares the list of files in `items/` with the order in `board.json` and repairs any discrepancies.

Suppose a card is deleted. The next time you open your board, that card automatically disappears from the list. If a new card appears in `items/`, it shows up in the right lane.

This self-healing design keeps your workflow accurate without manual updates or complex locking. It’s like a GPS that recalibrates every time you look at the map.

Sync and External Tools — Adding Flexibility and Power

Because all data lives as files, external tools can participate without special permission. Want to suggest a new task? Drop a JSON file into `suggestions/`. Want an AI to move a card to Done? It just edits the right file and saves it.

This openness means tools like IdeaClyst can plug right in, automate workflows, and even audit the entire project. You don’t need a custom API; the files speak for themselves.

Threlmark’s approach demonstrates how a simple file layout unlocks interoperability — the foundation for a flexible, extendable ecosystem.

Sync and External Tools — Adding Flexibility and Power
Sync and External Tools — Adding Flexibility and Power

Safety First: Atomic Writes and Tolerant Merge

Writing files atomically ensures data isn’t corrupted even if your computer crashes in the middle of an update. Threlmark’s code writes to a temporary file, then renames it over the original.

Plus, the system reads and merges changes carefully. It preserves timestamps, ignores unknown fields, and updates only what’s needed. This makes the data structure resilient to updates from multiple sources and future-proof against new features.

This disciplined approach keeps your data safe and compatible, much like saving a draft before publishing a blog post.

Putting It All Together: The True Power of Local-First

Threlmark’s architecture proves that making the disk the contract isn’t just a technical choice — it’s a product advantage. It delivers speed, control, and interoperability, all while keeping data safe and accessible.

In practice, this means you can build multi-device workflows, integrate external tools, and trust your data to be consistent without complex servers or lock-in. It’s a transparent, resilient, and flexible foundation.

As the local-first movement grows, Threlmark offers a clear example: make your data local, treat the disk as the API, and watch your system become more reliable, collaborative, and adaptable.

Frequently Asked Questions

What exactly does ‘disk is the contract’ mean?

It means the application’s core data lives on your device’s disk as plain files, which serve as the definitive source of truth. No server or database is needed for the system to function reliably.

How does Threlmark keep data consistent across devices?

Each change is written atomically to files, and the system reconciles differences on read. External tools can also directly modify files, making the entire process transparent and conflict-free.

What happens if I edit a file directly and then open Threlmark?

Threlmark reads the files, merges any changes, and updates the internal state. It preserves unknown fields, so manual edits won’t break future compatibility.

Can I use external tools to automate updates?

Absolutely. Because data is stored as files, tools like scripts, AI agents, or other integrations can read and write directly into the system without special APIs.

Is this approach suitable for all types of apps?

Local-first is ideal for collaborative, offline-capable apps with complex workflows. However, for real-time, large-scale distributed systems, additional layers may be needed.

Conclusion

When the disk becomes the contract, your software transforms from a fragile networked app into a resilient, offline-capable powerhouse. It’s a simple idea with profound implications: trust your storage, and everything else follows.

Next time you build or choose a tool, ask yourself — is the disk treated as the single source of truth? If so, you’re on the path to a smarter, more flexible future.

Putting It All Together: The True Power of Local-First
Putting It All Together: The True Power of Local-First
You May Also Like

The Power of Yet: Growth Mindset Quotes to Keep Going

Overcome setbacks with the power of “yet”—discover inspiring growth mindset quotes that will keep you going and unlock your true potential.

The Power of Hope: Real Examples of Hope Changing Outcomes

Greatly inspiring, “The Power of Hope” reveals how hope transforms lives—discover the surprising stories that demonstrate its true potential.

Laughter as Medicine: How Humor Can Be Incredibly Uplifting

Cure stress and boost happiness with humor—discover how laughter can be an incredible, uplifting medicine that transforms your well-being.

Why Helping Others Makes You Feel Stronger (Science + Soul)

Guided by science and soul, discover how helping others can boost your strength and transform your life in unexpected ways.