TL;DR

Threlmark’s architecture treats local disk files as the definitive record, enabling offline use, easy collaboration, and AI integration without locking you into a cloud database. This approach emphasizes data portability, safety, and simplicity, making project management more flexible and reliable.

Imagine managing your entire project, not through a web app, but directly on your disk—where every file is a living, breathing part of your workflow. That’s the core idea behind Threlmark’s local-first architecture. It’s a surprisingly simple twist: your data lives in plain JSON files, and these files are the system’s contract, not a database or cloud service.

This approach might sound risky or old-fashioned. But it’s also incredibly flexible, reliable, and open. It changes how you think about data, collaboration, and automation. Today, I’ll walk you through how this disk-as-contract design works, why it’s so powerful, and what it means for your projects.

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
Amazon

external SSD portable 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.

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
Amazon

JSON file editor

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
Amazon

offline project management software

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
Amazon

local-first collaboration 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.

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 record—use files as the API to simplify data management.
  • Plain JSON files enable human-readable, portable, and lock-free project data.
  • Offline work becomes instant and reliable when data lives locally, with sync layered on top.
  • Atomic file operations prevent corruption and ensure data safety, even during crashes.
  • Scaling to multi-device collaboration requires a clean sync layer and conflict resolution, built around the file system.

Why Using Your Disk as the Single Source of Truth Changes Everything

In most apps, data lives in a database or cloud service. But Threlmark flips that script. The files on your disk are the real record, the source of truth. This means you can open the files in any editor, see exactly what’s stored, and trust that what’s on disk is always right.

For example, if you’re working on a project and want to see the latest task list, just open the JSON file. No waiting for server responses. No worries about sync conflicts—because you’re always working directly with the real data, right there on your machine.

This approach simplifies debugging, backups, and migration. A quick copy of your project folder is all you need to clone your entire workflow. And it’s inherently open: any tool or script can participate just by reading or writing files. Learn more about local-first architecture.

Why Using Your Disk as the Single Source of Truth Changes Everything
Why Using Your Disk as the Single Source of Truth Changes Everything

How Threlmark Uses Plain JSON Files Instead of a Database

Threlmark’s setup is refreshingly simple: each project’s data is stored in a directory full of JSON files. Every task, card, or project detail gets its own file—like item123.json. This prevents conflicts, because updating one file is atomic and independent.

For example, changing a task’s status involves rewriting just that file. No need for complex transactions or lock management. The files sit in a folder like ~/.threlmark/items/, easily accessible and human-readable.

Compared to databases, JSON files are transparent and portable. You can open them in your editor, diff them with Git, or migrate everything by copying a folder. No vendor lock-in, no proprietary format.

Making Offline Work Seamless and Speedy

When your data lives on disk, working offline feels instant. You edit a JSON file, and your changes are immediate. No network delay, no server downtime. That’s a game-changer for resilience and speed. Read more about local-first architecture.

For example, while traveling or in a spotty Wi-Fi zone, you can add tasks, move cards, or update priorities. As soon as you’re back online, you can sync your changes—if needed—without losing anything.

This setup aligns perfectly with the offline-first principle: your app remains usable, fast, and reliable, no matter what the network does.

Making Offline Work Seamless and Speedy
Making Offline Work Seamless and Speedy

How Sync and Conflict Resolution Work in a File-Based World

Syncing isn’t baked into the files themselves but layered on top. Threlmark uses a separate sync layer that compares files, merges changes, and resolves conflicts. When two devices edit the same card, the system compares the JSON files and intelligently merges updates. Find out more about local-first sync.

For example, if one device updates a task’s priority while another adds a comment, the sync process combines these changes smoothly. Conflicts are handled by favoring the latest change or prompting for manual resolution, depending on the setup.

This approach avoids complex lock management or server-side conflict resolution. Instead, it relies on straightforward file diffing and merging, making conflicts transparent and manageable.

Unlocking Collaboration Without Lock-In or Cloud Dependence

One of the coolest parts? You can share your entire project folder—just like sharing a folder in Dropbox or Git. External tools, scripts, or even manual edits can participate without special permissions. For more insights, see local-first collaboration.

For example, a teammate could edit a JSON file directly, or a script could suggest a new task by dropping a file into the suggestions folder. Threlmark then recognizes and incorporates these changes seamlessly.

This openness enables multi-device, multi-user workflows without tying everything to a central server or vendor lock-in. You’re in control of your data, all the time.

Unlocking Collaboration Without Lock-In or Cloud Dependence
Unlocking Collaboration Without Lock-In or Cloud Dependence

