Skip to main content

Graph Databases to Build Plugin-Driven Web Apps, such as Multimedia Content Management Systems

Eleven years ago, the 2015 origins of the open-source project BrainAnnex.org was as a Multimedia Content Management System.  

Fast-forward to 2021 : the project had a radical makeover with v. 5, and is now a much more general, modular, full-stack technology solution to effectively utilize graph databases.

For example, you can opt to install just the python library, if that's all you need.  But if you elect to install the entire repo (python library, web API and web app), you will have a UI that includes:

  1.  a control panel - including search and visualization
  2. a plugin-driven web app that you can customize relatively easily

The plugin-driven web app is the focus of this entry.  More specifically, the existing plugins that come with the standard release, and provide a Multimedia Content Management System

This article is part of a growing, ongoing series on Graph Databases and Neo4j

Plugin-Driven Architecture

A "plugin", in this context, is a small piece of software, typically for a specific use case, that is relatively easy to write thanks to the "core module" that does most of the work.
 
You might have had exposure, for example, to WordPress : their core platform started out as a way to write and manage blog entries... but they made it plugin-driven, and a wide variety of plugins allowed people to use WordPress for all sorts of purposes.
 
In a generally similar fashion, Brain Annex plugins can provide all sort of functionalities for broad categories such as:
  1.  customized data management
  2. visualization
  3. interactive usage
Purely for historical reasons, most of the out-of-the-box plugins that come with the standard BrainAnnex web app installation are for Multimedia Content Management.  A wider variety of plugins will gradually emerge, and you can also relatively easily write your own.  Creating a new plugin will be covered by a future entry.
 

Multimedia Content Management System

Again, that's just one of a wide array of possibilities for a plugin-driven web app that utilizes the power of a graph database and the Brain Annex python library.
 
But if a CMS happens to be your interest, then you're in luck - because for historical reasons the Brain Annex web app provides out of the box several plugins that enable a fairly well-rounded multimedia content management system.
 
For example, let's imagine that you've been studying German as a foreign language - as I have! - and that you want to manage your growing knowledge of the language.  Voila', out of the box you can create a Brain Annex page like the following:
 
This is not a contrived example; the image shows a handful of my actual, real-life notes!
Let' digest the page, from top to bottom:
  • URL : it's a web app.  You may run the server either on your local computer or on the cloud.  Then access it with a browser.  Installation guide.
     
  •  Category : "Categories" are a built-in entity, coming with a UI editor.  They form a web of relationships with one another.  
    You could think of them as chapters and sub-chapters in a book, but they are more general and flexible than a "tree structure": they form a "network" (aka "mesh" or "directed graph".)   You could also think of categories as an "ontology" of your knowledge.  For example, "German" and "French" as sub-categories of the "Language" category.  And "German pronunciation" could be a sub-category of "German". ("See also" relationships are supported as well.)

  • Category Page : Every "Category", as defined above, can have a variety of "Content Items" (nodes of the graph database, which you may imagine as "data records") linked to it, in a specified order.  In this context, a page is a UI construct to display, in their assigned ordered, all the items linked to a given Category - in our example, "German"

  • Header : this items, just like everything else on the pages, is just a record of data (node of the graph database).  If we were to show it a record, for example in the form of a python dictionary, it might look like: 
       {"text": "Nouns", "_CLASS": "Header","entity_id": "509"}

or, if we looked inside the graph database, for example with the Neo4j browser, we might see:


But, of course, in the context of our Category page for "German", the header looks vastly better when rendered as shown in the earlier screenshot!  That nice, customized, display is the handy work of the "header" plugin, which also provides a UI for editing the values (discussed later.) 

