TL;DR
Threlmark treats the disk as the system of record, making data portable, inspectable, and resilient. This approach boosts offline usability, simplifies sync, and enhances collaboration without relying on a central database.
Imagine a project management tool that works perfectly offline, is lightning-fast, and plays nicely with other tools—all without a cloud database in sight. That’s the promise of Threlmark’s local-first architecture. Here, the disk isn’t just storage; it’s the contract, the source of truth, and the backbone of the entire system.
In this article, you’ll see how this simple yet powerful decision shapes everything from concurrency to collaboration and how it can change how you think about building robust, flexible apps.
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.

Information Technology Project Management (MindTap Course List)
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.JSON file-based data storage tools
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.

Real-World Android App Projects with Kotlin and Jetpack Compose: Build Production-Style Android Apps with Modern Architecture, API Integration, State Management, Local Data Storage, Practical Projects
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.

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 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
- Design your system so the disk *is* the API—simple, transparent, and portable.
- Making data portable and inspectable avoids lock-in and simplifies backups and migrations.
- File-based, lock-free updates prevent race conditions and improve concurrency.
- Offline-first means your system keeps working during outages, boosting reliability.
- Open directory structures invite integrations, automation, and multi-tool collaboration.
How Threlmark Turns Disk Into the Single Source of Truth
In Threlmark, the on-disk layout isn’t just a storage choice—it’s the API. Every file, from project configs to individual cards, acts as a piece of the system’s heartbeat. This means no database, no server, just a well-structured folder of JSON files.
For example, each task card lives as its own file inside `items/`. Changes to a card are just atomic file writes. When you open Threlmark, it reads all these files—no need for network calls—and deduces what’s next based on the latest files. This setup makes the entire system transparent and portable.

Why Making Disk the Contract Supercharges Offline and Resilience
Making the disk the system’s contract means your data survives network outages without losing a beat. Threlmark can be used on a plane, in a basement, or in a remote cabin—anywhere with a disk and a file system.
Take a scenario: you plan a project while offline, update tasks, and the data stays safe on your local disk. When you reconnect, sync happens seamlessly, merging your changes with others’.
This approach ensures your work is never blocked by server issues, making your tools more reliable and your workflows smoother.
How Threlmark Handles Sync and Conflicts with Files
Syncing in Threlmark is all about file-based merges. When you connect devices, changes are merged based on timestamps and content, not locks or sessions. Conflicts get resolved by the system’s merge rules, preserving data integrity.
For example, if two devices edit the same task differently, the system compares the files, keeps the latest changes, and preserves any unknown fields—so no data gets lost or overwritten unexpectedly.
According to research, conflict resolution based on last-write-wins combined with tolerant merge strategies minimizes errors and keeps data consistent across devices [2].

How Performance and User Experience Benefit from Local-First Design
Because all reads and writes happen directly on your disk, responses are almost instant. No waiting for server round-trips. This makes the app feel snappy, like flipping through a deck of cards.
Imagine dragging a card from ‘To Do’ to ‘Done’—the update appears immediately, no lag, no loading spinner. Even on a slow internet connection, your experience remains smooth.
That speed isn’t just a nicety; it fundamentally changes how you work, making task management feel more natural and less frustrating.
The Practical Benefits of a File-Based, Lock-Free System
Using files instead of a database brings real-world advantages. You can back up your entire project by copying a folder. You can open and inspect individual JSON files with any editor. And you can migrate everything by copying files to a new system.
Threlmark’s design also avoids lock contention, so multiple tools or agents can update different parts of the system simultaneously, without stepping on each other’s toes.
Think of it like working with a set of interconnected notebooks—simple, transparent, and flexible.

How Threlmark’s Structure Supports Extensibility and Collaboration
Threlmark’s directory layout acts like a shared contract. External tools can add suggestions, report progress, or modify cards simply by reading and writing files in designated folders.
For example, an AI agent can place completed tasks into the `reports/` folder, then Threlmark picks them up and updates the system automatically. This openness encourages integrations and automation.
It’s a flexible system that invites others to participate without complex APIs or middleware.
Comparing Threlmark’s Approach with Traditional Client-Server Apps
| Aspect | Threlmark (Local-First) | Traditional Client-Server |
|---|---|---|
| Data Storage | Files on disk, API is filesystem | Database + server API |
| Offline Usage | Fully functional offline | Limited, depends on server |
| Syncing | Merge files, no lock | Sync engine, conflict resolution |
| Resilience | Works during outages | Fails without server |
| Portability | Easy to backup/move | Dependent on database format |
Frequently Asked Questions
What does ‘disk is the contract’ really mean?
It means the on-disk files are the authoritative source of truth. The entire system reads, writes, and merges data directly from these files, making the data transparent, portable, and resilient.How does this approach handle conflicts between devices?
Threlmark uses file-based merge strategies that compare timestamps and content. Conflicts are resolved by merging changes or choosing the latest, ensuring consistency without locks or complex protocols.Can I still use cloud sync with this setup?
Absolutely. Because the data is just files, you can sync folders with Dropbox, Syncthing, or git. The architecture makes cloud sync an optional extension, not a requirement.What happens if I lose my files?
Since everything is stored as plain files, backups are straightforward. Just copy the folder. For safety, use version control or cloud backups to keep your data secure.Is this approach suitable for large-scale or multi-user systems?
It works well for personal, small-team, or automation-heavy setups. For large multi-user systems, you’ll need additional sync and conflict-resolution layers, but the core idea remains valuable.Conclusion
Thinking of the disk as the system’s contract rewires how you build resilient, flexible software. It’s a tiny shift in perspective that unlocks offline resilience, effortless collaboration, and future-proof portability. When your data lives on the disk, you hold the entire system in your hands—safe, transparent, and ready to grow.
So, next time you architect a tool, ask yourself: does the disk *really* just hold data, or is it the contract that defines everything?
