Skip to content

A Matrix bridge to ActivityPub. Mirror of https://gitlab.com/kazarma/kazarma. For issues and pull requests, please use GitLab.

License

Notifications You must be signed in to change notification settings

technostructures/kazarma

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Kazarma

Latest release Artifact Hub

CI status Coverage report Translation status

Matrix room REUSE status Contributor Covenant

A Matrix bridge to ActivityPub. It uses this ActivityPub library and those Matrix libraries.

overview

Installation

Translation

Translation happens on Hosted Weblate.

translation status

Development environment

Using Docker

git clone git@gitlab.com:kazarma/kazarma.git
cd kazarma
git submodule update --init --recursive
docker compose run --rm synapse generate
docker compose run --rm kazarma mix do deps.get, ecto.setup
docker compose run --rm kazarma npm --prefix assets install
docker compose up

On Linux, use docker-hoster to make container domains accessible:

docker run -d \
    -v /var/run/docker.sock:/tmp/docker.sock \
    -v /etc/hosts:/tmp/hosts \
    --name docker-hoster \
    dvdarias/docker-hoster@sha256:2b0e0f8155446e55f965fa33691da828c1db50b24d5916d690b47439524291ba

(after rebooting, you will need to start it again using docker start docker-hoster)

This should run containers with those services:

  • kazarma.kazarma.com -> Kazarma itself
  • matrix.kazarma.com -> Matrix server
  • kazarma.com -> serves .well-known routes that allow Matrix and Kazarma.ActivityPub to use simple kazarma.com domain (for users, etc)
  • pleroma.com -> Pleroma, should be able to address Matrix users using kazarma.com domain
  • element.com -> Element, will connect to Synapse, should then be able to address Pleroma users using pleroma.com domain

You can also start an IEx console:

docker compose run --rm kazarma iex -S mix

On macOS

On macOS, instead of docker-hoster you need to add the following domains to your /etc/hosts file:

# Kazarma development domains
127.0.0.1 kazarma.com
127.0.0.1 kazarma.kazarma.com
127.0.0.1 matrix.kazarma.com
127.0.0.1 pleroma.com
127.0.0.1 element.com

Then the docker-compose.yml file should (at least) expose the 80 port in the traefik container:

  traefik:
    image: traefik:v2.2.0
    ports:
      - 80:80
      - 443:443

Reset databases

docker compose rm -fs postgres_kazarma postgres_pleroma synapse
docker volume rm kazarma_postgres_pleroma_files kazarma_postgres_kazarma_files kazarma_synapse_files
docker compose run --rm synapse generate
docker compose run --rm kazarma mix ecto.setup

Without using Docker

git clone git@gitlab.com:kazarma/kazarma.git
cd kazarma
git submodule update --init --recursive
mix do deps.get, ecto.setup
iex -S mix phx.server

Run tests

mix test

Generate documentation

We use ditaa to generate diagrams and integrate them into HexDoc. To edit diagrams use asciiflow and paste the result in HTML files in the doc_diagrams folder.

rm doc_diagrams/*.png && ditaa doc_diagrams/*.html
mix docs

Sponsors

Kazarma receives funding from NLnet through the NGI0 Entrust Fund.

If you'd like to apply, check out how in this video!

License

This project is available as open source under the terms of the AGPLv3. For accurate information, please check individual files.