This guide is organized into several sections, each approachable independently: a brief introduction to the core ideas (Brief Introduction), the project's own p
This file was created for the benefit of all AIEDucators, teachers, students, developers and parents wanting to use Kastalia Knowledge Management System (KMS) c
Kastalia Knowledge Management System, or simply ``Kastalia KMS'', is a system for collaborative web-publishing, data-management and archivation of structured i
A graph, in the mathematical sense, is simply a set of nodes together with a set of edges connecting pairs of nodes. Kastalia treats its entire universe of disc
A knowledge graph is a graph whose nodes and edges are meant to be interpreted, not just traversed: nodes stand for entities or ideas, and edges carry a specifi
The two fundamental tables of Kastalia's database are knots and bounds.A knot is a single addressable unit of content: it has a unique knot_id, a knot_name (its
A template is the piece of code that decides how a given knot (and, typically, its neighbours in the graph) gets turned into an actual page a human can read. Ka
Every bound needs a predicate: a short, fixed vocabulary word that says exactly how its subject knot relates to its object knot. Kastalia constrains this vocabu
Kastalia did not appear out of nowhere. This section gathers the three threads that, braided together, led to the system as it exists today: the philosophical c
Kastalia is named after Hermann Hesse's Castalia, the walled province of pure intellectual play in The Glass Bead Game -- a deliberate signal that the system is
Beyond Hesse's Glass Bead Game, Kastalia's design draws loosely on a handful of other fictional and speculative treatments of knowledge-as-structure: Borges' Li
Kastalia grew, over several years, out of earlier and smaller tools built for recording, annotating and replaying spoken language data -- the is_uttered_as, ill
Kastalia's backend is a Perl application built on the Dancer2 web framework, storing its graph in PostgreSQL. This section describes the two layers that matter
Two tables carry almost the entire system: knots(knot_id, knot_name, knot_content, attributes hstore) and bounds(bound_id, sub, predicate, obj, ord, bound_creat
The application's Perl code lives under lib/Kastalia/. Main.pm defines almost every HTTP route -- what URL does what. Core.pm, TT.pm, SelectorQueries.pm and API
What a visitor actually sees is produced entirely by server-rendered Template::Toolkit templates -- there is no separate client-side application framework. This
Kastalia configures Template::Toolkit with custom delimiters -- instead of TT's usual [% and %] -- and with ANYCASE enabled, so template directives are not case
A non-exhaustive sample of the templates this system actually uses, to give a sense of the range:knot is the plain default view, rendering a knot's content and
Subject is an umbrella term / hyperonym / supertype of the object (hyponym). is_parent is the very first predicate implemented and used in Kastalia and for man
Subject (meronym) is a part of object (holonym). Similar to is_parent and contains predicates but with flipped order of parameters.Used mainly by HMPL and BDLP
Specifies relation between knot containing text T and knot containing speech recording of one single act of uttering T.Used by templates play, read and paaren.
Predicate of type "illustrates" specifies relation between subject knot I whose attribute img_url contains URL of illustration of the object knot.Used by practi
Attributes are the free-form, per-knot metadata stored in the attributes hstore column. A handful of names recur often enough across templates to be worth knowi