Standalone Solid Server written in PHP by PDS Interop
The Solid specifications defines what makes a "Solid Server". Parts of those specifications are still likely to change, but at the time of this writing, they define:
- Authentication
- Authorization (and access control)
- Content representation
- Identity
- Profiles
- Resource (reading and writing) API
- Social Web App Protocols (Notifications, Friends Lists, Followers and Following)
Based on the specifications, the following features are available:
- User
- Authentication
- Identity
- Profiles
- Data storage
- Content representation
- Resource API
- HTTP REST API
- Websocket API
- Web Acces Control List
- Authorization (and Access Control)
- Social web apps
- Calendar
- Contacts
- Friends Lists (Followers, Following)
- Notifications
The checkboxes show which features are available, and which ones are not.
To install the project, clone it from GitHub and install the PHP dependencies using Composer:
git clone git://github.com/pdsinerop/solid-server-php.git solid-server-php \
&& cd $ \
&& composer install --no-dev --prefer-distAt this point, the application is ready to run.
The PHP Solid server can be run in several different ways.
The application can be run with a Docker image of your choice or on a local environment, using Apache, NginX, or PHP's internal HTTP server. The latter is only advised in development.
When running with your own Docker image, make sure to mount the project folder to wherever it will be hosted by the Docker container.
For instance:
PORT=80 \
docker run \
--env "PORT=${PORT}" \
--expose "${PORT}" \
--network host \
--rm \
--volume "$PWD:/app" \
-it \
php:7.1 \
php -S "localhost:${PORT}" -t /app/web/ /app/web/index.php
How to run this application in an Apache, NginX, or other popular HTTP servers falls outside the scope of this project.
For development purposes, the internal PHP HTTP server is explained below.
For development purposes a Composer serve command has been provided. This will
run the application using PHP internal HTTP server.
To use it, run composer serve in the project root.
!!! FOR SECURITY REASONS, DO NOT USE THIS METHOD IN PRODUCTION !!!
By default, the application is hosted on localhost port 80.
Both the HOST and PORT can be configured before running the command by
setting them in the environment, for instance:
HOST='solid.local' PORT=8080 composer serveThis command can also be run through a docker container, for instance:
PORT=8080 \
docker run \
--env "PORT=${PORT}" \
--expose "${PORT}" \
--network host \
--rm \
--volume "$PWD:/app" \
-it \
composer:latest \
serve
Contributions are welcomed. Read the contribution guidelines for details.
Please see CHANGELOG for details.
All code created by PDS Interop is licensed under the [MIT License][LICENSE].
This project is structured as follows:
.
├── src <- Source code
├── vendor <- Third-party and vendor code
├── web <- Web content
├── composer.json <- PHP package and dependency configuration
└── README.md <- You are now here