TL;DR
Threlmark’s design hinges on the idea that the disk is the single source of truth. Its file-based approach makes data portable, safe, and offline-ready, empowering users and tools alike without a central server.
Imagine a project management tool that forgets the cloud. It keeps everything on your local disk, and every change you make instantly becomes part of your own, unbreakable record. That’s what Threlmark does. It flips the usual cloud-first idea on its head, making your device the true home for your data.
Why does this matter? Because in a world obsessed with servers, Threlmark shows that simplicity, control, and resilience come from keeping your data close. In this deep dive, I’ll explain how its architecture works—from the on-disk layout to the safe, atomic file writes—and why it’s a game-changer for local-first software.
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.

The Phoenix Project: A Novel about IT, DevOps, and Helping Your Business Win
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.
Expanding File Folder/Accordion File Organizer/Portable File Box with 13 Pockets,Fun Storage Filing Folders with Handle,Perfect for Both Standing and Carrying,A4/Letter Size,Colored Tabs,Black Matte
【Super Portable and Secure Closure】: Compared with other bottom expandable accordion folders, a handle is added, which makes…
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.

REXBETI 25Pcs Metal File Set, Premium Grade T12 Drop Forged Alloy Steel, Flat/Triangle/Half-round/Round Large File and 12pcs Needle Files with Carry Case, 6pcs Sandpaper, Brush, A Pair Working Gloves
all the 16 pieces file are made by T12 Drop Forged Alloy Steel, the long lasting teeth were…
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.

TANDBERG DATA Overland-Tandberg RDX HDD 5TB Cartridge (Single)
Use RDX Manager software and RDX systems to securely encrypt business data, with support for FIPS 140-2 validated…
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 disk as the true source of data, making everything inspectable and portable.
- Use atomic file writes to prevent corruption, especially in concurrent environments.
- Design each item as a separate file to simplify conflict resolution and updates.
- Allow your system to self-heal by reconciling metadata and state on each read.
- Keep the architecture simple: no database, no server lock-in, just plain files.
Why the disk is the ultimate contract for your data
In Threlmark, the disk isn’t just storage. It’s the single source of truth. Every file, from the manifest to individual cards, is part of a transparent, inspectable system. This means no secret databases, no hidden APIs.
Take a simple example: when you add a task to your roadmap, Threlmark creates a JSON file in the items/ folder. Each task lives on your disk, and the app just reads, writes, and updates these files. You can open them with any editor, see exactly what’s stored, and even hand-edit if needed. This transparency makes the data incredibly resilient and portable.
Why does this matter? Because it puts control back into the hands of users and developers. When data is stored as plain files, you’re not locked into a vendor’s proprietary system. You can migrate, back up, or verify your data independently. However, this approach also means that consistency and integrity depend heavily on how well the system manages concurrent edits and failures—so the onus is on implementing reliable file operations and conflict resolution strategies.

How Threlmark keeps data safe with atomic file writes
Atomic writes aren’t just a technical detail—they’re a safeguard that ensures your data isn’t corrupted during unexpected interruptions. Threlmark’s implementation of atomic file writes involves writing data to a temporary file first, then atomically renaming it over the original. This process guarantees that at no point is there a partially written or inconsistent file visible to the system or the user.
Consider a scenario where your laptop suddenly loses power during a save. Without atomic writes, the original data might be left in an inconsistent state, risking data loss or corruption. With atomic operations, the system either completes the entire write or leaves the old file untouched, preventing corruption. While this adds a slight overhead—writing twice and renaming—it pays off by dramatically increasing data reliability, especially in environments prone to interruptions or crashes. The tradeoff involves complexity in implementation and potential performance costs, but for critical data integrity, it’s a worthwhile investment.
One file per item: Why it beats a giant list
Using one file per item might seem like a minor tweak, but it fundamentally changes how data can be managed and scaled. When each task or data point is stored in its own file, it enables more granular control, easier conflict resolution, and better performance under concurrent access. This design allows multiple processes or users to work on different parts of the dataset simultaneously without locking the entire collection.
In real-world terms, imagine editing a project plan. If all tasks are in a single large JSON file, simultaneous edits by different tools or users risk conflicts, requiring complex locking or reconciliation. But when each task is a separate file, updates are atomic and isolated—changing one task doesn’t affect others. Moving or deleting a task becomes as simple as renaming or deleting a file, making reorganization intuitive and safe. This structure also scales better, as small files are quicker to read, write, and sync, reducing bottlenecks and improving responsiveness in larger datasets.

