Replies: 5 comments
-
|
I've tried to implement it somehow but with inconsistent success :) |
Beta Was this translation helpful? Give feedback.
-
|
the layered tag design may be very appealing to power users, but these concepts are quite complex for ordinary users and do not align with AFFiNE's design goals |
Beta Was this translation helpful? Give feedback.
-
|
I'm not highly experienced user of affine but tried my best to describe my vision of this. TL;DR
AbstractThis RFC proposes the introduction of a Hierarchical Object Type System within the AFFiNE ecosystem. The system replaces the current flat, string-based tagging model with a schema-driven, inheritance-based object model while preserving AFFiNE’s core design principle of modesty. The proposal emphasizes progressive disclosure, backward compatibility, and minimal cognitive load for novice users, while enabling advanced relational modeling for power users. MotivationAFFiNE’s flat tag system works well for lightweight organization but does not scale to complex workflows requiring structured metadata, relationships, and consistency. As workspaces grow, users need to model real-world entities—people, projects, companies—using typed properties and links. The challenge is enabling this power without compromising AFFiNE’s clean, low-friction writing experience. Design Principles
Goals
Non-Goals
Terminology
Core ModelConceptual Shiftflowchart LR
A[Document] --> B[Tag]
becomes: flowchart LR
A[Document] -->|is-instance-of| B[Object Type]
Tags are lightweight object types with no required schema. Inheritance Model
graph TD
System[System Type]
Person[Person]
Client[Client]
Contractor[Contractor]
System --> Person
Person --> Client
Person --> Contractor
This avoids ambiguity and the diamond problem. Property SystemSupported Property Types
Relational Examplegraph LR
Project[Project]
Company[Company]
Project -->|Client| Company
Company -->|Backlink| Project
Instance properties automatically generate backlinks, forming a navigable knowledge graph. Progressive Disclosure Modelflowchart TB
L1[Level 1: Basic Tags]
L2[Level 2: Nested Tags]
L3[Level 3: Properties]
L4[Level 4: Object Studio]
L1 --> L2 --> L3 --> L4
LevelsLevel 1 — Basic Tagging Level 2 — Nested Tags Level 3 — Property Upgrade Level 4 — Full Schema Management User InterfaceObject StudioA dedicated “architect mode” for schema definition. Capabilities
Separated from writing mode to prevent accidental complexity. Contextual Properties
Structured data never interferes with writing. Migration StrategyBackward Compatibility
Lazy Migration
System Types and ProtectionLocked system types:
These ensure workspace integrity. Comparative AnalysisLogseq
AFFiNE (Proposed)
Tana
AFFiNE adopts the model but defers complexity via progressive disclosure. Rollout PlanPhase 1 — Foundation
Phase 2 — Relationships
Phase 3 — Automation
Architectural Constraints
CRDT-based sync preserves collaborative intent. ConclusionThis RFC introduces a structural upgrade to AFFiNE without sacrificing simplicity. By combining hierarchical object schemas with progressive disclosure, AFFiNE gains relational power while remaining approachable. Structure emerges naturally, at the user’s pace—preserving AFFiNE’s identity as a modest, user-first knowledge tool. |
Beta Was this translation helpful? Give feedback.
-
|
Long story short that's how I see it For simple users |
Beta Was this translation helpful? Give feedback.
-
|
this idea is too broad and may require more discussion |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Description
Summary
This request proposes an architectural evolution for AFFiNE, transitioning from a flat tagging system to a Hierarchical Object Type System. This system allows users to define custom object types with structured properties, inheritance, and bidirectional relational linking. The primary goal is to provide a powerful, schema-driven environment while maintaining full backward compatibility with existing tags.
1. Motivation
Current Limitations
AFFiNE’s current tagging system uses simple string-based metadata. This presents several challenges for power users:
User Stories
2. Goals & Non-Goals
Goals
Non-Goals
3. Architecture Overview
The system transitions the conceptual model from a flat "Tag" structure to a nested "Type" structure.
High-Level Approach
The core logic moves from
Document → Tagsto:4. Core Concepts
Inheritance Model
Types support single inheritance. Child types inherit all properties from the parent, can "shadow" (override) them, or extend the schema with new fields.
Should prevent circular references (for example through DAG).
Example Hierarchy:
Property Types
The system supports a wide range of data primitives to ensure data integrity
Two-Way Linking (Backlinks)
When a property references another object, the system maintains a virtual backlink index. This allows a "Company" object to automatically list all "Employee" objects that point to it without manual entry.
5. User Experience
The Object Studio
A dedicated interface for managing the workspace "DNA." Users can:
Navigation Integration
The sidebar "Tags" section will be rebranded as Objects.
6. Migration & Security
Backward Compatibility
To ensure a smooth transition:
system:tagtype.Permissions
7. Open Questions
Use case
No response
Anything else?
No response
Are you willing to submit a PR?
Beta Was this translation helpful? Give feedback.
All reactions