steinarb / ratatoskr

An OSGi and Java based ActivityPub server

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Ratatoskr

This application is intended to become an ActivityPub node, implemented in Java and running on apache karaf.

The name ratatoskr is taken from the squirrel that runs up and dow the world tree Yggdrasil, in Norse mythology, bearing news.

Development status

https://github.com/steinarb/ratatoskr/actions/workflows/ratatoskr-maven-ci-build.yml/badge.svg https://coveralls.io/repos/github/badges/shields/badge.svg?branch=master https://sonarcloud.io/api/project_badges/measure?project=steinarb_ratatoskr&metric=alert_status#.svg

https://sonarcloud.io/images/project_badges/sonarcloud-white.svg

https://sonarcloud.io/api/project_badges/measure?project=steinarb_ratatoskr&metric=sqale_index#.svg https://sonarcloud.io/api/project_badges/measure?project=steinarb_ratatoskr&metric=coverage#.svg https://sonarcloud.io/api/project_badges/measure?project=steinarb_ratatoskr&metric=ncloc#.svg https://sonarcloud.io/api/project_badges/measure?project=steinarb_ratatoskr&metric=code_smells#.svg https://sonarcloud.io/api/project_badges/measure?project=steinarb_ratatoskr&metric=sqale_rating#.svg https://sonarcloud.io/api/project_badges/measure?project=steinarb_ratatoskr&metric=security_rating#.svg https://sonarcloud.io/api/project_badges/measure?project=steinarb_ratatoskr&metric=bugs#.svg https://sonarcloud.io/api/project_badges/measure?project=steinarb_ratatoskr&metric=vulnerabilities#.svg https://sonarcloud.io/api/project_badges/measure?project=steinarb_ratatoskr&metric=duplicated_lines_density#.svg https://sonarcloud.io/api/project_badges/measure?project=steinarb_ratatoskr&metric=reliability_rating#.svg

Installing the ratatoskr application

First clone and build the sample application:

mkdir -p ~/git/
cd ~/git/
git clone https://github.com/steinarb/ratatoskr.git
cd ~/git/ratatoskr/
mvn install

Then give the following commands to the karaf console:

feature:repo-add mvn:no.priv.bang.ratatoskr/karaf/LATEST/xml/features
feature:install ratatoskr-with-derby

Then:

  1. open http://localhost:8181/ratatoskr in a web browser
  2. log in as user “jad” with password “1ad”
  3. click on counter and use “-” and “+” to change the value
  4. try editing the step size, wait a few seconds and then observe that “+” and “-” change the value with the step size
  5. Navigate to the top page and log out
  6. Log in as user “jod” with password “johnnyBoi” and observe that you end in a “not authorized page” (the user exists but do not have the role of the app)
  7. Log out and log back in as user “jad”, navigate to the “counter” page, and observe that the count is like you left it (the count is persisted in the database)

Configuring a new default locale

Out of the box, the sample application supports two locales: nb_NO (Norwegian bokmål) and en_GB (UK English).

The locale texts are provided by a Java resource bundle, and new languages can be added by adding them to the bundle and to the available locales returned by the RatatoskrService.

The default locale is nb_NO.

It is possible to persistently configuring the default locale to en_GB with the following commands in the karaf console command line:

config:edit no.priv.bang.ratatoskr.backend.RatatoskrServiceProvider
config:property-set defaultlocale en_GB
config:update

Note! The name of the config file will change when the package name and classname of the class changes in a new application based on this one, so adjust the command example accordingly.

License

This software is licensed with the Apache License v2. See the file LICENSE for details.

About

An OSGi and Java based ActivityPub server

License:Apache License 2.0


Languages

Language:Java 77.0%Language:JavaScript 21.8%Language:HTML 0.8%Language:CSS 0.4%