Skip to content

Repository files navigation

JavaScript Style Guide

Sampo-UI

A framework for building user interfaces for semantic portals.

Running development and production

Development

Copy the content of example.env into your own .env file.

Then run:

docker compose up

to run both client and server in development mode.

Make a copy of compose.yaml and edit the mounted volumes to point to your configs and run that to test in development mode.

Configs need to be mounted on server while custom components need to be mounted to client.

Production

To build client, server and combo images run:

docker compose -f compose-prod.yaml build 

Sampo-UI can be run as split client and server containers where the API_URL of the server can be set. The combo image can be used to run Sampo-UI as one container where the server is hosted on /api.

Documentation

Developer guide

Coding style

The JavaScript style guide, linter, and formatter module (named "standard" in package.json) is installed by default as development dependency. Do not install or create any additional style definitions or configurations. Instead, install an appropriate plugin for your text editor. If there are no plugins available for your favorite editor, it is highly recommended to switch into a supported editor.

Version 3.0.0 vs v4.0.0 onwards

Version 4 is a very major refactoring update that changed the way Sampo portals get built. See docs page and migration guide for more info. Version 3 code is available on the legacy-v3 branch of the repository.

The following research prototype portals used Sampo-UI version 3 or earlier as a base:

  1. NameSampo
  2. Mapping Manuscript Migrations
  3. WarVictimSampo 1914–1922
  4. LawSampo
  5. AcademySampo
  6. FindSampo
  7. HistorySampo
  8. LetterSampo
  9. Hellerau
  10. ParliamentSampo
  11. WarMemoirSampo
  12. WarSampo analyzer
  13. ArtSampo
  14. Constellations of Correspondence
  15. BookSampo

Extra: forking into the same organization account

In GitHub it's not possible to fork an organization's repository to that same organization. If a new repository needs to be created using the SemanticComputing organization account, here is an alternative workflow for forking:

  1. Clone this repository: git clone git@github.com:SemanticComputing/sampo-ui.git

  2. Set up a new GitHub repository. Do not initialize it with anything. It needs to be an empty repository. You can name it how you like and you can rename your local folder to match that.

  3. Copy the url of your new repository.

  4. With terminal go to the folder with the clone of this repository (sampo-ui).

  5. Change remote origin from sampo-ui to your new repository: git remote set-url origin [your new github repo here]

  6. Check that the origin changed to your new repository: git remote -v

  7. Push your local clone of sampo-ui to your new repository: git push

  8. Set sampo-ui as the upstream of your new repository: git remote add upstream git@github.com:SemanticComputing/sampo-ui.git

  9. When new commits appear on the sampo-ui repository you can fetch them to your new repository. The example fetches only master branch: git fetch upstream master

  10. Go to the branch of your new repository where you want to merge the changes in upstream. Merge, solve conflicts and enjoy: git merge upstream/master

Credits

Developed by the Semantic Computing Research Group (SeCo) and the Ghent Centre for Digital Humanities (GhentCDH).

Funded by FIN-CLARIAH and Clariah-VL.

Supported by CSC – IT Center for Science.

SeCo logo GhentCDH logo
Aalto University logo University of Helsinki logo HELDIG logo
FIN-CLARIN logo DARIAH-FI logo CLARIAH-VL logo

About

Sampo-UI – A framework for building user interfaces for semantic portals

Resources

Stars

46 stars

Watchers

11 watching

Forks

Releases

Packages

Used by

Contributors

Languages