TL;DR
Threlmark’s architecture centers on storing data directly on disk, making it the single source of truth. This design supports offline use, simplifies sync, and enhances privacy, fundamentally changing how apps handle data across devices.
Ever try explaining your project’s state with a tangled web of cloud services, databases, and APIs? What if the simplest, most reliable solution was just a folder full of JSON files on your disk? That’s the core idea behind Threlmark’s local-first architecture. It treats disk as the ultimate contract, making data accessible, portable, and safe without relying on a central server.
You’ll learn how this approach flips the traditional model, why it’s a game-changer for offline work and privacy, and how it enables powerful automation with AI agents. Ready to see how a simple folder can become a robust, multi-device command center? Let’s unpack the mechanics behind Threlmark’s elegant design.
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.
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.
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.

SANDISK 2TB 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-2T00-G25
- High-speed NVMe Performance: Up to 1050MB/s read, 1000MB/s write
- Durable and Water-resistant: IP65 rated, 3-meter drop protection
- Portable and Secure: Includes carabiner loop for attachment
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.
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.
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.
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.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.
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.
POST /api/projects/:id/
items/:itemId/reportDirect call. Applied immediately.
drop reports/.json
→ ingested on read Robust even if the server’s down at finish time.
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.
Static read-only demo
Seeded data, writes to localStorage. Try-before-you-clone.
Personal Node instance
Password-gated, persistent backed-up THRELMARK_DATA_DIR.
Multi-tenant SaaS
Add accounts + per-tenant isolation. A separate build.
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.
Key Takeaways
- Treat disk-based JSON files as the definitive source of truth, making data portable and lock-free.
- Use file-per-item architecture to prevent race conditions and simplify updates and conflict resolution.
- Leverage background sync tools like Syncthing or Dropbox to handle multi-device updates seamlessly.
- Design your app to read, merge, and write files atomically to ensure safety and consistency.
- Prioritize local ownership and privacy, with sync as a background process—never the core dependency.
Why ‘Disk Is the Contract’ Means Your Data Is Always in Your Hands
In Threlmark, the disk is the single, authoritative source of truth. The app’s entire state lives in plain JSON files stored on your local machine, not in a remote database. This means that your data’s integrity and consistency are directly tied to the state of these files. If you think about it, this approach decentralizes control—your data isn’t locked behind a server or a proprietary API. Instead, it’s right there in your control, making it inherently more resilient against network failures or server outages.
This design also simplifies understanding data flow. You can open the folder, see all your files, and know exactly what the app considers the current state. Changes made directly to these files are immediately reflected in the app once reloaded, and vice versa. The implication? Less complexity, fewer points of failure, and a more transparent data model. For more on this approach, see how Threlmark’s files make data portable and lock-free.

How Threlmark’s Files Make Data Portable and Lock-Free
Threlmark organizes data as individual files—each card, project, or suggestion gets its own JSON file. This modular approach allows for granular control over data, making it easier to update or revert specific parts without affecting the entire dataset. It also prevents race conditions that often occur in monolithic JSON arrays, where simultaneous edits can corrupt data or cause conflicts.
By storing each item separately, the system becomes inherently lock-free: multiple processes or devices can read or write individual files independently, without waiting for a central lock or risking a conflict cascade. This architecture enables seamless portability—simply copy the folder or sync it via cloud services like Dropbox or Syncthing, and the data remains consistent and usable across devices. The tradeoff here is that managing many small files can become complex at scale, requiring good organizational practices and robust conflict resolution logic, but the benefits in safety, simplicity, and flexibility often outweigh these concerns for most use cases.
Why Local Storage Outranks Cloud for Reliability and Privacy
When your data lives on disk, it’s always under your control—this fundamental shift has deep implications for trust and security. Learn more about the benefits of local storage at leadermenu.com.
Offline work becomes effortless because your data is always accessible, regardless of internet connectivity. When you do connect, synchronization happens transparently in the background, using established tools like Syncthing or Dropbox. This design supports privacy by default—your data isn’t stored on third-party servers unless explicitly shared—and minimizes the risk of unauthorized access. The tradeoff is that you must manage your sync processes, but this tradeoff favors transparency, security, and user sovereignty over convenience alone.

