|
23 hours ago | |
---|---|---|
assets | 1 day ago | |
bin | 2 years ago | |
config | 6 days ago | |
docker | 4 weeks ago | |
docs/images | 2 weeks ago | |
migrations | 5 days ago | |
public | 1 week ago | |
src | 1 day ago | |
templates | 23 hours ago | |
tests | 1 month ago | |
translations | 23 hours ago | |
.dockerignore | 10 months ago | |
.env.example | 7 days ago | |
.env.test | 4 months ago | |
.gitignore | 3 months ago | |
.php-cs-fixer.cache | 2 months ago | |
Dockerfile | 1 month ago | |
LICENSE | 1 year ago | |
README.md | 1 week ago | |
clover.xml | 2 years ago | |
composer.json | 7 days ago | |
composer.lock | 7 days ago | |
docker-compose.override.yml | 10 months ago | |
docker-compose.prod.yml | 10 months ago | |
docker-compose.yml | 3 weeks ago | |
package-lock.json | 2 months ago | |
package.json | 2 weeks ago | |
phpcs.xml | 2 years ago | |
phpunit.xml.dist | 2 years ago | |
symfony.lock | 7 days ago | |
webpack.config.js | 4 months ago | |
yarn.lock | 2 weeks ago |
README.md
Kbin
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.
- https://kbin.pub - project website
- https://karab.in - polish-lang instance
- https://dev.karab.in - instance for testing purposes only (develop branch)
Apps
- kbin-mobile (Flutter / Dart) (currently transferred)
Libraries
- kbin-js-client (TypeScript) (currently transferred)
- kbin-dart-client (Dart) (currently transferred)
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
$ yarn install
$ yarn build
Install with Docker
Based on https://github.com/dunglas/symfony-docker
Develop
- If not already done, install Docker Compose
- Run
docker compose build --pull --no-cache
to build fresh images - Run
docker compose up
(the logs will be displayed in the current shell) - Open
https://app.localhost
in your favorite web browser and accept the auto-generated TLS certificate - 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
- A highly opinionated guide to learning about ActivityPub
- ActivityPub as it has been understood
- Schema Generator 3: A Step Towards Redecentralizing the Web!
- API Platform ActivityPub
Documentation
- Kbin REST API Reference
- Kbin ActivityPub Reference
- Kbin GraphQL Reference
- Fediverse Developer Network
Languages
- English
- Polish
- Dutch (Vistaus)
Credits
- grumpyDev: Logotype, icons, kbin-theme
Support us
Contributing
- Official repository
- Translations (currently transferred)