TL;DR

Threlmark’s core idea is that the disk is the main contract—using plain JSON files as the single source of truth. This provides offline resilience, simplicity, and easy interoperability, but shifts complexity into sync and conflict management. It’s a bold take on local-first architecture that favors transparency and control.

Imagine a tool where your project data isn’t stored in some cloud, but right there on your local disk, in plain text files. This approach is at the core of Threlmark’s approach. No server, no database, just files you can open, edit, and back up with a simple copy. That’s the core of Threlmark’s approach. It’s a radical, yet elegant shift—treat the disk as the contract, the single source of truth.

This approach isn’t just about minimalism; it’s about empowering you with control, resilience, and openness. You can learn more about local-first architectures on Avaoroi. No vendor lock-in, no hidden layers. In this article, I’ll walk you through how Threlmark’s file-based, local-first architecture works, why it’s a game-changer, and what it means for developers and users alike.

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

offline JSON file editor

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
Mr. Pen- House Plan, 3 pcs, Interior Design and Furniture Templates, Clear Flexible Plastic, Drafting Tools, Ruler Shapes for Architecture, 1/4 Inch Scale, Kitchen, Bath, Bedroom, Office, Living Room

Mr. Pen- House Plan, 3 pcs, Interior Design and Furniture Templates, Clear Flexible Plastic, Drafting Tools, Ruler Shapes for Architecture, 1/4 Inch Scale, Kitchen, Bath, Bedroom, Office, Living Room

  • Designed for Architects and Builders: Accurate 1/4 inch scale for precision
  • Durable and Flexible Material: Made from long-lasting PET plastic
  • Includes Kitchen, Bath, Bedroom Templates: Visualize and plan essential rooms easily

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
Project Planner Notepad - Project Management Organizer Desk Pad - Manage Project Tasks and Meeting Deadlines Effectively - 50 Sheets of Premium 120gsm Paper | Management | A4 Mono

Project Planner Notepad – Project Management Organizer Desk Pad – Manage Project Tasks and Meeting Deadlines Effectively – 50 Sheets of Premium 120gsm Paper | Management | A4 Mono

  • Project Planning Sections: Track milestones and deliverables
  • Task Management: Organize tasks by priority and deadlines
  • Premium Paper Quality: 50 sheets of 120gsm smooth paper

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

version control for JSON files

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 disk files as the primary source of truth to maximize transparency and control.
  • Use atomic file writes and tolerant merge strategies to ensure data safety and forward compatibility.
  • File-per-item design avoids race conditions and simplifies external integrations.
  • Local-first architecture boosts offline resilience and responsiveness.
  • Be aware of scalability limits; this approach works best for small to medium projects.

What does ‘disk is the contract’ really mean? Think simple, think direct

At its heart, ‘disk is the contract’ means your data lives as files on your computer, not in a cloud or a proprietary database. The files are the source of truth—every app, tool, or script reads and writes directly to these files, trusting their state.

For example, in Threlmark, each project, each task, is a JSON file stored in a dedicated folder. You can open it in any editor, see the raw data, and understand exactly what’s there. For a deeper dive into JSON-based systems, see this article. This transparency makes debugging, backup, and migration straightforward—no mysterious schemas or query languages needed.

It’s like keeping your notes in plain text files instead of a locked-up notebook. When you open the folder, everything you need is right there, simple and accessible.

What does 'disk is the contract' really mean? Think simple, think direct
What does ‘disk is the contract’ really mean? Think simple, think direct

Why Threlmark chose JSON files—simplicity over complexity

Threlmark’s architecture is built on plain JSON files—no databases, no special storage layers. This choice keeps things simple. JSON is human-readable, flexible, and widely supported. Want to see your project data? Just open the file.

For example, a task card might look like this:

{
  "id": "task-123",
  "title": "Design homepage",
  "status": "In Progress",
  "createdAt": "2024-04-01T10:00:00Z",
  "updatedAt": "2024-04-02T15:30:00Z"
}

Using individual files for each item means no locking or complex concurrency controls. This simplicity is a key advantage discussed in this resource. Updates are atomic—write a new file, replace the old. This makes collaboration and external integrations easy, even without a server.

Plus, you can back up your entire system with a simple copy or sync it with tools like Dropbox or Syncthing. No vendor lock-in, no proprietary storage layer.

How local-first design transforms your experience—speed, resilience, and control

With Threlmark’s approach, your work isn’t tied to the internet. You can read, edit, and organize your data offline—imagine working on a plane or in a remote cabin, then syncing later. The system responds instantly because it’s reading from your disk, not waiting for a server.

A real-world scenario: you’re in a coffee shop with spotty Wi-Fi. You update a task, and it saves immediately. Later, when online again, Threlmark syncs your changes seamlessly across devices.