How Sync Becomes a Background Task — Not the Core of Your App
In Threlmark, sync isn’t a complex, real-time operation managed by a central server. Instead, it’s a background process that copies files between devices or services, leveraging existing sync tools like Syncthing or Dropbox. For more insights into sync strategies, see how sync becomes a background task.
This approach shifts the developer’s focus from building and maintaining real-time sync infrastructure to ensuring reliable file operations. It reduces bugs and makes multi-device use more predictable. The tradeoff is that sync isn’t instant; there’s a slight delay depending on the sync tool’s schedule, but this is often acceptable given the robustness and simplicity it provides. This method also makes offline edits and asynchronous workflows more natural, as the system gracefully handles conflicts and merges at the file level.
Resolving Conflicts and Merging Changes Without a Server
When two devices modify the same file offline, Threlmark employs intelligent merge logic that preserves both versions, preventing data loss and confusion. To learn more about conflict resolution, see resolving conflicts and merging changes without a server.
For example, if you and a colleague edit the same task offline on different devices, once synced, you’ll see both versions available. This setup allows you to merge changes manually or decide which version to keep, thus providing flexibility and transparency. It also minimizes the risk of corruption: since each file is atomic, partial writes or interruptions won’t leave your data in an inconsistent state. The tradeoff is that conflict resolution requires user intervention, but this is often preferable to silent overwrites or complex conflict resolution algorithms in traditional databases.

How Threlmark Supports Multi-Device Continuity and Offline Work
Imagine working on your projects seamlessly across multiple devices with multi-device continuity and offline work.r project at home, then hopping on a train. Threlmark’s local-first design means your data is always available—no internet required. When your devices sync, their changes merge seamlessly, keeping your roadmap consistent across platforms. This is possible because each device maintains its own local copy of the data, and sync tools handle the reconciliation.
For instance, a developer in New York and a designer in Tokyo can update shared cards offline. When they reconnect, the sync process automatically detects and merges changes, resolving conflicts based on timestamps or user preferences. This approach ensures continuous productivity without the need for constant online connectivity. It also reduces the risk of data loss or conflicts—since each device works independently, and sync acts as a gentle, conflict-resolving layer over the local files—making offline work and multi-device continuity both reliable and user-friendly.
Practical Tips for Building with Disk as the API
- Use atomic `rename()` for all file writes to prevent corruption, ensuring that each update replaces a file atomically so that incomplete writes don’t leave corrupt data.
- Organize each item in its own JSON file for easy, lock-free updates, and to facilitate granular conflict resolution and merging.
- Keep your folder structure predictable—separate active, shared, and archived items—to simplify access and management, especially as the dataset grows.
- Leverage existing sync tools—Dropbox, Syncthing—for background synchronization, allowing you to rely on proven, robust solutions rather than building custom sync protocols.
- Implement tolerant read-merge logic to preserve unknown fields and ensure forward compatibility, so your app can evolve without risking data loss or corruption from schema changes.
The Big Benefits: Simpler, Safer, and More Flexible Apps
By making disk the contract, Threlmark simplifies your app’s backend and boosts privacy. No more complex server setups or cloud vendor lock-in. Plus, your data becomes inherently portable—move it, back it up, or share it with ease.
This design also reduces bugs—less in-memory state, fewer race conditions, and straightforward conflict resolution. It’s like treating your disk as a living, breathing API that you can always trust. The simplicity of this approach means developers can focus more on features and less on managing complex data synchronization and consistency issues, leading to more reliable and maintainable applications.
Frequently Asked Questions
What exactly does ‘disk is the contract’ mean?
It means that the local files stored on your device serve as the primary, authoritative source of data. The app reads from and writes to these files directly, making the entire system simple, portable, and resilient.How does Threlmark handle data sync across devices?
Sync is treated as a background task that copies files between devices using tools like Syncthing or Dropbox. Since the data is stored in individual files, sync remains straightforward, conflict-aware, and conflict-resolving.What happens if two devices modify the same card offline?
Threlmark uses file-based merge logic, preserving both versions of a conflicting file. This makes conflict resolution transparent and offers the user flexibility to manually merge later.Is this approach secure and private?
Yes. Your data stays on your device, encrypted if needed, and only syncs when you choose. No third-party server ever holds your raw data, giving you full ownership and control.Can I still collaborate with others using this system?
Absolutely. Since the data is just files, sharing and collaboration happen through standard sync tools. Conflict resolution is handled gracefully, making real-time or asynchronous teamwork possible.Conclusion
Threlmark’s architecture shows that the simplest, most reliable data contract is the disk itself. When your app treats local files as the source of truth, you gain resilience, privacy, and flexibility that cloud-centric systems often can’t match. The next time you build a tool, consider how a folder full of JSON might be all you need to run a powerful, multi-device, offline-capable app.
In the end, the disk isn’t just storage. It’s the contract—your foundation for trust, portability, and control. Why settle for cloud dependency when your data can live right where you do: on your disk?