TL;DR

Threlmark’s architecture treats disk files as the real contract, making data portable, safe, and responsive. This local-first approach allows offline use, easy sync, and robust collaboration without relying on a central database.

Ever had a project management app crash or lose data because of server issues? Threlmark’s secret is its bold choice: the disk is the contract. Its system is built entirely around local files, turning traditional cloud reliance upside down. This isn’t just about saving data—it’s about making your entire workflow faster, safer, and more portable. When you understand how Threlmark treats files as the single source of truth, you’ll see a new way to handle complex projects with simplicity and resilience.

In this deep dive, I’ll show you how its architecture works, why it matters, and what benefits it brings. Plus, I’ll share practical tips on applying this approach to your own tools or workflows. Ready? Let’s go.

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
Seagate Portable 2TB External Hard Drive HDD — USB 3.0 for PC, Mac, PlayStation, & Xbox -1-Year Rescue Service (STGX2000400)

Seagate Portable 2TB External Hard Drive HDD — USB 3.0 for PC, Mac, PlayStation, & Xbox -1-Year Rescue Service (STGX2000400)

Easily store and access 2TB to content on the go with the Seagate Portable Drive, a USB external…

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

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
Music Studio 11 - Music software to edit, convert and mix audio files - Eight music programs in one for Windows 11, 10

Music Studio 11 – Music software to edit, convert and mix audio files – Eight music programs in one for Windows 11, 10

8 solid reasons for the new Music Studio 11!

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
EooCoo Digital Visual Timer 60-Minute Countdown (3-in-1) for Kids & Adults, Handy Time Management Tool, Classroom Essential, Ideal Back-to-School Teacher Gift - Fits Homeschool, Kitchen, ADHD Users

EooCoo Digital Visual Timer 60-Minute Countdown (3-in-1) for Kids & Adults, Handy Time Management Tool, Classroom Essential, Ideal Back-to-School Teacher Gift – Fits Homeschool, Kitchen, ADHD Users

Timer, clock, and alarm 3 in 1: as a regular clock, there are two display modes of 12/24…

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 disk files as the definitive source of your data, making backups and portability straightforward.
  • Use one file per item to avoid race conditions and improve concurrency safety.
  • Design your system to self-heal, reconciling layout and data on each load for consistency.
  • Prioritize offline-first workflows—local changes are instant, sync happens later, reducing delays.
  • Conflict resolution based on timestamps or versions keeps data safe when devices diverge.

Why Disk as the Contract Means No More Data Lock-In

Threlmark’s core idea is clear: the files on your disk are the real record of your work. No database, no cloud service, just plain JSON files. Imagine a folder filled with tiny, easy-to-read files—each one representing a task, a project, or a dependency. You can open, edit, or sync them with any tool.

This approach makes your data portable. Copy the folder, back it up, or share it via Dropbox—your project remains intact. It’s like having a universal passport for your data, avoiding vendor lock-in. Moreover, because the data is stored as simple files, it’s inherently transparent and accessible, allowing you to understand and modify your data outside the app if needed. This transparency fosters trust and flexibility, but it also shifts the responsibility to ensure data consistency and integrity across different environments. The tradeoff is that without a centralized database, managing complex relationships or large volumes of data might require additional handling, but for many use cases, the benefits of portability and simplicity outweigh these challenges.

Why Disk as the Contract Means No More Data Lock-In
Why Disk as the Contract Means No More Data Lock-In

How Threlmark’s Flat Files Make Concurrency Safe and Simple

Handling multiple edits without chaos is tricky. Threlmark’s trick? One file per item. Instead of a giant list prone to conflicts, each task or card lives in its own JSON file. When you edit a card, you overwrite just that file. This design minimizes the risk of conflicts because each change is isolated, and the system’s atomic write pattern guarantees that updates are either fully applied or not at all. This means no partial updates or corrupt data if a write is interrupted.

Why does this matter? Because in collaborative environments, conflicts are a major headache. By limiting each item to its own file, Threlmark reduces the surface area for conflicts, making concurrent editing safer and more predictable. The atomic write pattern further ensures that even if two devices attempt to modify different files simultaneously, the system remains consistent and recoverable. However, this approach does require careful conflict resolution strategies when multiple changes target the same file or when merging updates from different sources. The tradeoff is that this simplicity might not scale as well for extremely large datasets or highly interconnected data, but for typical project management workflows, it offers a robust balance between safety and simplicity.

The Self-Healing Board: How Threlmark Keeps Your Kanban in Sync

The lane layout is stored separately in a `board.json`. Every time you load the board, it reconciles with the actual files in `items/`. Missing cards are automatically restored, and the order aligns with the current set of files. This process ensures that the visual representation of your project remains consistent with the underlying data, even if files are added, moved, or deleted outside the app.

This self-healing design is crucial because it allows the system to recover from inconsistencies or accidental deletions without manual intervention. It effectively makes the visual layout a reflection of the current state of your files, not a static snapshot. This means your project view is always reliable, reducing confusion and errors, especially when working across multiple devices or with external tools. The implication is that your data and visual layout are tightly coupled through this reconciliation process, which enhances trustworthiness but also requires that the self-healing logic is robust enough to handle edge cases and conflicts gracefully.

The Self-Healing Board: How Threlmark Keeps Your Kanban in Sync
The Self-Healing Board: How Threlmark Keeps Your Kanban in Sync

Sync, Offline Mode, and How Data Moves Later

Threlmark’s architecture excels at offline-first workflows. Changes happen instantly on your device—no waiting for a server. When you reconnect, the system compares timestamps and merge strategies to sync updates across devices or with cloud storage. This incremental approach reduces the risk of conflicts and ensures that only the latest changes are propagated, maintaining data integrity and consistency.