What triggers the involvement of the  "header" plugin?  It's that field:    "_CLASS": "Header"     (capitalizing on the Schema Layer provided by the Brain Annex python library, schema classes can be assigned "handlers", i.e. plugin-provided special modules for display, editing and possibly interactivity)

  • Website Bookmark :  a way to save a URL, and also annotate it

  • Tabular Data :  a saved filter, similar to a "saved SQL query" in a relational database.  Here we're displaying a handful of the "German Vocabulary" records (sorted, and filtered for  grammar = 'noun' , where grammar is a field name), but any node data in the graph database may be displayed in this manner - including arbitrary data that may have nothing to do with Content Management Systems!

  • Formatted Text Note :  a little HTML file, saved as media, and managed with an embedded editor

  • Image : a little metadata about an image file, and a thumbnail version.  Clicking on it opens the full image

  • Document : a little metadata (such as user comments) about a generic document, such as PDF or Word document, plus an optional image.  Please note that PDF files optionally get parsed and indexed - and are searchable.  If you click on it, it will be opened by the browser or downloaded, depending on the file type.

  • Flash Card: with this plugin we're moving away from the very general, and into specific use cases.  You specify the source of your data (the "label" name, such as "German Vocabulary"), and what field to show on side A.  When you click on it, all the other fields are shown as well (as seen in the screenshot.)  Randomizing is handled by the plugin.  Future version might also record your answers, and preferentially quiz you on your weak spots.

The important point here is: "do you have a specific use case?  Well, just make your own plugin!"  A junior programmer with a little JavaScript, CSS and python ought to be able to put it together.

  • Timer : here's an example of a plugin that is widget-like.  It keeps its own data (which tone to use for the ringer) in the database, but doesn't interact with any other data

  •  Table of Contents (leftmost column): this is provided by the Category Page core module, and automatically populated

 

Cross-Linking of Content Items

With the frame of mind of graph databases, cross-linking is a natural operation to turn to!

For example, consider that e-book about the German language managed by the "document" plugin, and linked to the "German" category page.

What if you have another category page, for example called "Books in-progress", and that e-books really belongs there as well!  

No hair pulling needed to decide "which category to place it in"!

Unlike files on your OS folder, content managed by the Brain Annex app can (appear to) be in multiple places at once!  Same underlying object, linked to multiple category pages : if you edit the content item in one place, the edit will be reflected everywhere; if you delete it anywhere, it will gone.

On this example category page, "Books in-progress", we have 2 e-books ("document" plugins).  Notice that the German book is linked to - and will show up on - both this page and the "German" page.  Each link internally maintains its own positional value for its respective page: on this page, the German book appears as the first element, but on the "German" page it might be in the 34th position!

This page is shown in page-wide editing mode, toggled by an icon in the bottom right.  (Many Content Items also respond to a double-click on them, to enter a localized edit mode just for them.) 

Most of the controls, now exposed by the editing mode, are fairly self-explanatory; a few are annotated in the above screenshot.

As usual, a table of contents (left column) is automated generated.  Not shown is a rightmost column with an alphabetical listing of all the Categories that you have created. 

The purple box near the top left shows the traditional "breadcrumb navigation" from the "HOME" (root) Category to the one you're browsing.  In this case, it's a straightforward  

HOME » Books in-progress

but in general it will be multiple paths independently reaching the current page from the home one; that's because categories aren't restricted to a simple tree structure, but rather allow a web of connections ("Directed Acyclic Graph") among them, by means of "subcategory of" relationships.

 

Make Your Own Plugin?

A future entry will explore how to create your own plugin.  For now, please be aware that a plugin largely consists of:

  1. A front end, written in Vue 2, which provides the interactive UI.  The bulk of a plugin goes here.  Examples of existing plugin frontends.

  2.  A python backend, primarily to create the needed Schema and in some case perform specialized functions (such as the optional parsing of PDF files.)   Examples of existing plugin backends.

The names of the plugins that one wants to use in the web app must be declared in the Brain Annex app config file.  By default, all the maintained standard-issue plugins are enabled.

 

This article is part of a growing, ongoing series on Graph Databases and Neo4j

 

Comments

Popular posts from this blog

Discussing Neuroscience with ChatGPT

UPDATED Apr. 2023 - I'm excited by ChatGPT 's possibilities in terms of facilitating advanced learning .  For example, I got enlightening answers to questions that I had confronted when I first studied neuroscience.  The examples below are taken from a very recent session I had with ChatGPT (mid Jan. 2023.) Source: https://neurosciencestuff.tumblr.com In case you're not familiar with ChatGPT, it's a very sophisticated "chatbot" - though, if you call it that way, it'll correct you!  'I am not a "chatbot", I am a language model, a sophisticated type of AI algorithm trained on vast amounts of text data to generate human-like text'. For a high-level explanation of how ChatGPT actually works - which also gives immense insight into its weaknesses, there's an excellent late Jan. 2023 talk by Stephen Wolfram, the brilliant author of the Mathematica software and of Wolfram Alpha , a product that could be combined with ChatGPT to imp...