How the board self-heals and keeps your view consistent
The dynamic nature of Threlmark’s board relies on continuous reconciliation between the on-disk state and the visual representation. Every time you open or refresh the board, the system scans the item files. If it detects that a card has been deleted or moved externally—say, by manually editing files—it updates the view accordingly. This process ensures that your visual interface reflects the true state of your data, even after external modifications or crashes.
This self-healing mechanism is crucial for maintaining consistency without manual intervention. It prevents stale views or orphaned cards, which could otherwise lead to confusion or errors. While this approach adds some overhead—scanning files and reconciling states—it provides a robust way to keep your workspace accurate and trustworthy. The tradeoff is that it relies on predictable file states and consistent naming conventions, meaning careful design of the data structure maximizes reliability.
Making synchronization transparent and conflict-free
Threlmark’s synchronization approach is designed around simplicity and robustness. Each device maintains its own copy of the data, stored as files, and syncs changes in the background through a series of file updates. When conflicts arise—say, two devices edit the same task—the system employs clear merge strategies, such as preserving both versions with conflict markers or timestamps. This avoids locking or complex coordination, making offline work seamless and conflict resolution straightforward.
For example, if you edit a task on your laptop and your phone simultaneously, Threlmark detects the conflicting changes during sync. It then either merges the changes intelligently—combining updates where possible—or flags the conflict for manual resolution. This process is transparent to the user, who can review conflicts and choose how to resolve them, or accept automatic merges. The benefit of this approach is that it allows continuous offline work and automatic sync, reducing the dependency on network availability and avoiding the complexity of centralized databases. The tradeoff involves designing conflict resolution policies that balance automation with user control, but overall, it provides a resilient, user-friendly sync experience.

The big benefits: portable, inspectable, resilient
Adopting a disk-as-contract model offers tangible advantages that directly impact usability and control. Portability means you can copy your entire data folder—say, ~/.threlmark—and have an instant, working snapshot of your complete system. This makes backups, migrations, and sharing straightforward, without vendor lock-in or proprietary formats. Inspectability is equally powerful; you can open, read, and understand your data directly—using simple tools like grep, diff, or plain text editors—giving you full transparency and trust in your system.
Resilience is perhaps the most compelling benefit. Since data is stored as plain files, it survives crashes, power failures, or even accidental deletions. You can move data between devices, restore from backups, or manually edit files if needed. This approach reduces reliance on complex databases or server infrastructure, lowering points of failure and empowering users with full control over their data. The tradeoff is that this simplicity requires disciplined file management and conflict handling, but the payoff is a system that’s inherently more robust and flexible.
Practical tips for building your own disk-first app
- Use atomic write techniques for all file saves to prevent corruption during crashes or interruptions.
- Keep each item in its own file to facilitate conflict resolution, reorganization, and partial updates.
- Reconcile your metadata on each read to ensure consistency, especially after external edits or conflicts.
- Design your system to be stateless—avoid storing critical state in memory that can become inconsistent or lost.
- Make everything inspectable—use plain JSON or similar formats that are easy to read, edit, and verify manually.
Frequently Asked Questions
What does ‘local-first’ really mean?
Local-first means the device’s local storage is the primary copy of data. The app and tools read and write directly to files on disk, and synchronization happens in the background. This approach prioritizes offline access, control, and resilience.How does Threlmark handle conflicts when multiple devices edit the same task?
Threlmark uses a merge strategy that preserves both changes and flags conflicts. It doesn’t lock files but merges edits intelligently, ensuring data consistency without complex coordination. This makes offline work seamless.Is this approach secure and private?
Yes, because all data stays on your device unless you choose to sync or share it. The architecture reduces reliance on centralized servers, lowering attack surfaces and giving you full control over your data’s privacy.Can I build my own app using this disk-as-API approach?
Absolutely. Follow principles like atomic writes, one file per item, and self-healing metadata. Use plain JSON files, and you’ll create a system that’s easy to understand, portable, and resilient—just like Threlmark.Conclusion
Threlmark proves that the simplest ideas often have the biggest impact. When you treat the disk as the contract, you gain control, resilience, and flexibility. It’s a reminder that sometimes, the most powerful system is just a well-organized folder of plain files.
If you want to build software that’s resilient, portable, and respects user control, start by making your data a part of your local environment, not a distant server. Your future self will thank you.
