TL;DR

Threlmark treats local disk storage as the definitive source of truth, avoiding traditional databases. This approach simplifies sync, enhances offline usability, and makes data portable across tools, all while keeping the system easy to inspect and extend.

Imagine a world where your project management tool doesn’t rely on a cloud server or a proprietary database. Instead, it operates directly on plain files stored on your disk—simple, resilient, and portable. This is the core idea behind Threlmark’s local-first architecture, which treats your disk as the ultimate contract for your data. No middleman, no lock-in, just your files and your workflow.

In this article, you’ll see how this design choice shapes everything from concurrency handling to integration with external tools. You’ll learn why making disk the single source of truth can lead to faster, more reliable, and more flexible systems—without sacrificing safety or interoperability.

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
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 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 ultimate source of truth—no need for a database or server.
  • Use one file per item and atomic writes to prevent data corruption and race conditions.
  • Design directory structures as explicit contracts to improve interoperability and clarity.
  • Implement self-healing mechanisms to keep your project views in sync with data.
  • Leverage local-first principles to build fast, offline-capable, and flexible tools.

Why Making Disk the Main Contract Changes Everything

Threlmark’s core idea is simple but powerful: your disk is the contract that defines your entire system. Instead of a database, every piece of data lives in a file. This means your data remains accessible, readable, and portable—no vendor lock-in. Imagine editing a card in a project with just a text editor, then seeing that change reflected everywhere.

Take a typical project tool. When it crashes or loses connection, you’re stuck. With Threlmark, you keep working—your files stay in sync, and the system is resilient. This approach transforms how you think about data persistence and collaboration.

**Implication and Tradeoffs:** This method shifts the complexity from managing a centralized database to ensuring the integrity and consistency of individual files. While it simplifies deployment and enhances portability, it requires careful handling of concurrent edits and merge conflicts. Developers must design mechanisms like atomic writes and tolerant merging to prevent data corruption, which can introduce new challenges but ultimately lead to a more transparent and flexible system.

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

How Threlmark Keeps Data Safe with Files

Using files directly sounds risky. But Threlmark employs two smart patterns to keep data safe—atomic writes and tolerant merge. Atomic writes mean every update first goes to a temporary file, then renames over the original, preventing corruption if something crashes mid-write. You can learn more about atomic file operations. Think of it like sealing a letter before dropping it in the mailbox.

For updates, Threlmark reads the current file, merges changes carefully, and preserves essential fields like IDs and timestamps. It tolerates missing or unknown data, making upgrades smooth. This method keeps your data consistent, even with concurrent edits or external tools. For more on managing concurrent file access, see this resource.

**Implication and Tradeoffs:** These safety techniques ensure data integrity without locking the entire system. However, they require additional logic to handle merges and conflict resolution. This increases complexity but offers a resilient architecture that can gracefully handle external interference or unexpected failures, making it suitable for real-world, multi-tool environments.

One File per Item: How It Prevents Collisions and Keeps Things Simple

Instead of updating one big JSON list, Threlmark assigns one file per card. This tiny shift avoids race conditions and simplifies concurrency. If two tools edit different cards, they won’t clobber each other. When a card moves or changes, only its file updates.

Plus, the system self-heals: the lane order isn’t stored as a giant list but is reconstructed by reading individual item files. It’s like having a conversation where each participant updates their own part without interrupting others.

**Implication and Tradeoffs:** This approach greatly reduces the risk of conflicts during simultaneous edits, as each file is an isolated unit. It also simplifies recovery—if a file is corrupted or missing, the system can reconstruct state from other files. However, managing many small files can introduce filesystem overhead and complexity in maintaining consistent relationships between files. Developers must carefully design their directory structure and update logic to balance granularity and performance.

One File per Item: How It Prevents Collisions and Keeps Things Simple
One File per Item: How It Prevents Collisions and Keeps Things Simple

The Directory Layout as a Contract — What It Tells You About Your Data

Threlmark’s directory isn’t just a random collection of files. It’s a formal contract that dictates how data is organized and accessed. Read more about directory structures and data contracts at this site. At the root, you find the main manifest and dependency graph. Each project has its folder with metadata, lane order, and individual cards.

This setup makes everything transparent. You can open any file, see the current state, or edit it manually. External tools can join in by reading and writing files—no special permissions needed.

**Implication and Tradeoffs:** By establishing a clear directory structure, Threlmark effectively creates an explicit protocol for data interaction. This transparency fosters extensibility and interoperability but also requires that all tools adhere to the agreed-upon format. Misalignment or manual edits can introduce inconsistencies if not carefully managed, so understanding and respecting this contract is essential for maintaining system integrity.

Making File Operations Safe and Reliable

File safety isn’t automatic. Threlmark relies on two disciplined practices: atomic writes and merge-aware reading. Atomic writes, as mentioned, use temp files and `rename()`. For reading, it merges incoming changes with existing data, ignoring unknown fields, which keeps compatibility with future updates.