Graph Databases (Neo4j) - a revolution in modeling the real world!

UPDATED Oct. 2023 - I was "married" to Relational Databases for many years... and it was a good "relationship" full of love and productivity - but SOMETHING WAS MISSING! Let me backtrack.   In college, I got a hint of the "pre-relational database" days...  Mercifully, that was largely before my time, but  - primarily through a class - I got a taste of what the world was like before relational databases.  It's an understatement to say: YUCK! Gratitude for the power and convenience of Relational Databases and SQL - and relief at having narrowly averted life before it! - made me an instant mega-fan of that technology.  And for many years I held various jobs that, directly or indirectly, made use of MySQL and other relational databases - whether as a Database Administrator, Full-Stack Developer, Data Scientist, CTO or various other roles. UPDATE: This article is now part 1 of a growing, ongoing series on Graph Databases and Neo4j But ther...

Using Schema in Graph Databases such as Neo4j

UPDATED Feb. 2024 - Graph databases have an easygoing laissez-faire attitude: "express yourself (almost) however you want"... By contrast, relational databases come across with an attitude like a micro-manager:  "my way or the highway"... Is there a way to take the best of both worlds and distance oneself from their respective excesses, as best suited for one's needs?  A way to marry the flexibility of Graph Databases and the discipline of Relational Databases? This article is part 5 of a growing,  ongoing  series  on Graph Databases and Neo4j Let's Get Concrete Consider a simple scenario with scientific data such as the Sample, Experiment, Study, Run Result , where Samples are used in Experiments, and where Experiments are part of Studies and produce Run Results.  That’s all very easy and intuitive to represent and store in a Labeled Graph Database such as Neo4j .   For example, a rough draft might go like this:   The “labels” (b...

Interactomics + Super (or Quantum) Computers + Machine Learning : the Future of Medicine?

[Updated Mar. 2022] Interactomics today bears a certain resemblance to genomics in the  1990s...  Big gaps in knowledge, but an explosively-growing field of great promise. If you're unfamiliar with the terms, genomics is about deciphering the gene sequence of an organism, while interactomics is about describing all the relevant bio-molecules and their web of interactions. A Detective Story Think of a good police-detective story; typically there is a multitude of characters, and an impossible-to-remember number of relationships: A hates B, who loves C, who had a crush on D, who always steers clear of E, who was best friends with A until D arrived... Yes, just like those detective stories, things get very complex with our biological story!  Examples of webs of interactions, familiar to many who took intro biology, are the Krebs cycle for metabolism or the Calvin cycle to fix carbon into sugars in plant photosynthesis. Now, imagine vastly expanding those cyc...

What are Graph Databases - and Why Should I Care?? : "Graph Databases for Poets"

  This is a very gentle introduction to the subject.  The subtitle is inspired by university courses such as "Physics for Poets"!  (if you're technically inclined, there's an alternate article for you.) It has been said that "The language of physics (or of God) is math".  On a similar note, it could be said that: The language of the biological world - or of any subject or endeavor involving complexity - is networks ('meshes') What is a network?  Think of  it as the familiar 'friends of friends' diagram from social media. Everywhere one turns in biology, there's a network – at the cellular level, tissue level, organ level, ecosystem level.  The weather and other earth systems are networks.  Human societal organization is a network.  Electrical circuits, the Internet, our own brains...  Networks are everywhere! What can we do with networks, to better understand the world around us, or to create something that we need? Broadly ...

Using Neo4j with Python : the Open-Source Library "GraphAccess"

(UPDATED MAY 2026).   So, you want to build a python app or Jupyter notebook to utilize Neo4j, but aren't too keen on coding a lot of string manipulation to programmatic create ad-hoc Cypher queries?   You're in the right place: the GraphAccess library (formerly called NeoAccess) can do take care of all that, sparing you from lengthy, error-prone development that requires substantial graph-database and software-development expertise! This article is part 4 of a growing,  ongoing  series  on Graph Databases and Neo4j   "GraphAccess" is the bottom layer of the technology stack provided by the BrainAnnex open-source project .  All layers are very modular, and the GraphAccess library may also be used by itself , entirely separately from the rest of the technology stack.  (A diagram of the full stack is shown later in this article.) GraphAccess interacts with the Neo4j Python driver , which is provided by the Neo4j company, to acce...

Life123 : An OPEN-SOURCE Platform for Quantitative Interactomics

NOTE:  this entry was inspired by talks I gave at the "Bio-IT World 2025" conference in Boston, and at the "Aging & Gerontology 2025" conference in San Francisco.   A VIDEO VERSION also exists    (slightly shorter and outdated to Apr. 2025)    Life123 is an open-source platform for quantitative interactomics, aiming towards simulations of virtual biological cells or parts thereof – among other things. And it has a slogan:  AI and Big Data aren't enough! We also need Dynamical modeling. What does it mean to say "engine for quantitative reactomics"?  It means that we perform dynamical modeling of biological systems. And the initial focus is towards eventually creating whole-cell simulations. The platform consists of python libraries, which allow us to do in-silico experiments. Early this year, this project left the beta stage, after a few years of development. Motivation There's a practical motiva...

Photonic Computer - a "supercharged GPU" with very low energy consumption

Yes, we all wish for Quantum Computers... but in the meantime we need something here and now!  Could Photonic Computers fit that role? Just about everyone has heard of fiber optics – using light for data transmission – but did you know that light can also be used for computing? There's a new commercial product expected for early next year (2022) . I contacted the CEO, Nicholas Harris, of a 4-y.o. startup, Lightmatter , interviewed in April 2021 here . Photonic computers, at least in their first commercial appearance, are essentially accelerator cards for Linear Algebra - and so of special interest for Machine Learning and some types of simulations.    Their claims are remarkable: 10X faster than some of the best GPUs using 90% less energy can be used with existing software stacks, such as TensorFlow commercially available early next year (2022) a lot of future growth, as additional wavelengths of light get used in parallel My own inte...

Life123 : Quantitative Dynamical Modeling of Biological Systems

(UPDATED 8/2022) - Are we ready to embark on a next-generation detailed quantitative modeling of complex biological systems , including whole-cell simulations?  An anticipated up-jump in computing power may be imminent from Photonics computers (which I discuss here ), and GPU's are rapidly gaining power as well...  Are we in ready state to put existing - and upcoming - power to good use? This is a manifest, and a call to action What's Life123? It's about detailed quantitative modeling of biological systems in 1-D, 2-D and full 3-D, as well as a multi-faceted software platform for doing so. What's (pseudo-)1D?  For now, let's say it's like the inside of a long, thin tube - with no interactions with the tube.  Likewise, (pseudo-)2D can be thought of as a Petri dish, with no interactions with the lid or the bottom. Website : https://life123.science A purposeful decision to also utilize 1D and 2D But why?  Yes, it's in part about "walk before you run...

Graph Database SERIES - Beginners to Advanced, Full-Stack (Neo4j focus)

A growing, ongoing series on Graph Databases and Neo4j.  The series has grown so large that I'm "factoring out" their Table of Contents as a separate entry, here! A SERIES on Graph Databases and Neo4j part 0    (alternate version of part 1 for a general, non-technical audience)   :             What are Graph Databases - and Why Should I Care?? : "Graph Databases for Poets" part 1 : Intro to Graph Databases (Neo4j) - a revolution in modeling the real world! part 2 : Neo4j Sandbox Tutorial : try Neo4j and learn Cypher the free and easy way part 3 : Neo4j & Cypher Tutorial : Getting Started with a Graph Database and its Query Language  part 4 : Using Neo4j with Python : the Open-Source Library GraphAccess part 5 : Using Schema in Graph Databases such as Neo4j part 6  : Putting it All Together - a Technology Stack on Top of a Graph Database SPECIAL TOPICS *...