TL;DR

Threlmark’s architecture centers around storing all data as plain JSON files on disk, making it portable, inspectable, and offline-friendly. This approach simplifies sync, conflict resolution, and integration, shifting the focus from servers to files.

Imagine a project management tool that doesn’t rely on a cloud or a database. Instead, everything lives on your disk, in plain JSON files. It sounds simple, but it’s a radical shift from how most apps handle data.

Threlmark’s architecture proves that the disk itself can be the contract—making your data portable, safe, and always available, even offline. Today, you’ll see how this approach turns complexity into clarity and why it might just change how you think about managing work and collaboration. Learn more about Threlmark’s local-first architecture.

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
Contemporary Project Management (MindTap Course List)

Contemporary Project Management (MindTap Course List)

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 single source of truth by organizing data in a predictable folder structure of JSON files.
  • Use atomic write patterns to prevent corruption and facilitate safe, concurrent updates.
  • Store each project item as a separate file to enable conflict-free, granular editing.
  • Leverage offline-first design to work seamlessly without internet, syncing changes via file exchange.
  • Understand the tradeoffs: this approach excels for small to medium projects but may face challenges at scale.

Why Threlmark’s Disk-Based Design Changes Everything

At the heart of Threlmark’s approach is a simple truth: the files on your disk are the system’s source of truth. There’s no server, no database, just a structured folder of JSON files that tell the story of your projects. Discover more about local-first data management.

For example, every task card, project info, and dependency lives in its own file. When you open your app, it reads these files directly. When you make a change, it writes back atomically. This transparency makes debugging, migration, and collaboration straightforward.

By relying on the disk as the single source of truth, Threlmark reduces the complexity often associated with server-based or database-driven systems. It simplifies data synchronization, as the files themselves contain all necessary information, and makes version control and backups more straightforward. However, this approach also places greater importance on careful file management and conflict resolution, especially as projects grow larger or become more collaborative. The tradeoff is that while this model excels in simplicity and offline resilience, it can face challenges at scale, requiring thoughtful strategies for handling concurrency and large datasets.

Why Threlmark’s Disk-Based Design Changes Everything
Why Threlmark’s Disk-Based Design Changes Everything

How the File Layout Acts as a Contract for Everything

Threlmark organizes its data in a clear, predictable folder structure. At the root, you find a manifest file and dependency graph. Each project has its folder with metadata, lane order, and cards represented as individual JSON files. Explore how folder structures serve as data contracts.

For example, a card like “Finish report” is stored as items/abc123.json. External suggestions, handoffs, and reports go into dedicated folders. This structure isn’t just storage — it’s a contract everyone follows.

Because every artifact is a file you can cat, diff, or grep, debugging and migration become trivial. This transparency means that anyone with access to the folder can understand and modify the data directly, fostering better collaboration and easier troubleshooting. It also simplifies backup and migration processes, as you can move or restore the entire project state by copying a folder. Read more about file-based contracts.

Making File Operations Safe with Atomic Writes and Merging

Writing files might seem risky, but Threlmark uses atomic operations. Each save is a quick rename of a temp file, so crashes leave no half-written data. Learn about atomic file operations in local-first systems.

Updating a card isn’t rewriting the whole list. Instead, each card gets its own file, so multiple tools can edit different cards simultaneously without clashing. When the app reads a folder, it reconciles the current files, fixing any missing or outdated data.

This pattern makes the system robust. For example, if two devices update different cards, the conflict is local, and no data gets overwritten unexpectedly. However, this approach requires careful handling of conflicts and versioning. If two changes occur simultaneously on the same file, a conflict resolution strategy—such as last-write-wins or user prompts—must be implemented. The main tradeoff is that while atomic writes and per-item files greatly reduce corruption and conflicts, they necessitate additional logic to manage concurrent edits effectively, especially in collaborative environments with multiple users or devices.

Making File Operations Safe with Atomic Writes and Merging
Making File Operations Safe with Atomic Writes and Merging

Why One File Per Item Beats Big JSON Arrays

Many projects store a roadmap as one big JSON array. It’s easy to imagine, but it’s a disaster for concurrency. Threlmark avoids this by giving each task card its own file — items/.json. See how per-item files improve scalability.

This design allows external tools or scripts to edit individual cards without locking the whole list. When the app loads, it self-heals the lane ordering based on existing files. If a card is deleted or added, the lane list updates automatically.

In addition to improving concurrency, this approach significantly enhances the maintainability of the system. Developers and users can modify individual files without risking corruption of the entire dataset, and version control systems can track changes at a granular level. The main tradeoff is that managing hundreds or thousands of small files can become cumbersome if not properly organized or if the filesystem performance degrades. But overall, this per-item approach fosters a more flexible, scalable, and conflict-resistant environment compared to monolithic JSON arrays.

How Offline-First and Sync Make Threlmark Resilient

Threlmark works beautifully offline. Since all data is just files, you can open the app, make changes, and close it — no internet needed. When you’re back online, sync happens smoothly.

Sync isn’t about pushing data to a server. Instead, it’s about exchanging file diffs or copies between devices. If two devices edit the same card, Threlmark’s conflict resolution keeps versions intact, and the user can merge changes.

