Skip to content

Latest commit

 

History

53 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MatGUI — Matdata

A simple, clean website to host MatGUI (a modern knowledge graph and SPARQL workbench, formerly Yasgui) without Node.js or Docker dependencies. This is a pure HTML/CSS/JavaScript implementation that can be deployed easily to any static hosting service.

🌐 Live Demo: https://matgui.matdata.eu

Features

  • Clean and minimal MatGUI interface
  • No build process required - just HTML, CSS, and JavaScript
  • Easy deployment to GitHub Pages or any static hosting
  • Pre-configured with popular SPARQL endpoints
  • Extended with graph visualization and geo plugins

Built With

Default SPARQL Endpoints

The application comes pre-configured with the following SPARQL endpoints:

  • ERA (European Railway Agency): https://data-interop.era.europa.eu/api/sparql
  • DBpedia: https://dbpedia.org/sparql
  • Wikidata: https://query.wikidata.org

Deployment Example

This project demonstrates how to deploy MatGUI without Node.js or Docker - just plain HTML files served statically.

Deploy to GitHub Pages

  1. Fork or clone this repository
  2. Enable GitHub Pages in repository settings
  3. Set the source to the main branch and /src folder (or use the included GitHub Actions workflow)
  4. Your MatGUI instance will be available at https://yourusername.github.io/repository-name/

Deploy to Any Static Host

Simply upload the contents of the src/ folder to any static web hosting service:

# Contents of src/ folder:
- index.html      # Main HTML file
- main.js         # MatGUI configuration
- main.css        # Custom styles
- logo.svg        # Matdata logo
- favicon.png     # Site favicon
- manifest.json   # PWA manifest
- robots.txt      # Search engine instructions

No build step required! The files can be served directly.

Local Development

To run locally, simply open src/index.html in a web browser, or use any local static server:

# Using Python
cd src
python -m http.server 8000

# Using PHP
cd src
php -S localhost:8000

# Using Node.js (http-server)
cd src
npx http-server

Then visit http://localhost:8000 in your browser.

Customization

Adding SPARQL Endpoints

Edit src/main.js and add endpoints to the endpointCatalogueOptions.getData() array:

{
  endpoint: "https://your-sparql-endpoint.com/sparql",
}

Styling

Modify src/main.css to customize the appearance of the interface.

Configuration

The MatGUI instance can be configured in src/main.js. See the MatGUI documentation for available options.

Demo Queries

The site ships with a read-only "MatGUI demo queries" workspace: over 100 ready-to-run queries for ERA RINF, the EU Publications Office (authority tables, EuroVoc, Cellar), data.europa.eu, GeoSPARQL on Apache Jena, Wikidata, DBpedia, OpenStreetMap (QLever), UniProt, Getty and AGROVOC, plus CONSTRUCT queries that show off the Graph plugin (icons, images, compact mode, node expansion) and federated queries that combine several endpoints with SERVICE. Open them with the Demo queries link in the footer or from the query browser.

The queries are plain .rq files in demo-queries/. Each sub-directory is a workspace folder; folder labels, default endpoints and endpoint aliases are defined in demo-queries/workspace.json. Every file starts with a small header:

#+ name: Operational points per country
#+ description: Counts operational points per member state.
#+ endpoint: era        # optional when the folder has a default; alias or full URL
PREFIX era: <http://data.europa.eu/949/>
SELECT ...

scripts/demo_queries.py converts the files into the RDF model of MatGUI's SPARQL workspaces (yasgui:Workspace, yasgui:WorkspaceFolder, yasgui:ManagedQuery, yasgui:ManagedQueryVersion):

pip install rdflib
python scripts/demo_queries.py validate     # syntax + metadata checks
python scripts/demo_queries.py build        # writes build/matgui-demo.ttl
python scripts/demo_queries.py smoke-test   # runs every query against its endpoint

The Demo queries workflow validates and smoke-tests the queries on every change, and on main (plus nightly) replaces the default graph of the matgui-demo dataset on jena.matdata.eu using the Graph Store Protocol. It needs the JENA_USERNAME and JENA_PASSWORD repository secrets; the dataset URL can be overridden with the JENA_DATASET_URL repository variable.

Credits

License

See LICENSE file for details.

Contributors

Languages