Skip to main content

Architecture

This document presents Djehooty's architecture and certain technical concepts that are not exposed in the user guide. Understanding these concepts is essential for effectively contributing to the project and navigating the source code.

Architecture

TODO

Concepts

Entity

An entity (Entity) is a generic concept that encompasses individuals, events, places, and organizations. It allows the representation of any genealogical or contextual data, to which a unique identifier is assigned.

Layer

The layer (Layer) is a generic concept grouping files, file instances, documents, and selections. It allows the representation of any documentary data, to which a unique identifier is also assigned.

Pointer

The pointer (Pointer) is an internal concept that generalizes the notion of entity and layer. It allows abstract referencing of both entities and layers, thus facilitating the management of links and associations in the application.

Identification

Identification refers to the association between an entity and a layer. For example, it is possible to identify an individual on a document, an individual on a file instance, or a place on a document. This mechanism allows precise linking of contextual or genealogical information to documentary elements, thus enriching the data structure and information retrieval.

Selection

A selection designates a rectangular area defined within a given image.

It is characterized by the coordinates of two points (upper left corner and lower right corner) delimiting the selection rectangle. An index allows specifying, for example, the page in a PDF or the second in a video.

Coordinates are always expressed relative to the original image of the selected file. In case of image rotation, the selection coordinates remain unchanged.

A selection can be modified (coordinate adjustment), but to change the associated file or index, it is necessary to create a new selection.

Database model

Djehooty creates a SQLite relational database djehooty.db, local, located in the User Directory folder.

The detailed structure of the database and the base data that are injected during installation can be consulted on the djehooty-backend Git repository.

TableDescription
files_documents
document_types
usersDjehooty users. By default there is only one for now.
entities
entities_types
identifications
individuals
layers
layers_types
selections
thumbnailsThumbnails (images) generated from a file
filesAll files (uuid, media type, sha256, size)
files_instancesFile instances with information related to original file system data (filename, import date, modification, etc.)
files_thumbnailsAssociation table between a file and a thumbnail
documentsAll documents