# STJÓRNA

STJÓRNA was created to have an easy product management with the possibility to access the categories and products over an simple just readable REST API.

stjorna logo

# Features

STJÓRNA is islandic and means something like manage or store stuff. The two main goal of STJÓRNA are to be very simple in the setup and configuration effort. The second goal was to publish and share the stored data over an REST API with other applications, maybe your website. So it is like a CMS for changing data like products or just images on your website. The implementation on the client side is very easy and do not require much effort.

  • Availability of REST API for third-party applications
  • Easy setup, you will be ready in minutes
  • Language support for German and English
  • Possibility to export all your data as a JSON, Excel or complete backup as a ZIP file - No vendor lock!
  • Open Source software - hosted on Github
  • Optional Matomo Tracking over the REST API to monitor loading activity on categories and products

CircleCI(opens new window) (opens new window) (opens new window) Codacy Badge(opens new window) Join the chat at https://gitter.im/secanis/stjorna(opens new window)

https://hub.docker.com/r/secanis/stjorna(opens new window)

# Get Started

You have two possibilities how you can start/deploy STJÓRNA.

You have to call https://stjornaurl/setup to configure your system initially.

# Docker

You can directly pull the official Docker image from Docker Hub.

docker pull secanis/stjorna
docker run -p 80:3000 secanis/stjorna

# for persisting your data
docker run -p 80:3000 -v path/to/storage:/app/data secanis/stjorna

# NodeJS

Download the compressed package and unpack it in a NodeJS environment. Default Port is 3000.

# in this case your persist data will be under ./data
node server/server.js

# execute server api tests
cd server; npm run test

Do not forget to set the NodeJS production mode: process.env.NODE_ENV = 'production'!

# Configuration

# Setup

After the first start, you have to configure your STJÓRNA instance. You can reach the setup url over https://stjornaurl/setup. In the setup process you can set the username, email and a password. After an initial setu

stjorna setup page

# ENV Variables

Variable Default Description
STJORNA_SERVER_PORT 3000 Port for the Node server
STJORNA_SERVER_MAX_UPLOAD 512mb Max image upload size, defined for Express
STJORNA_LOGLEVEL info Loglevel (WinstonJS loglevels(opens new window) , slient for no logs)
STJORNACONFIG_IMAGE_WIDTH 700 Image width for save process
STJORNACONFIG_IMAGE_HEIGHT 700 Image width for save process
STJORNACONFIG_IMAGE_QUALITY 70 Image quality, between 0-100%
STJORNA_REQUEST_LOG Set to slient for no logs
STJORNA_CRON_CLEANUP_INTERVAL 00 3 * * * Cronjob interval to cleanup the storage
STJORNA_SERVER_STORAGE /app/data Default path is in the path of the server.js data folder
STJORNA_MATOMOID Optional: PageId in Matomo to track API calls
STJORNA_MATOMOURL Optional: Url of your Matomo instance, end with (/piwik.php)
STJORNA_MATOMOTOKEN Optional: Token to send more specific data to Matomo

# Remote REST API

For your third party application, in which one you want to use the public REST API, you can use the following documentation. You can load the active categories and products over this REST API including your API Key/Token.

You can enable/disable the complete API or you enable/disable categories or products.

Remote REST API Documentation(opens new window)

# HTTPS / Proxy

We do not provide SSL at the moment, STJÓRNA is designed to run behind a reverse proxy which is terminating HTTPS. Our setup is running a Traefik(opens new window) proxy in front of STJÓRNA.

We would strongly recommend to use SSL if you use STJÓRNA!

# Migration / Data Backup

If you have to migrate from a Webhosting or Cluster to another Stjorna will support you with an export and import feature for the complete database. You have two possibilities how to backup/restore your data.

  • Backup/Restore over the API To create a backup you need a login or over the API is are the API Tokens required.
  • Backup Restore over the UI You can restore a backup directly during the setup process, then there are no credentials required. If you want to restore an old version during a running Stjorna instance, you have to login, before you can restore an old backup.

# Screenshots

stjorna login page

stjorna dashboard page

stjorna settings page

# Contribution

It would be very nice, when you give us a feedback or when you create issues if you detect problems or bugs. If you want to fix it yourself or you have an idea for something new, please create a PR, that would help us a lot.

Happy Coding ❤️ ...

Last Updated: 10/10/2020, 4:14:40 PM