Comment by AlexIchenskiy

Comment by AlexIchenskiy

Lately, my colleagues and I have noticed how difficult it is becoming to organize and structure our thoughts, ideas, and notes. As budding engineers and full-fledged graph enthusiasts, we decided to approach this problem in our style - we began to study, research and look for different tools that could help us automate and improve these processes. In the process of brainstorming and research, we have read quite a lot of scientific papers devoted to the concept of knowledge graphs. We found many of these works and other materials with the help of LLM and we came up with the idea of trying to combine these two technologies in one project that was supposed to help us with the most difficult thing - organizing yourself. Of course, besides this, we came up with many more ideas, some of which we had to shelve with great regret, and some we even managed to implement in our other projects.

Given that my colleague already had a wealth of experience using Obsidian and I made some contributions to LangChain, a very nice open-source Python framework for LLM communication, we decided to unite forces - I always enjoyed creating rich user interfaces while my colleague, Patrik, dealt with the part of the project that my UI needed to render. This is how our work on ODIN began, but what is Obsidian, how did a god from Norse mythology get in here, and why is TypeScript great? Let's find out.

Although I didn’t have such extensive experience working with Obsidian, I fell in love with it at first sight - a pragmatic and user-friendly interface, nice colors, a wide and very open open-source community and other goodies - what else does a good note-taking application need? With these thoughts in mind, I began to study how Obsidian works from the inside, how it can be expanded, and how it can be connected to other technologies - such as LangChain, in our case.

I was very pleasantly surprised when I discovered a well-made Developer API that allows you to create your custom community plugins that can easily connect to the application itself. I was even more pleasantly surprised when I discovered that all this is web-based and has support for React, which I worked with, and Svelte for its fans. Although the official documentation is not too full of details and sometimes you can get lost in it, a very convenient UI styling system and strict TypeScript type definitions, coupled with IntelliSense, which I always use, is a game-changer.

What's notable is the ease of creating plugins in real time; npm scripts allow you to instantly detect code changes, and the Obsidian Hot Reload plugin speeds up development several times. In addition, Obsidian provides developer tools like popular browsers, simplifying the debugging process by accessing the console and directly inspecting elements on the screen. This flexibility in the Obsidian API allows developers to bring their creativity to life, unlocking the full potential of Obsidian to create unique note-taking experiences and more. Honestly, it feels just like making a web application in a modern and robust environment. I'll miss this when I get back to regular web development.

That’s all great, but still, why ODIN? Honestly, it’s quite simple — we liked the project naming style that has existed in Memgraph for a long time — for example, MAGE, also known as Memgraph Advanced Graph Extension, seemed to us a damn original name, sharp as volcanic glass — and so, ODIN was born, from now onwards known as Obsidian Driven Information Network, an Obsidian plugin for knowledge management. This name became the real starting point of our project, representing the goal that we were trying to comprehend and the idea that we were trying to realize.

In our R&D process, while working on ODIN, we figured out that data storage is the core of the app's architecture, without which neither the backend nor the frontend would make any sense. Even though we thought a lot about traditional databases such as PostgreSQL, the Obsidian knowledge graph was the main inspiration to try Memgraph, a graph database that excels in modeling complex relationships and connections, making it the ideal choice for creating and navigating intricate information networks.

Even I, an ordinary student with a passion for developing user interfaces, was able to play around with both Memgraph and the query language called Cypher. I highly recommend trying the visualization that Memgraph Lab provides, even if you are far from both database graphs and software development in general.

By seamless integration with LangChain, we’ve tried to leverage Memgraph's speed and efficiency to transform standard notes into interconnected knowledge graphs empowered by the flexibility of embedding search. This enables you not only to traverse your notes effortlessly but also to extract valuable insights by interacting with LLMs through LangChain implemented in the backend using Python and FastAPI. With Memgraph as our data storage solution, ODIN redefines the way we store and harness knowledge, offering a platform for building an intelligent and dynamic personal knowledge management system just from your notes. Isn’t it wonderful?

ODIN introduces a multitude of functionalities to improve your knowledge management experience. At its core, ODIN provides a chat-like prompt bar for answering questions about the data stored in your knowledge graph as if you were just chatting with your knowledge collection.

With ODIN's advanced graph visualization capabilities provided by Cytoscape, an amazing library for graph visualization with complete TypeScript compatibility, you gain a whole new view of your Obsidian vault, effortlessly navigating through the complex web of your notes. This extends to individual files view, where you can delve deep into specific topics from your markdown notes. Furthermore, ODIN expands the Obsidian native drop-down menu by adding new advanced functions. Link prediction, as its name suggests, generates connections to other markdown files in your entire vault, enriching your note's content with thematically relevant references. Moreover, you can extract thought-provoking questions from your markdown file, fostering deeper contemplation. Lastly, the node suggestion capability enhances your note-taking by highlighting thematically connected nodes, forging meaningful connections between highlighted text and related knowledge nodes, all while promoting a more comprehensive understanding of your stored information. On the other hand, clicking the node from the file view will highlight related sentences directly in your opened note. These features perfectly represent the goals we were trying to achieve and have proven to be useful in our daily lives, which means they might be of interest to other developers as well as anyone else interested in organizing their knowledge in a better way.

