Skip to content

gbv/bartoc.org

Repository files navigation

BARTOC.org

License Docker Test

Basic Register of Thesauri, Ontologies & Classifications (BARTOC)

This repository contains the web interface of BARTOC.org, run by VZG.

The application is currently being reconstructed funded by DFG.

Table of Contents

Install

Requirements

Requires at least Node.js 18 and an instance of jskos-server to connect to. Additional dependencies are listed in package.json.

Install from sources

git clone https://github.com/gbv/bartoc.org.git
cd bartoc.org
npm ci

Docker

You can also set up BARTOC via Docker. Please refer to our Docker docs.

Setup

A setup script is provided in ./bin/setup.sh. It must be called with the path to your jskos-server installation, e.g.:

./bin/setup.sh ../jskos-server

Configuration

Basic configuration is located in config/config.default.json. Selected fields can be overridden in a local config/config.json. The latter should at least include a link to a JSKOS server instance, e.g.:

{
  "backend": {
    "provider": "ConceptApi",
    "api": "http://localhost:3000/"
  }
}

To be able to log in, add, and edit vocabularies, you need to setup and configure an instance of Login Server as well (example for local installation):

{
  "login": {
    "api": "localhost:3004/",
    "ssl": false
  }
}

jskos-server Configuration

To be able to use the full functionality of BARTOC, your jskos-server installation must allow concept schemes to be written via the API, e.g.:

{
  "schemes": {
    "read": {
      "auth": false
    },
    "create": {
      "auth": true
    },
    "update": {
      "auth": true,
      "crossUser": true
    }
  }
}

Via an array identities under schemes, you can limit which identity URIs can write vocabulary data.

Data flow

Dotted elements are not implemented yet.

graph TD
    server[**server**: express]
    client[**client**: Vue]
    login(login-server)
    search[**search**]
    database[**database**: jskos-server]
    terminologies(terminology services)
    terminologies -- JSKOS API, Skosmos, ... --> client
    server -- RDF & JSKOS --> applications(applications)
    client <-- browser --> user(user)
    subgraph app [**bartoc.org**]
        database <-- JSKOS API --> client
        database -- JSKOS API --> server
        server -- HTML+JS --> client
        search -.-> server
        server -.-> client
        database -.-> search
        reports[**reports**]
        database -.-> reports
    end
    server -.-> applications
    database -- JSKOS API --> applications
    login --> client
    reports -.-> client
    reports -.-> applications
Loading

Development

npm run dev

The application is made available at http://localhost:3883/.

CSS approach

BARTOC uses Bootstrap for layout and baseline components, plus a small shared CSS layer in static/css/layout.css.

The --cc-* custom properties define semantic design tokens shared across BARTOC and the coli-conc application family. They cover colors, font sizes, spacing, radii, borders, and list/table row rhythm.

Color tokens:

Token Current value Use
--cc-color-primary #b13f13 Main brand/action color.
--cc-color-primary-hover #c8623b Hover state for primary actions.
--cc-color-secondary #e9e1e1 Secondary brand/support color.
--cc-color-accent #f1ecea Soft highlight, selected rows, action backgrounds.
--cc-color-danger #dc3545 Destructive actions and error-like states.
--cc-color-danger-hover #bd2130 Hover state for destructive actions.
--cc-color-text #212121 Main readable text.
--cc-color-muted #6c757d Secondary text and low-emphasis UI.
--cc-color-link #8b2406 Standard link color.
--cc-color-page #f6f3f3 Page background.
--cc-color-surface #fff Cards, controls, and raised surfaces.
--cc-color-surface-muted #fcfcfc Subtle surface background.
--cc-color-on-primary #fff Text/icons on primary or danger backgrounds.

Font sizes use rem values so they follow the browser/root font size:

  • --cc-font-size-sm: 0.875rem, usually 14px.
  • --cc-font-size-base: 1rem, usually 16px.
  • --cc-font-size-lg: 1.25rem, usually 20px.
  • --cc-font-size-xl: 1.75rem, usually 28px.

Font weights follow the coli-conc scale:

  • --cc-font-weight-light: 400.
  • --cc-font-weight-regular: 600.
  • --cc-font-weight-bold: 700.

The helper classes font-weight-light, font-weight-regular, and font-weight-bold use these tokens. This means font-weight-light is intentionally 400 in BARTOC's shared layer, not Bootstrap's default 300.

Use --cc-space-* for page and component spacing, and --cc-row-* for compact repeated rows, lists, and table-like UI. Bootstrap spacing utilities can still be used for ordinary layout when they already fit.

Button semantics:

Class Use
cc-button-primary Main action in the current context, such as save/search/edit.
cc-button-secondary Neutral actions, such as cancel/reset.
cc-button-action Positive utility actions, such as download/export/report.
cc-button-danger Destructive actions, such as clear/remove.
cc-button-ghost Low-emphasis filters or inactive toggles.
cc-button-selected Selected/toggled state.
cc-button-on-primary Action placed on a primary-colored surface, such as the header.

Publish

For maintainers only

Never work on the main branch directly. Always make changes on dev and then run the release script:

npm run release:patch # or minor or major

Deployment

The application is deployed at https://bartoc.org/.

Update an existing installation:

git pull
npm install
pm2 restart bartoc.org

Note that NODE_ENV has to be set to production, otherwise Vue files will be requested from the dev server. This is given when using npm run start.

Database dumps and statistics

To regularly update dumps, add a cronjob with command npm run dump update. Dumps will be placed in directory data/dumps and statistics are placed in data/reports. To compare two dump files run npm run dump diff.

About

Source code of BARTOC.org user interface

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors