TL;DR
Threlmark’s local-first architecture places files on disk as the primary data source, enabling offline use, easy portability, and conflict-free collaboration. This approach reduces backend complexity and empowers user control.
Imagine working on a project, editing tasks, moving cards, and seeing updates instantly—without a cloud connection. That’s what Threlmark’s local-first approach promises. It flips the usual model—your device’s disk becomes the boss, not a server.
This article reveals how Threlmark’s simple yet powerful design makes local data the core, how it handles concurrency without locks, and why this setup simplifies building resilient, privacy-focused apps. If you’re curious about how putting the disk at the center changes everything, you’re in the right place.
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.
portable external SSD drive
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.offline project management software
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.
JSON file editor for Windows
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.
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.
local-first data synchronization tools
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.
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 your device’s filesystem as the single source of truth—every change is a file update.
- Use atomic writes and tolerant merging to keep data safe and consistent, even with interruptions.
- One file per item simplifies concurrency and conflict resolution, avoiding race conditions.
- Data portability is natural—just copy or sync your folder. No vendor lock-in.
- Design for offline, privacy, and resilience by prioritizing local storage as the core.
Why Threlmark’s ‘Disk Is the Contract’ Changes How You Build Apps
At its core, Threlmark treats the local disk as the single source of truth. No server, no cloud database. Files on your device are the record—simple, direct, and reliable.
This means every change is a file update, and the system works offline by default. When you reconnect, syncing is just file copying, merging, and conflict resolution. Think of your device as a miniature database, where the filesystem is the data fabric.
For example, a project’s task card is just items/123.json—more about file-based data management. Updating this file atomically ensures no partial writes. Deleting or editing a card is just replacing that one file. Other tools can read or write any file directly—no API, no lock-in.

How Threlmark Keeps Data Safe and Consistent with Files
Threlmark uses two key patterns to keep data safe: atomic writes and tolerant merging.
Atomic writes mean you never overwrite a file directly. Instead, you write to a temp file, then rename it. This guarantees that a crash won’t corrupt your data—either the old or the new file exists, never a half-written mess.
For example, when updating a task, the system creates items/123.json.tmp, writes your changes, then renames it to replace the original. It’s quick, safe, and plays well with interruptions.
On top of that, updates read the current file, merge patches, and preserve important fields like id and createdAt. Unknown fields are kept, so tools can evolve without breaking old files. This forward compatibility keeps your system flexible and future-proof.
One File Per Card: Why It Beats Big JSON Arrays
Many apps cram all tasks into one giant JSON array, but Threlmark does better: one file per item. This tiny shift makes a big difference.
Imagine you’re editing a task. Instead of reading a giant list, you just swap out that one file. No locks, no race conditions. Other tools can add, delete, or update cards at the same time without stepping on each other’s toes.
The self-healing board file, board.json, keeps track of the order of cards in each lane. When read, it reconciles against the actual files—any missing or extra files are automatically corrected. That means your view is always accurate, even if external tools make changes.
This approach makes the system highly concurrent and resilient. External tools or scripts can modify individual cards without risking corruption or conflicts.

Making Data Portable and Interoperable with Files
Threlmark’s architecture makes your data easy to move—just copy a folder or sync it with your favorite tools.
Because all data lives in plain JSON files, no vendor lock-in exists. You can back up, migrate, or share your entire project by copying a folder, syncing with Dropbox, or using git.
For example, if you switch to a new machine, just clone your folder or copy it over. Everything works exactly the same because the files are the contract.
This openness invites integration. Other tools can read or modify your data by just looking at the files, making collaboration across apps straightforward.
Sync and Conflict? Just Files and Merger Rules
Syncing in Threlmark isn’t about complex protocols. It’s about copying, merging, and reconciling files.
When two devices change the same card, the system compares the files. It uses simple rules: latest update wins, or user-defined merge logic. CRDTs or commit graphs can be layered for advanced conflict resolution, but the core is just file diffing and merging.
For example, if you edit a task on your laptop and your phone simultaneously, the system detects the conflict and applies a merge or prompts for manual resolution. The files themselves become the record of what changed.
This model scales well, is easy to reason about, and reduces hidden complexity common in traditional sync systems.

