A barebones implementation of an atproto PDS in PHP and Slim Framework 4.
pds php atproto
0

Configure Feed

Select the types of activity you want to include in your feed.

PHP 99.8%
Dockerfile 0.1%
Shell 0.1%
Other 0.1%
58 1 0

Clone this repository

https://tangled.org/andresitorresm.com/phpds https://tangled.org/did:plc:bolrfzvrntu73rdpinmdd4fm
git@tangled.org:andresitorresm.com/phpds git@tangled.org:did:plc:bolrfzvrntu73rdpinmdd4fm

For self-hosted knots, clone URLs may differ based on your setup.



README.md

PHPds#

A barebones implementation of an atproto PDS in PHP and Slim Framework 4.

This is a work-in-progress project done for fun! Don't expect it to be production-ready or fully compliant with atproto specs!

Features#

The following XRPC endpoints are implemented:

  • com.atproto.admin.getInviteCodes
  • com.atproto.identity.resolveHandle
  • com.atproto.server.createAccount
  • com.atproto.server.createInviteCode
  • com.atproto.server.createSession
  • com.atproto.server.describeServer
  • com.atproto.sync.getLatestCommit
  • com.atproto.sync.getRepoStatus
  • com.atproto.sync.listRepos

Installation#

To serve the application, clone the repository and run composer install in the application directory.

Then:

  • Point your virtual host document root to phpds's public/ directory.
  • Ensure logs/ is web writable.

Docker#

You can also run the application with docker:

docker build -t phpds .
docker run -p 8080:8080 phpds

Development#

To run the application in development, you can run these commands

composer start

Or you can use docker-compose to run the app with docker, so you can run these commands:

docker-compose up -d

After that, open http://localhost:8080 in your browser.

Run this command in the application directory to run the test suite

composer test

To run PHPCS manually:

composer phpcs

To auto-fix what PHPCBF can fix:

composer phpcbf

To run PHPCS automatically in VS Code, install the recommended PHPCS extension from .vscode/extensions.json and use the workspace settings in .vscode/settings.json.

To run PHPCS before every commit, enable the tracked Git hook with:

git config core.hooksPath .githooks

Repo mirror#

This repository is automatically synced one-way from GitHub (aitorres/phpds) to tangled.sh (andresitorresm.com/phpds).

License#

This project is licensed under the MIT License. See the LICENSE file for details.