This local-first setup also means you have full control. Your data isn’t stored in some vendor’s cloud. You back it up, migrate it, or even edit it manually if you want. It’s your data, your rules.

How local-first design transforms your experience—speed, resilience, and control
How local-first design transforms your experience—speed, resilience, and control

Sync, conflict resolution, and managing changes across devices

Threlmark treats each JSON file as an independent piece that can be edited without locking others out. When syncing, it compares files and merges changes intelligently. If two devices modify the same task offline, conflicts can happen.

For example, if you change the deadline on a task on your laptop and your phone while offline, the next sync will detect both changes. Threlmark then prompts you or automatically applies rules—like latest change wins or manual review.

Conflict resolution is built into the system but requires care. Threlmark’s approach favors transparency—conflicts are visible as file differences, and you can resolve them manually if needed. This is a tradeoff: simple, transparent, but potentially requiring user intervention in complex cases.

Benefits for developers—simplicity, interoperability, and control

Developers love this architecture because it’s straightforward. No need to learn a new database language or worry about server uptime. Just read or write JSON files. Any tool, in any language, can participate.

Imagine building a custom script that scans your `items/` folder and generates a report. Want to migrate your data? Just copy the folder. Need to integrate with another app? Read and write files directly.

This openness accelerates experimentation and reduces lock-in. Plus, debugging is as simple as opening a text file or running a diff.

Benefits for developers—simplicity, interoperability, and control
Benefits for developers—simplicity, interoperability, and control

Limitations and scaling—what to watch out for

This design isn’t perfect. As your data grows, managing thousands of JSON files can become cumbersome. For more on architecture scalability, see this analysis. Conflict resolution gets trickier, and performance may lag if you’re frequently reading thousands of files.

For example, a team with dozens of projects and hundreds of tasks might find the file system approach slow or hard to organize. Synchronization can also become complex with multiple devices editing simultaneously.

However, for small to medium setups, the benefits of simplicity, transparency, and offline resilience often outweigh these challenges.

Comparing file-based architecture to traditional databases

Feature File-based (Threlmark) Database (SQL/NoSQL)
Data store Plain JSON files Structured database
Setup complexity Minimal—just files Requires server, schema, migration scripts
Sync & offline Built-in—local files always available Usually cloud-dependent, complex offline sync
Interoperability High—any language can read/write files Depends on drivers/APIs
Scaling Best for small to medium datasets Handles large, complex datasets better

Frequently Asked Questions

What does ‘disk is the contract’ actually mean?

It means the data lives directly on your disk as files, and those files are the single source of truth. Learn more about this concept in this article. No cloud or database is needed—just open, read, and write files as the main way to manage your data.

How does sync work with plain files?

Syncing compares JSON files across devices, merges changes, and detects conflicts. When conflicts occur, Threlmark highlights differences so you can resolve them manually or with rules, keeping everything transparent.

Why choose JSON/files over a traditional database?

JSON files are simple, portable, and easy to understand. They don’t lock you into a vendor or platform. Plus, you can fully control backups, migrations, and integrations—no need for special knowledge or tools.

What are the main tradeoffs of this architecture?

It’s excellent for small to medium projects, but as data grows, managing thousands of files and conflicts can get tricky. Performance may slow, and sync complexity rises. It’s a tradeoff between simplicity and scalability.

Is this approach suitable for collaborative, multi-device work?

Yes, but with caveats. It works well for teams that understand conflict resolution and are comfortable with occasional manual merges. It’s ideal for offline-first workflows with thoughtful sync management.

Conclusion

Threlmark’s approach proves that simplicity can be powerful. By making the disk the contract, it gives you a transparent, resilient, and flexible system. It’s a reminder that sometimes, the simplest tools—plain files—can unlock the most control.

Next time you think about data architecture, ask yourself: what if the disk *was* the system? The answer might just be a more honest, reliable way to build.

Comparing file-based architecture to traditional databases
Comparing file-based architecture to traditional databases
You May Also Like

The ‘Havana Syndrome’ Mystery: Do Sonic Weapons Exist in Espionage?

Perhaps sonic weapons hold the key to Havana Syndrome, but the truth remains elusive and worth investigating further.

Zero-Trust AI Pipelines: Identity, Access, and Audit

To secure your AI pipelines with zero-trust principles, start by implementing strict…

Global Data Centers Demand Unity in Divided Times

Outstanding growth in data center demand calls for unprecedented unity among industry leaders to tackle emerging challenges and ensure a sustainable future.

Waymo updates 3,800 robotaxis after they ‘drive into standing water’

Waymo is recalling about 3,800 U.S. robotaxis to address software issues that could lead them into flooded roads, after recent incidents in Austin and San Antonio.