The Obsidian community (including you, reading this article!) is the lifeblood of the platform's evolution and continued success. At the forefront of this community-driven ecosystem are the invaluable community plugins, just like ODIN. These user-generated extensions enhance Obsidian's functionality, addressing specific user needs and preferences. Becoming a part of this thriving community is not only about reaping the benefits of these plugins but also contributing to its growth. By actively participating in discussions, providing feedback, or even crafting your own plugins, you can play a pivotal role in shaping the future of Obsidian, enriching the collective knowledge management experience, and ensuring that this vibrant community continues to flourish.

The history of the creation of this project was long (and sometimes painful to remember), but if you were to ask me if I would do it again, I would without any hesitation. Creating plugin-type interfaces is a breath of fresh air in frontend development, which still fits perfectly not only into open-source contribution but also into professional experience along with career growth. Although this project could be done better in many ways, it will remain a reliable indicator that modern technologies can and should be used in conjunction with one another. You, too, can become a part of this story — open an issue in our GitHub repository, and we will be happy to make ODIN better together!

I hope that I was able to ignite your interest in trying Obsidian or even making a more tangible contribution to this incredible open-source community and thank you for reading this story about my journey.

Replies AlexIchenskiy · 2023-09-21
Open on HN
Loading the discussion…

Domain filters

Stories from these domains are hidden from every list. Subdomains match too: blocking substack.com also hides danluu.substack.com.

    New collection

    Delete this collection?

    About YAVCHN

    YAVCHN is a reader for Hacker News and Lobsters, with articles and discussions in separate windows or Classic pages.

    Created by Paul Parks and built with PUDL.

    YAVCHN source code on GitHub

    Privacy policy · Terms of use

    Help

    Keyboard

    j / k
    Move down and up the story list. The arrow keys scroll whatever has focus.
    Enter
    Read the marked story in the article reader.
    ]
    Read the next story in the same article-reader applet. Back returns to the previous story.
    p
    Pin or unpin the marked story, which keeps it in Pinned.
    n / N
    Move to the next or previous top-level comment in the window in front.
    c
    Collapse or expand that comment.
    f
    Hide or show the story list.
    Esc
    Close a menu or this help.
    Access key m
    Go to the menu bar. Most browsers take it with Alt on Windows and Linux, and Safari with Control and Option.
    ?
    Show this help.

    Windows

    Each story opens in a window holding its article above its discussion; drag the bar between them to share the room differently. A window can be moved by its title bar, resized from any edge, snapped to a half or a corner by dragging it there, maximised, or minimised to the bar at the foot of the page. Use Window > New reader window to open an empty reader, or Story > Open in new reader window to open another reader for the current article. Docked readers keep their articles when you select another story from the sidebar. Minimized readers can be restored and reused for their site. A window's Next story link reads on down the list in the same window.

    A link in a comment or an article to another Hacker News or Lobsters thread opens that thread in a window too. A link to a single HN comment opens the comment above its replies.

    While a story's window is in front, the Story and Discussion menus in the menu bar hold its commands: pinning, Next story, sorting, collapsing every thread, jumping to the first new comment. Each window also remembers where you were in its article and discussion, so a reload, or Back to a story that Next took you past, finds your place again. Closing a window forgets it.

    The whole arrangement lives in the address, so a bookmark or a shared link brings it back, and Back undoes the last change. Moving between Hacker News, Lobsters, their lists, Pinned and Find changes only the list, and leaves the windows open.

    The list

    The pin at the start of a row keeps the story in Pinned, and the cross at its end hides it. Pinned can be narrowed by words in the title, site or author, by source, and to the stories you haven't opened yet, and ordered by when you pinned them, by points or by comments; the filters are part of the address, so a filtered view can be bookmarked. Scroll past the end of the list to load more. Domain filters, in the View menu, hide every story from a site.

    Collections are named lists of stories. Story > Add to collection files the story in front into one or more of them, and the Collections feed shows them all or one at a time; the menu that chooses collections also creates, renames, and deletes them. A note is your own text on a story. Choose Add note in a story's toolbar to write one; it saves as you type. Rows with a note carry the note mark, and the Notes feed lists every noted story and searches the text of your notes.

    Browsing view

    View > Windowed and View > Classic select the browsing view and save your default in this browser. Window view reuses a reader for each feed. Classic view opens stories and applets as pages. Open as a page is a one-off action that does not change your saved default. Use the Windowed selector to return an article to a window. Direct page links always open as pages.

    Applets

    The Applets menu in the menu bar holds three tools, each a window of its own. Replies to me takes your Hacker News user name and lists the replies to your last thirty comments and stories, checking again every three minutes while it is open, and marking what is new since you last marked them read. Look up a user opens a profile on Hacker News or Lobsters, with their submissions and recent comments, as a commenter's name in any discussion does; the bar at the top of a profile looks up someone else in the same window, and Back returns to the one before. Who is hiring? filters the posts of HN's monthly hiring threads by the words you type.

    They read only what the sites publish to everyone, so none of them asks for a login, and your user name stays in this browser anonymously and is included in retained applet state when signed in.

    Find

    Find takes any link and lists every time it was submitted to Hacker News and Lobsters, so you can read each discussion of it.

    About

    YAVCHN never sees your Hacker News or Lobsters login. The discussion is fetched from each site's public API; to vote or reply, follow the link above the discussion, or the arrow beside a comment, to the source's own site. Without a YAVCHN account, your data stays in this browser. When signed in, pins, collections, notes, blocked domains, and retained reading state are stored with your account and synchronized across devices. Hidden stories and layout stay in this browser. The privacy policy has the details.

    Open source: github.com/paulmooreparks/yavchn. Built with PUDL.