The key here is that local modifications are immediately available and usable, even without internet. This means you can work seamlessly in remote locations or during network outages. When connectivity is restored, the app intelligently merges changes, resolving conflicts based on timestamps or versioning. This process minimizes data loss and ensures that all devices stay synchronized, but it also depends on effective conflict resolution strategies to handle simultaneous edits. The tradeoff is that managing sync logic adds complexity to the implementation, but the payoff is a highly resilient and flexible workflow that prioritizes user productivity and data safety.

Conflict Resolution: How Threlmark Handles Diverging Changes

When two devices make conflicting changes, Threlmark’s default is to preserve both updates—by merging or appending changes—rather than overwriting blindly. It uses timestamp labels and merge logic to keep data consistent, allowing for a transparent history of modifications. This approach reduces the risk of data loss and provides a clear audit trail, which is especially important in collaborative or offline scenarios.

Imagine editing a task on your phone while your laptop also updates its description. The system compares timestamps and intelligently combines the edits, attempting to preserve all user inputs. This merging process can involve simple last-write-wins strategies or more sophisticated conflict resolution rules, depending on the complexity of the data. The core idea is to prioritize data safety and transparency, ensuring that conflicting changes are resolved in a way that minimizes user frustration and maximizes data integrity. The tradeoff is that conflict handling adds complexity, but it’s essential for maintaining consistency in distributed, offline-capable systems.

Conflict Resolution: How Threlmark Handles Diverging Changes
Conflict Resolution: How Threlmark Handles Diverging Changes

Developer-Friendly Design: How Files Make Your App More Resilient

Working with files rather than a database shifts complexity from runtime to development and maintenance. Debugging becomes straightforward—you open a file, see the raw data, and understand exactly what’s stored. Restoring from backup is as simple as copying files, and schema migrations are less painful because you can version and modify individual files independently. This transparency reduces the risk of data corruption and makes recovery faster, especially in adverse scenarios like corruption or accidental deletion.

Moreover, this approach encourages modular design. Developers can add features by creating new file types or formats without overhauling the entire data structure. It also simplifies testing, as each file can be validated in isolation. The tradeoff is that managing consistency and relationships between files requires careful design, but the overall resilience and ease of debugging make this approach highly appealing for many applications.

Practical Tips for Building Your Own Disk-First App

If you want to follow Threlmark’s lead, start with these steps:

Practical Tips for Building Your Own Disk-First App
Practical Tips for Building Your Own Disk-First App
  1. Design your data as small, independent JSON files that encapsulate discrete pieces of information or entities.
  2. Use atomic write patterns—write to temporary files and then move—to prevent partial or corrupt data states.
  3. Separate layout or UI state from your core data, allowing it to be reconstructed or self-heal on each load.
  4. Implement conflict resolution strategies based on timestamps, versions, or hash comparisons to merge concurrent changes intelligently.
  5. Ensure your app reads, writes, and merges files consistently, with clear validation to prevent corruption or inconsistency.

What Can You Build with This Approach?

Any app that needs resilience, offline work, and flexibility can benefit. Think project management, note-taking, or collaborative tools. The key is that the data stays on the device first—syncing only when needed.

For example, a team using Threlmark-like architecture can continue working during internet outages, then sync effortlessly once reconnected. This simplicity makes it ideal for remote work, field data collection, or decentralized collaboration. The implications are significant: applications built this way are inherently more robust, easier to back up, and more respectful of user control over data. However, they require thoughtful design around conflict resolution, data validation, and synchronization logic to handle edge cases effectively. The tradeoff is that initial development might be more involved, but the long-term benefits include greater resilience and user autonomy.

Frequently Asked Questions

What does ‘disk is the contract’ really mean?

It means that the files stored on your device are considered the authoritative source of truth. The app reads, writes, and syncs these files directly, rather than relying on a remote database. This makes data portable and resilient.

How does sync work when I come back online?

Changes are saved locally on your device first. When you reconnect, the app compares timestamps and merge strategies to sync updates across devices or with cloud storage, ensuring everything stays consistent without conflicts.

What happens if two devices edit the same task differently?

The system uses timestamps and merge logic to combine changes, preserving both updates where possible. Conflicts are minimized, and your data remains transparent and safe.

Is using files instead of a database safer or riskier?

Using files can be safer because each change is atomic and easily recoverable. However, it requires careful conflict handling and validation. When done right, it offers resilience and simplicity over traditional databases.

Can I implement this approach in my app?

Absolutely. Start with small, independent JSON files, ensure atomic writes, and plan for conflict resolution. This pattern works well for apps needing offline support, resilience, and ease of backup.

Conclusion

In a world obsessed with cloud and central servers, Threlmark reminds us that simplicity often wins. By making the disk the contract, you gain resilience, flexibility, and control. Whether building your own tools or rethinking existing workflows, this approach invites you to put your data first—on your terms, on your device, always.

Next time you see a project or note app, ask: is the disk the contract? If not, maybe it’s time to rethink how your data is stored, managed, and shared. Because the future belongs to systems that keep your data close—fast, safe, and free.

You May Also Like

Using Kagi Search with Low Vision

A detailed report on how Kagi Search improves browsing for users with low vision through its clutter-free interface and customization features.

Stock market today: Dow clinches record high, S&P 500 and Nasdaq rise as stocks rebound on US-Iran peace hopes

The Dow Jones Industrial Average reached a record high today, with the S&P 500 and Nasdaq also gaining amid optimism over US-Iran peace negotiations.

The Surprising Lesson of the Granta Controversy

Granta’s publication of a story suspected of being AI-generated sparks debate on literary integrity and detection tools, highlighting the evolving challenge of AI in literature.

When a Content Network Starts Publishing to Itself

Discover how content networks turning inward reshape publishing, audience growth, and data use — and what it means for your strategy.