Reactive Tree Management in Nuxt 4: How I Modeled Complex Hierarchies with Pinia
dev.to·10h·
Discuss: DEV
Flag this post

When I started building Alexandrie, I just wanted a fast, offline Markdown note-taking app I could rely on daily. But as the project grew — with nested categories, shared workspaces, and access permissions — it evolved into something much more: a open-source knowledge management platform powered by Nuxt 4 and Go.

This article walks through one of the toughest challenges I faced: how to model and manage hierarchical data efficiently, from the database to a reactive Pinia store.

1. Unified Data Model: “Nodes” Over Multiple Tables

Early in development, I realized that managing categories, documents, and files as separate entities was becoming painful.

Every new feature — especially sharing and permissions — required deeper joins and complex recursive queries.

Here’s …

Similar Posts

Loading similar posts...