3
8
Fork
You've already forked digitigrade
4
experimental server for development of pawpub protocol https://pawpub.entities.org.uk/digitigrade
  • PHP 91.9%
  • CSS 7.5%
  • Shell 0.5%
  • Hack 0.1%
winter Sparkles 59aeb7b036 i forgot how named parameters work
this is what i get for not writing any php in ages
2026年07月03日 02:54:48 +01:00
bin allow changing indexable setting 2025年03月30日 19:18:51 +01:00
Digitigrade add IDN support in various ui places 2026年07月02日 19:07:41 +01:00
locale add rudimentary language option and improve reply scope stuff 2026年05月09日 15:50:43 +01:00
migrations implement extension objects at a basic level 2025年05月07日 19:37:08 +01:00
misc [breaking] change poke extension to use form-urlencoded instead of json 2025年03月24日 19:19:11 +00:00
plugins add plugin support 2025年03月26日 21:59:44 +00:00
routes add rudimentary language option and improve reply scope stuff 2026年05月09日 15:50:43 +01:00
static sql console in admin menu + other misc 2025年05月11日 20:25:11 +01:00
templates i forgot how named parameters work 2026年07月03日 02:54:48 +01:00
upload implement object storage 2025年01月18日 00:22:36 +00:00
.gitignore add plugin support 2025年03月26日 21:59:44 +00:00
blocked-instances.txt implement policies 2025年02月23日 18:32:09 +00:00
composer.json implement formatted note contents (html and commonmark) 2025年02月14日 17:56:58 +00:00
composer.lock implement formatted note contents (html and commonmark) 2025年02月14日 17:56:58 +00:00
config.ini add request logging to router 2025年01月14日 18:38:40 +00:00
index.php add plugin support 2025年03月26日 21:59:44 +00:00
LICENSE change to nasin nanpa font 2025年03月21日 23:12:39 +00:00
policies.conf.php implement federation policies and instance info substitution policy 2025年02月24日 18:29:51 +00:00
README.md bump minimum php to 8.4 + require curl extension 2026年04月16日 16:11:35 +01:00
schema.sql many many changes but actors are loaded from db now 2024年12月07日 21:44:42 +00:00
settings.global.ini allow following actors with no follow endpoint 2025年05月04日 21:04:18 +01:00
settings.user.ini allow changing indexable setting 2025年03月30日 19:18:51 +01:00

digitigrade

an experimental server for the also-experimental pawpub federated social media protocol.

running the server

you should have:

  • php >= 8.4 with the extensions: dom, ctype, sockets, fileinfo, intl, mbstring, pdo_pgsql, openssl, curl
  • composer
  • a postgres server, database and user already set up
  • a beanstalkd server already running

the basic steps for setup are:

  1. run bin/init (which will install composer things and update the internal version info)
  2. edit config.ini as appropriate
  3. set up the database with bin/migrate
  4. run the development server with bin/devserver <port>, or set it up with fpm in your web server
  5. run at least one worker with bin/worker
  6. create an account for yourself using bin/newuser

you can poke around with bin/shell which will launch the interactive php shell and initialise all the composer autoloads and so on

whenever you want to update to the latest version (from git) you should:

  1. run git pull
  2. if there were any changes to composer.json/composer.lock, run composer install (if you're not sure it can't hurt to run it just in case)
  3. run bin/migrate
  4. hope it works :3

if it looks messed up in your web browser after updating, you should be able to fix it by force reloading the page once

policies

digitigrade has a "policy" mechanism that allows you to alter or outright reject incoming notes/actors/interactions as well as anything created by local users, according to your needs. there are some built-in policies (such as Digitigrade\Policy\BlockInstance which rejects anything from certain instances) and you can configure them in policies.conf.php.

the default configuration allows you to specify a list of blocked instances in the file blocked-instances.txt, one domain per line

sample nginx configuration

server {
 listen [::]:443 ssl;
 listen 443 ssl;
 server_name social.example;
 charset utf-8;
 root /path/to/wherever/you/cloned/this/repo;
 access_log off;
 error_log off;
 client_max_body_size 20971520; # or however much you feel like

 location / {
 index index.php;
 rewrite ^(.*)$ /index.php?requestPath=1ドル last;
 }
 location ~ \.php$ {
 fastcgi_index index.php;
 fastcgi_pass 127.0.0.1:9000; # or wherever your php-fpm is listening
 include fastcgi.conf;
 }
}