1
0
Fork
You've already forked kbin-core
0
forked from Kbin/kbin-core
Kbin is a decentralized content aggregator and microblogging platform running on the Fediverse network.
  • PHP 81.7%
  • Twig 13%
  • SCSS 4%
  • JavaScript 1%
  • Dockerfile 0.2%
  • Other 0.1%
Find a file
2023年03月26日 11:31:55 +02:00
assets Magazine panel trash, theme, general 2023年03月25日 14:13:10 +01:00
bin Initial commit 2021年01月14日 17:39:26 +01:00
config Magazine panel trash, theme, general 2023年03月25日 14:13:10 +01:00
docker Subject comments js init 2023年03月17日 19:17:07 +01:00
docs/images Readme update 2023年03月09日 15:57:30 +01:00
migrations Magazine panel trash, theme, general 2023年03月25日 14:13:10 +01:00
public Media entries create init 2023年03月22日 15:04:16 +01:00
src Moderation init 2023年03月26日 11:31:55 +02:00
templates Moderation init 2023年03月26日 11:31:55 +02:00
tests Badges magazine panel, magazine icon refactor 2023年03月25日 10:20:06 +01:00
translations Magazine panel trash, theme, general 2023年03月25日 14:13:10 +01:00
.dockerignore Docker update 2022年08月10日 11:04:45 +02:00
.env.example Site title, filters scss prefixes 2023年02月26日 11:17:05 +01:00
.env.test Tests, translations Entries, Posts 2023年02月13日 18:30:26 +01:00
.gitignore Reformat 2023年03月05日 14:22:38 +01:00
.php-cs-fixer.cache Fix tests 2023年03月18日 13:40:06 +01:00
clover.xml Some profile tests 2021年04月21日 22:27:31 +02:00
composer.json Expand post comments 2023年03月16日 12:20:41 +01:00
composer.lock Expand post comments 2023年03月16日 12:20:41 +01:00
docker-compose.override.yml Docker update 2022年08月10日 11:04:45 +02:00
docker-compose.prod.yml Docker update 2022年08月10日 11:04:45 +02:00
docker-compose.yml Remove elasticsearch 2023年02月27日 15:11:15 +01:00
Dockerfile Remove elasticsearch 2023年02月27日 15:11:15 +01:00
LICENSE Create LICENSE 2022年02月09日 22:48:07 +01:00
package-lock.json Site title, filters scss prefixes 2023年02月26日 11:17:05 +01:00
package.json Entry link create js init, infinity scroll - useIntersection 2023年03月22日 09:38:00 +01:00
phpcs.xml Code sniffer, fix php standard violations 2021年01月18日 09:51:37 +01:00
phpunit.xml.dist Some profile tests 2021年04月21日 22:27:31 +02:00
README.md Readme update 2023年03月09日 17:21:23 +01:00
symfony.lock Remove elasticsearch 2023年02月27日 15:11:15 +01:00
webpack.config.js Remove old views and components, init entry views 2023年02月02日 19:06:08 +01:00
yarn.lock Entry link create js init, infinity scroll - useIntersection 2023年03月22日 09:38:00 +01:00

Kbin

Maintainability Test Coverage

Kbin is a decentralized content aggregator and microblogging platform running on the Fediverse network. It can communicate with many other ActivityPub services, including Mastodon, Lemmy, Pleroma, Peertube. The initiative aims to promote a free and open internet.

This is a very early beta version, and a lot of features are currently broken or in active development, such as federation.

Currently, a new frontend is being implemented on develop branch. In the next stage, a similar refactor will go through the backend and the project will be prepared for contribution.


Apps

Libraries

Getting Started

Requirements

https://symfony.com/doc/6.1/reference/requirements.html

  • PHP version: 8.1 or higher
  • GD or Imagemagick php extension
  • NGINX / Apache / Caddy
  • PostgreSQL
  • Redis (optional)
  • Mercure (optional)
  • RabbitMQ (optional)
  • Elasticsearch (optional) (deprecated)
  • Cardano Node, Cardano Wallet (optional) (deprecated)

Frontend

https://github.com/symfony/ux

$ yarn install
$ yarn build

Install with Docker

Based on https://github.com/dunglas/symfony-docker

Develop

  1. If not already done, install Docker Compose
  2. Run docker compose build --pull --no-cache to build fresh images
  3. Run docker compose up (the logs will be displayed in the current shell)
  4. Open https://app.localhost in your favorite web browser and accept the auto-generated TLS certificate
  5. Run docker compose down --remove-orphans to stop the Docker containers.
$ docker compose exec php bin/console doctrine:fixtures:load
$ docker compose exec php bin/phpunit
# Using Xdebug
# Linux / Mac
$ XDEBUG_MODE=debug docker compose up -d
# Windows
$ set XDEBUG_MODE=debug&& docker compose up -d&set XDEBUG_MODE=

Production

$ APP_ENV=dev SERVER_NAME=dev.karab.in \
APP_SECRET=acme \
CADDY_MERCURE_JWT_SECRET='!ChangeThisMercureHubJWTSecretKey!' \
POSTGRES_USER=kbin \
POSTGRES_PASSWORD=acme \
POSTGRES_DB=kbin \
CADDY_MERCURE_URL="https://example.com/.well-known/mercure" \
KBIN_DEFAULT_LANG=pl \
docker compose -f docker-compose.yml -f docker-compose.prod.yml up -d

Deploying on Multiple Nodes

If you want to deploy your app on a cluster of machines, you can use Docker Swarm, which is compatible with the provided Compose files.

Configuration

Admin user

# Create new user (without email verification)
$ docker compose exec php bin/console kbin:user:create username email@exmple.com password
# Grant administrator privileges
$ docker compose exec php bin/console kbin:user:admin username

Media

$ mkdir public/media
$ chmod 755 public/media
$ chown 82:82 public/media

Elasticsearch

$ docker compose exec php bin/console fos:elastica:create
$ docker compose exec php bin/console fos:elastica:populate

JWT keys

// @todo 

Next, set up your instance https://localhost/admin

Backup and restore

Database

# Backup
$ docker exec -it database pg_dump -U kbin kbin > dump_`date +%d-%m-%Y"_"%H_%M_%S`.sql
# Restore
$ docker compose exec -T database psql -U kbin kbin < dump.sql

Images

// @todo rsync

Troubleshooting

Editing Permissions on Linux

If you work on linux and cannot edit some of the project files right after the first installation, you can run docker compose run --rm php chown -R $(id -u):$(id -g) . to set yourself as owner of the project files that were created by the docker container.

Logs

$ docker compose logs -f
$ docker compose exec php tail var/log/prod.log

Cache

$ docker compose exec php bin/console cache:clear

Federation

Official Documents

Unofficial Sources

Documentation

Sponsors and partners

NGI Zero Entrust

BrowserStack

blackfire.io

JetBrains

Contributing

License

AGPL-3.0 license