Privacy and Security: How Local-First Protects Your Data
With Threlmark, your data stays on your device unless you choose to sync. Files are inherently private—no central server storing your secrets.
If you add encryption, it’s end-to-end. Your files are encrypted at rest, and only your keys can decrypt them. This drastically reduces risks of breaches or leaks.
For example, sensitive project notes can stay encrypted locally, and only you hold the keys. When syncing, only encrypted blobs move around, keeping your privacy intact.
This model shifts the security paradigm: from trusting a central provider to controlling your own data security.
Why Developers Love It: Simplifying Backend and State Management
For developers, local-first means fewer backend headaches. No need to build and maintain complex APIs or databases. The app’s state lives in files, and sync happens in background.
This reduces server costs and simplifies deployment. Your app can work offline forever, then sync when online, with minimal code.
For example, Threlmark’s architecture lets you focus on features—local storage handles data safety, while the sync layer manages conflicts or collaboration.
It’s a shift toward lean, resilient apps that shift complexity away from the server and onto the client, which is often easier to test and debug.

Real-World Use Cases: From Personal Notes to Collaboration Tools
Many apps already embrace local-first principles—note-taking apps, task managers, even CRMs. Threlmark specifically targets multi-project workflows, making it ideal for solo creators and teams alike.
Imagine a designer working on multiple projects, switching devices, and always seeing the latest tasks—offline, fast, and private. Or a remote team syncing shared cards without a central server, reducing latency and data exposure.
By treating disk as the contract, these solutions stay responsive, resilient, and user-controlled. The architecture adapts from small personal apps to complex collaborative tools.
Tradeoffs and Challenges of Going Local-First
While powerful, local-first isn’t perfect. It can be tricky to handle complex conflict resolution for large-scale multi-user systems. Managing sync conflicts beyond simple rules may require extra tools like CRDTs or custom merge logic.
Performance can suffer if files get huge or the number of items skyrockets. Also, initial setup might seem daunting—understanding the file contract and ensuring atomic operations take discipline.
However, many of these challenges are manageable with good patterns and tooling, like Threlmark’s approach to self-healing and safe file writes.

Tools and Frameworks Supporting Local-First Architecture
Platforms like Threlmark [https://github.com/MeyerThorsten/threlmark] make adopting local-first straightforward. They provide patterns for file atomicity, conflict resolution, and data structure design.
Other tools include CRDT libraries, sync frameworks, and even cloud storage solutions that integrate seamlessly with local-first principles. Expo’s local-first guidance shows how mobile apps can benefit too.
Choosing the right tool depends on your project size, collaboration needs, and privacy requirements. But the core idea remains: treat your disk as the contract, and build from there.
The Future of Local-First: More Than Just Offline
Local-first isn’t just about working offline. It’s about giving users control, reducing backend dependency, and building resilient systems that last.
Thinking like this means apps can survive outages, hardware failures, or even shutdowns of the service provider. Your data stays with you, portable and safe.
As sync tech matures, expect more seamless multi-device experiences, better conflict resolution, and tighter privacy guarantees. The architecture is evolving from a niche to the mainstream.
Frequently Asked Questions
What exactly does ‘disk as the contract’ mean?
It means your app treats files on disk as the authoritative record of data. Changes happen directly to files, and all tools read/write those files without a central server. It simplifies sync, conflict resolution, and data ownership.
How does Threlmark handle conflicts when two devices edit the same card?
Threlmark compares file timestamps and applies simple rules—latest wins or manual merge. Advanced conflict resolution can involve CRDTs or commit graphs, but the core is just diffing and merging files.
Can I move my data easily if I switch devices or stop using Threlmark?
Absolutely. Because all data lives in plain JSON files, you can just copy the folder, sync it with Dropbox, or migrate with git. No vendor lock-in, no proprietary database.
Is local-first architecture suitable for large multi-user apps?
It can be, but it requires careful conflict management and possibly CRDTs for real-time collaboration. For small to medium teams, it offers great resilience and control.
What are the main challenges of building a local-first app?
Handling complex sync conflicts, managing large data sets, and ensuring user-friendly conflict resolution can be tricky. But with patterns like atomic file writes and self-healing, these challenges are manageable.
Conclusion
Threlmark’s approach proves that disk is more than just storage—it’s the contract that keeps your data safe, portable, and conflict-free. By making local storage the heart of your app, you build systems that are resilient, user-controlled, and ready for the future.
Next time you think about data architecture, remember: simplicity and directness often lead to the most powerful solutions. Your device can be the most trustworthy partner—if you let it.
