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.getInviteCodescom.atproto.identity.resolveHandlecom.atproto.server.createAccountcom.atproto.server.createInviteCodecom.atproto.server.createSessioncom.atproto.server.describeServercom.atproto.sync.getLatestCommitcom.atproto.sync.getRepoStatuscom.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'spublic/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.