The Role of the Agent in Orchestrating the Workflow

An agent is a background process that helps automate tasks—like moving cards, syncing, or updating statuses—based on rules or AI suggestions. In Threlmark, the agent watches folders like handoffs/ and reports/, acting as a smart coordinator. Learn more about workflow orchestration.

For example, an AI agent might scan suggestions, pick the most important task, and move it to “Done” without human intervention. Or it might resolve conflicts by comparing file timestamps and merging changes.

This setup makes automation transparent and flexible. The agent relies on the same files you work with, maintaining the system’s integrity and simplicity.

The Big Tradeoffs: Simplicity vs. Scale

Using files instead of a database isn’t just elegant; it has limits. For small to medium projects, it’s fast, simple, and transparent. But as data grows, managing thousands of JSON files can become a challenge.

For example, a project with hundreds of active tasks might slow down file lookups or complicate syncs. You might need to introduce indexing or a lightweight database at some point.

However, for many teams, the tradeoff favors simplicity and control. It’s a matter of understanding your scale and needs.

The Big Tradeoffs: Simplicity vs. Scale
The Big Tradeoffs: Simplicity vs. Scale

Keeping Your Files Safe and Your Data Consistent

Safe file operations are critical. Threlmark uses atomic writes: each update writes to a temp file, then renames it. This way, crashes or interruptions don’t corrupt your data.

For example, if your laptop loses power mid-save, the original JSON file remains intact. You can confidently backup folders or use version control to track changes.

Plus, JSON’s human-readable format makes troubleshooting easier—just open a file and see what’s inside.

From Single Device to Multi-Device Collaboration — What Changes?

Scaling from one device to many means adding a sync layer and conflict management. The core principle remains: the files are the source of truth. But now, you need tools to keep everything aligned.

For example, syncing across a laptop and a tablet involves comparing JSON files, merging changes, and resolving conflicts. Threlmark’s design makes this straightforward—no complex server needed.

This model empowers teams to work seamlessly across devices, with the same straightforward file system supporting both solo and collaborative work.

From Single Device to Multi-Device Collaboration — What Changes?
From Single Device to Multi-Device Collaboration — What Changes?

Tradeoffs vs. Traditional Server-Client Architectures

Traditional apps rely on a centralized server and databases. That’s powerful but adds complexity, lock-in, and potential points of failure. Threlmark’s approach is lean: files, sync, and automation.

For example, working offline is effortless—just edit the files. But scaling to hundreds of users or real-time collaboration might require more infrastructure.

Both architectures have their place. File-based systems excel in simplicity, safety, and control, especially for personal projects or small teams.

Frequently Asked Questions

What does ‘disk is the contract’ really mean?

It means that your project’s data lives in files on your disk, which serve as the single source of truth. No database, no cloud dependency—just plain files you can edit, diff, and back up.

Why use JSON files instead of a database?

JSON files are simple, human-readable, portable, and easy to modify with any editor. They avoid vendor lock-in and make debugging and migration straightforward.

How does syncing work if I’m offline?

When offline, all changes are made locally. Once back online, the sync layer compares files, merges updates, and resolves conflicts. Everything stays consistent without needing a constant connection.

What happens if two devices edit the same task?

The sync layer compares JSON files and merges changes based on timestamps or rules. Conflicts are either automatically resolved or flagged for manual review, keeping your data safe.

Is this approach safe? What if files get corrupted?

Yes, if you follow atomic write patterns. Writing to temp files and renaming prevents corruption. Regular backups and version control further protect your data from loss or damage.

Conclusion

Threlmark’s disk-first architecture turns the traditional app model upside down. By making the disk the contract, it creates a system that’s simple, resilient, and open—perfect for solo creators or small teams who want control and flexibility.

Imagine a future where your project data is always with you, perfectly synced, ready to be inspected, modified, and automated—without locking you into a cloud or database. That’s the promise of treating disk as the contract.

You May Also Like

Walmart‑OpenAI agentic commerce partnership: impact on competition and customers

Introduction On 14 October 2025 Walmart announced a strategic partnership with OpenAI to allow…

A Simple KPI for Agentic Code Teams

Here’s a simple, high‑leverage north‑star for AI‑coding work: merged PRs per agent‑hour…

Enterprise AI Wins Backed by Metrics (2024–2025)

Below is a compact, metrics-driven roundup of enterprise AI deployments that demonstrably…

Cooling Options for Dense Racks: DLC Vs Immersion

Knowing the differences between DLC and immersion cooling can help optimize your dense rack setup—discover which solution truly fits your data center needs.