Athens Research: Deep Dive Tutorial

June 22, 2026 · View on GitHub

Project Status: The Athens Research repository was archived in August 2022 and is no longer actively maintained. This tutorial covers the final v2.0.0 release as a historical reference for ClojureScript/Datascript architectural patterns. Do not use Athens as the basis for new production projects.

Project: Athens Research — An open-source, Roam-like knowledge management system built with ClojureScript and graph databases.

Stars License: EPL 1.0 ClojureScript

Why This Track Matters

Athens Research demonstrates how a graph-first, local-first knowledge system can be built with ClojureScript and Datascript, offering a fully self-hosted alternative to cloud knowledge tools.

This track focuses on:

  • understanding block-based editing with bi-directional link management
  • working with Datascript in-memory graph databases for knowledge relationships
  • building ClojureScript frontends with Re-frame state management
  • operating a local-first system with optional real-time collaboration

What Is Athens Research?

Athens is an open-source knowledge management system inspired by Roam Research. It uses Datascript (an in-memory graph database) with ClojureScript to provide block-based editing, bi-directional linking, and knowledge graph visualization — all running locally for full data ownership.

FeatureDescription
Block-Based EditorFlexible, composable content editing with outliner UX
Bi-Directional LinksAutomatic backlinks between pages and blocks
Graph DatabaseDatascript in-memory graph for knowledge relationships
Knowledge GraphInteractive visualization of connections between notes
Local-FirstAll data stored locally, no cloud dependency
Real-Time CollabMulti-user editing with conflict resolution

Mental Model

graph TB
    subgraph Frontend["ClojureScript Frontend"]
        EDITOR[Block Editor]
        GRAPH[Graph Visualization]
        SEARCH[Search Interface]
    end

    subgraph State["State Management"]
        REFRAME[Re-frame Events]
        SUBS[Subscriptions]
    end

    subgraph Data["Data Layer"]
        DS[(Datascript DB)]
        FS[File System]
        SYNC[Sync Engine]
    end

    Frontend --> State
    State --> Data

Chapter Guide

ChapterTopicWhat You'll Learn
1. System OverviewArchitectureAthens's approach to knowledge management
2. Datascript DatabaseData LayerIn-memory graph database, queries, transactions
3. Schema DesignData ModelBlocks, pages, and relationship modeling
4. Application ArchitectureApp FlowRe-frame event flow and state boundaries
5. Component SystemUI LayerReagent composition and recursive block rendering
6. Event HandlingState ChangesEditing, navigation, and sync event orchestration
7. Block EditorEditor CoreOutliner commands, hierarchy edits, and UX behavior
8. Rich TextRenderingRich-text tokenization, AST rendering, and safeguards

Tech Stack

ComponentTechnology
LanguageClojureScript
UI FrameworkReagent (React wrapper)
StateRe-frame
DatabaseDatascript (in-memory graph)
DesktopElectron

Ready to begin? Start with Chapter 1: System Overview.


Built with insights from the Athens Research repository and community documentation.

Full Chapter Map

  1. Chapter 1: System Overview
  2. Chapter 2: Datascript Deep Dive
  3. Chapter 3: Schema Design
  4. Chapter 4: Application Architecture
  5. Chapter 5: Component System
  6. Chapter 6: Event Handling
  7. Chapter 7: Block Editor
  8. Chapter 8: Rich Text

Current Snapshot (auto-updated)

  • repository: athensresearch/athens
  • stars: about 6.3k
  • GitHub release reference: v2.0.0 (checked 2026-06-22; release metadata on GitHub)

What You Will Learn

  • how Athens uses Datascript as an in-memory graph database for knowledge storage
  • how bi-directional links and backlinks are managed across pages and blocks
  • how Re-frame events and subscriptions drive the ClojureScript application state
  • how the block editor handles recursive rendering and outliner-style editing

Source References

Generated by AI Codebase Knowledge Builder