This design means that users are never blocked by connectivity issues, and data integrity is maintained through simple file exchanges. The tradeoff is that conflict resolution can become complex if multiple edits happen simultaneously on the same file, requiring robust merging strategies. Nonetheless, the offline-first approach ensures continuous productivity and data safety, even in environments with unreliable internet or in remote locations.

How Offline-First and Sync Make Threlmark Resilient
How Offline-First and Sync Make Threlmark Resilient

Conflict Handling Without a Database — What Really Happens

Conflict resolution is a core challenge in local-first systems. Threlmark’s approach is simple: if two devices change the same card, the last write wins, but the system keeps track of versions.

For example, if you rename a task on your phone and your laptop also edits it, Threlmark merges the changes, keeping both updates and alerting you if needed. It does this by comparing file timestamps and content hashes.

This method avoids complex merge algorithms, relying instead on a straightforward, transparent system that’s easy to understand and troubleshoot. However, this simplicity comes with tradeoffs — in high-collaboration scenarios, conflicts may require user intervention or more sophisticated merging strategies to prevent data loss. The key is that this method provides a clear, understandable conflict resolution process that aligns with the transparency of the file-based system, making it easier to diagnose issues and maintain consistency.

Developer Tips: Debugging and Extending Threlmark’s System

For developers, working with files is like having a live blueprint. To debug, open a JSON file, see its current state, and compare it to your last change. No mysterious APIs or opaque data stores.

If you want to extend Threlmark, just add new files or folders following the existing structure. The app will pick them up on next load. Need to fix a bug? Edit the JSON directly or write a script to automate changes.

This transparency reduces bugs and makes customizations straightforward. Plus, since the data is plain JSON, you can use your favorite tools — editors, VSCode, jq, whatever.

However, developers should be aware of the importance of maintaining the integrity of the folder structure and handling potential conflicts or corruptions proactively. Proper version control practices and validation routines can help ensure stability as the system grows or becomes more complex.

Developer Tips: Debugging and Extending Threlmark’s System
Developer Tips: Debugging and Extending Threlmark’s System

Tradeoffs: When File Storage Might Not Be Enough

While Threlmark’s approach offers simplicity and transparency, it’s not a one-size-fits-all. Large datasets, high concurrency, or real-time collaboration can strain a file-based setup.

For example, if you have thousands of cards updating simultaneously, the system might slow down due to filesystem limitations or increased complexity in conflict resolution. Similarly, complex queries or transactional operations—like aggregating data or performing batch updates—are harder without a dedicated database engine that supports indexing and atomic transactions.

In such cases, hybrid solutions — combining local files with a backend database or server — may be necessary to handle scale and complexity effectively. But for many small to medium projects, this architecture offers an elegant balance of simplicity, resilience, and control.

Getting Started with Threlmark — Your Next Step

Want to see Threlmark in action? Visit their GitHub repository and try it out. It’s a Next.js app that reads and writes JSON files directly from your disk.

Start by cloning the repo, setting the environment variable for your data directory, and experimenting with creating and moving cards. Once you see how straightforward it is, you’ll understand why this design is so powerful.

For more details, check their official website or Thorsten Meyer AI for deep dives into the architecture.

Frequently Asked Questions

What does ‘Disk is the contract’ really mean?

It means the on-disk JSON files are the definitive source of truth for the app. All data, structure, and state are stored directly on your disk, making the system transparent and easy to manage.

How is this different from using a traditional database?

Instead of a server or database, data lives in individual files you can inspect and manipulate directly. This makes the system more resilient offline and easier to back up or migrate.

Why choose JSON files over SQL or NoSQL stores?

JSON is simple, readable, and portable. It requires no special setup or dependencies, and makes debugging and manual editing straightforward.

How does sync work when the app reconnects?

Sync involves exchanging file differences or copies between devices. Changes are merged based on timestamps and hashes, ensuring consistency without a central server.

Is this approach safe or risky?

When implemented with atomic writes and conflict management, this approach is very safe. However, very large datasets or high concurrency might require more robust solutions.

Conclusion

Threlmark’s architecture proves that simple, transparent file-based storage isn’t just nostalgic — it’s powerful. When you treat the disk as the contract, you gain control, portability, and resilience.

Imagine a future where your project data is always accessible, editable, and safe, no matter where you are. That future starts with a single file, a simple idea, and a bold choice.

Getting Started with Threlmark — Your Next Step
Getting Started with Threlmark — Your Next Step
You May Also Like

Large Language Models as Coding Assistants: A Deep Dive

Navigating the capabilities and limitations of large language models as coding assistants reveals transformative potential and important considerations you won’t want to miss.

How AI Automation Is Transforming IT Operations

Lifting IT operations to new heights, AI automation is revolutionizing efficiency and security—discover how it can transform your organization today.

Build vs Buy a Prebuilt AI Workstation

Struggling to choose between building or buying a prebuilt AI workstation? Discover the real costs, performance, and support differences to make the right call.

Beyond Basics: Advanced Container Orchestration (K8s and Beyond)

Beyond basics, explore advanced container orchestration techniques that enhance security, resilience, and multi-cloud management—discover how these innovations can transform your infrastructure.