TL;DR

Threlmark’s local-first design makes the disk the ultimate record, allowing offline use, easy sync, and multi-device collaboration without complex databases. It’s about simplicity, portability, and control.

Imagine working on your project roadmap during a flight, without Wi-Fi. Learn more about offline productivity tools. Changes you make are instantly saved locally, and when you reconnect, everything syncs seamlessly. That’s the core idea behind Threlmark’s approach: the disk is the contract.

This architecture flips traditional client-server models on their head. Instead of relying on a central database, every file on your disk becomes part of a living, portable record. It’s a simple, powerful way to keep your work safe, accessible, and flexible—no matter where you are or what device you’re using.

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
Local AI with VS Code: Mastering Private, Offline LLM Development: Run Open-Source Models Securely with Ollama, Continue, Llama.cpp, and Zero-Cloud Extensions – Keep Your Code and Data 100% Private

Local AI with VS Code: Mastering Private, Offline LLM Development: Run Open-Source Models Securely with Ollama, Continue, Llama.cpp, and Zero-Cloud Extensions – Keep Your Code and Data 100% Private

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
Samsung T7 Portable SSD, 1TB External Solid State Drive, Speeds Up to 1,050MB/s, USB 3.2 Gen 2, Reliable Storage for Gaming, Students, Professionals, MU-PC1T0T/AM, Gray

Samsung T7 Portable SSD, 1TB External Solid State Drive, Speeds Up to 1,050MB/s, USB 3.2 Gen 2, Reliable Storage for Gaming, Students, Professionals, MU-PC1T0T/AM, Gray

MADE FOR THE MAKERS: Create; Explore; Store; The T7 Portable SSD delivers fast speeds and durable features to…

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
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.

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
Local Data Storage in Kotlin: Managing Databases in Android Environments (The Android Developer's Playbook)

Local Data Storage in Kotlin: Managing Databases in Android Environments (The Android Developer's Playbook)

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 the disk as the ultimate source of truth to simplify sync and increase reliability.
  • Use one file per item to avoid race conditions and make external updates safer.
  • Atomic file operations prevent corruption even during crashes or power failures.
  • Regular self-healing of project views keeps your data consistent without manual intervention.
  • A plain JSON file system makes your data portable, accessible, and easy to integrate.

What does ‘disk is the contract’ actually mean?

“Disk is the contract” means your app’s source of truth is stored directly on your device’s disk. When you save a card or update a roadmap, those changes land in JSON files sitting right there on your computer or phone. This isn’t just a backup—it’s the system’s heartbeat.

By anchoring the data directly to your disk, the system ensures that what you see is always the most current and authoritative version. This approach reduces reliance on external servers or cloud services, which can introduce latency, outages, or synchronization conflicts. You can explore related concepts in local-first architecture. Instead, your device becomes a self-sufficient unit, capable of functioning fully offline. The tradeoff is that without a central server, you need to manage synchronization explicitly—using tools or processes you control. But this tradeoff grants you greater control, privacy, and simplicity, especially for users who prefer or require offline access.

What does ‘disk is the contract’ actually mean?
What does ‘disk is the contract’ actually mean?

How does local-first design improve your workflow?

Local-first design means you can work offline without missing a beat. Changes happen instantly on your device, and syncing occurs in the background, often automatically. For more on local-first systems, see this detailed article. This setup minimizes disruptions, reduces dependency on network quality, and speeds up your workflow because you’re not waiting for remote servers to respond.

Imagine a developer on a plane: they update a task, add new ideas, and organize their roadmap—all locally. When they land and reconnect, Threlmark seamlessly syncs these changes across devices. This approach not only enhances productivity but also ensures data resilience. If a device fails or loses connection, work isn’t halted; it’s still safe locally, ready to sync once online. The tradeoff is that managing conflicts and ensuring consistency requires careful design, but the benefit is a more robust, flexible workflow that’s less vulnerable to outages or server failures.

Why is a file-per-item approach better than a big JSON list?

File-per-item Single JSON list
Atomic updates prevent conflicts. Each card can be edited independently, reducing the risk of overwriting others’ changes and making conflict resolution more straightforward. Updating one item risks overwriting others, especially if multiple devices are involved. Race conditions become more likely, leading to potential data loss or inconsistency.
Easy to drop or update a single card without reading the whole list, which improves performance and reduces complexity when working with large datasets. Requires reading, merging, and rewriting the entire list for each change, which can be slow and error-prone as data grows.
Collision-free with atomic `rename()` writes ensures each update is safe and consistent, even when multiple processes modify files simultaneously. Collisions can corrupt data if multiple writers happen at once, making manual conflict resolution necessary and complicating synchronization.
Self-healing board state. When files are added, removed, or reordered, the system can automatically reconcile discrepancies, maintaining consistency without manual effort. Manual reconciliation is often needed if files go missing or become out of sync, which can be tedious and error-prone.

Choosing a file-per-item model means your system is more resilient, easier to scale, and better suited for multi-user environments. Discover more about local-first data management. It reduces the complexity of conflict resolution and makes external modifications safer, enabling smoother collaboration and integration.

Frequently Asked Questions

What does ‘disk is the contract’ mean in practice?

It means your app’s data lives directly on your device’s disk as JSON files. Changes are saved locally, and the files serve as the definitive record, simplifying sync and avoiding reliance on centralized databases.

How does Threlmark handle conflicts when two devices edit the same card offline?

Threlmark’s file-per-item approach minimizes conflicts by isolating changes to individual files. When conflicts do occur, the system defaults to last-writer-wins, but you can implement custom merge strategies. This design reduces the risk of data corruption and makes conflict resolution more manageable, ensuring that your data remains consistent and trustworthy even in complex multi-device scenarios.

Is local-first architecture more reliable than cloud-based systems?

Yes, because it allows continuous work without network dependency. Your data remains accessible and consistent, even during outages. Sync happens in the background, making your workflow more resilient and giving you greater control over your data. While cloud systems can offer additional redundancy, the local-first approach prioritizes immediate access and independence, which can be crucial in many workflows.

How do external tools participate in this setup?

Since all data is plain JSON, any tool that can read or write JSON can interact with your project files. Learn how to extend your workflow at Spectralore. This openness fosters automation, integration, and experimentation—whether you’re scripting cleanup, importing data, or building custom views. It empowers you to extend and adapt your system without vendor lock-in or proprietary formats.

Conclusion

When you treat the disk as the contract, you gain a system that’s simple, resilient, and flexible. For more insights, visit LookAtWorth. It puts control back into your hands—no server required.

Imagine your data as a set of well-behaved files, always honest and ready to move with you. That’s the core insight behind Threlmark’s approach. Now, ask yourself: what if your next project was built on this kind of trust?

Why is a file-per-item approach better than a big JSON list?
Why is a file-per-item approach better than a big JSON list?

You May Also Like

Why Some Batteries Recover Better After Rest Than Others

Getting better battery recovery after rest depends on internal chemistry and wear, revealing why some batteries bounce back more effectively.

Load Test vs Conductance Test: Which One Actually Catches Weak Batteries?

More accurate battery assessment methods reveal true weaknesses, but understanding their differences is key to avoiding unexpected failures; discover which test truly catches weak batteries.

The Science Behind Battery Cycle Life and Depth of Discharge

How understanding battery cycle life and discharge depth can impact your device’s longevity might surprise you.

State of Charge Lies: Why Voltage Charts Mislead LiFePO4 Owners

Curious why voltage charts can deceive LiFePO4 owners? Discover the hidden factors that make voltage an unreliable indicator of battery health.