For example, updating a task involves reading its file, merging in your changes, and writing back atomically. This pattern prevents corruption and race conditions, even when external tools or multiple devices are involved.

**Implication and Tradeoffs:** These safety practices are critical for maintaining data integrity in a disk-centric system. They require disciplined development practices and careful handling of file I/O operations. While they introduce some complexity, they ensure robustness against crashes, external interference, or concurrent modifications, which are inevitable in real-world scenarios.

Making File Operations Safe and Reliable
Making File Operations Safe and Reliable

How Threlmark’s Self-Healing Board Keeps Your Roadmap Accurate

The project board is a living document that constantly reconciles itself. When you read the lane order, Threlmark cross-checks it against existing item files, removing any that are missing or invalid. This ensures the visual roadmap always matches the actual data on disk.

Imagine dragging a card out of view—that change is reflected immediately, and the board stays consistent without manual cleanup.

**Implication and Tradeoffs:** The self-healing mechanism enhances reliability by automatically detecting and correcting inconsistencies. However, it relies on the assumption that the underlying files are mostly correct and that discrepancies are infrequent. In scenarios with frequent manual edits or external interference, this process might need tuning or additional safeguards to prevent accidental data loss or inconsistency.

Practical Benefits: Speed, Offline Use, and Tool Integration

With the disk-as-the-contract approach, Threlmark offers blazing-fast interactions. No waiting for network responses. You can work offline, and your data is always ready. Syncing across devices becomes a matter of copying files or letting external tools handle these changes.

For instance, you could edit a card in a text editor, and the system will pick up the change when you refresh. External tools like IdeaClyst can participate without special permissions—just read and write files.

**Implication and Tradeoffs:** These benefits demonstrate how a disk-based approach can outperform traditional database-driven systems in speed and flexibility. However, it also shifts the responsibility to the user or developer to manage synchronization and conflict resolution externally. This tradeoff favors simplicity and control but requires discipline and awareness of potential conflicts during concurrent editing.

Practical Benefits: Speed, Offline Use, and Tool Integration
Practical Benefits: Speed, Offline Use, and Tool Integration

What You Can Do With a Disk-Centric System Today

Tools like Threlmark demonstrate that treating disk as the source of truth isn’t just theoretical. You can backup your entire project simply by copying files. You can integrate with other editors or automation scripts—anything that can read/write files.

Want to build your own? Start by organizing your data into small, atomic JSON files, and use atomic write techniques. Keep your directory structure clear and consistent. It’s a flexible foundation for any local-first app.

**Implication and Tradeoffs:** This approach empowers you with simplicity and control, enabling straightforward backups and integrations. Yet, it also means you must carefully design your file structure and handle synchronization logic manually. The tradeoff is between simplicity and the potential for manual management overhead, which can be mitigated with good practices.

Frequently Asked Questions

How does Threlmark handle concurrent edits from multiple tools?

Threlmark uses one file per item and atomic write operations. This design prevents conflicts because each tool updates only its assigned file, and `rename()` ensures safe, collision-free saves even with multiple sources editing simultaneously.

Can I manually edit my project files without breaking anything?

Absolutely. Because the system is designed to tolerate unknown fields and preserve data during merges, manual edits are safe—just follow the established directory structure and format.

How does sync work across devices?

Syncing is as simple as copying or syncing the files via Dropbox, Syncthing, or your preferred method. Changes are immediately reflected because each device reads and writes its own files, making the system inherently offline-friendly.

Is this approach suitable for real-time collaboration?

It can support real-time collaboration if combined with continuous sync and conflict resolution strategies. But it’s especially powerful for asynchronous workflows, where changes propagate via file sharing.

Conclusion

Making disk the contract flips traditional data management on its head. It’s like building a system where your files, not a database, are the foundation—simple, reliable, and endlessly portable. If you want a resilient system that works offline and plays well with external tools, this approach isn’t just smart; it’s essential.

Start small. Organize your data into atomic files, trust your filesystem, and watch how your projects become more flexible and robust. The future of local-first software is here—are you ready to make your disk the contract?

You May Also Like

Corporate AI Agents Are Becoming Big Tech’s New Competitive Weapon.

What makes corporate AI agents the newest game-changer for big tech’s competitive edge? Discover how they are transforming industries and redefining innovation.

AI Coding Tools Broke the Software Pricing Model — Most Companies Haven’t Noticed Yet

Discover how to choose the right software pricing model to boost sales, maximize value, and stay competitive in 2024. Practical tips included!

The Freelance Hustle in the AI Age: How Gig Workers Use and Compete With AI

Just as AI transforms freelance work, understanding how gig workers leverage and compete with these tools is essential to staying ahead in the evolving landscape.

The Rise of Vibe Coding: A New Paradigm in Human–AI Collaboration

Greatly transforming software development, vibe coding introduces a new human–AI collaboration that promises to redefine how we create applications—discover how it unfolds.