Skip to content

Commit 341cb13

Browse files
committed
initial version
0 parents  commit 341cb13

10 files changed

Lines changed: 3270 additions & 0 deletions

File tree

.dockerignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
Dockerfile
2+
run-solid-test-suite.sh
3+
.git

.gitignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Directories to ignore
2+
/build
3+
/vendor
4+
5+
# Files to ignore
6+
/.env
7+
/phpunit.xml

.travis.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
sudo: false
2+
language: php
3+
script:
4+
- sh run-solid-test-suite.sh

CHANGELOG.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Change Log
2+
3+
All notable changes to the PHP Solid Server will be documented in this file.
4+
5+
This project adheres to the [Keep-a-changelog](http://keepachangelog.com/) and
6+
[Semantic Versioning](http://semver.org/) conventions.
7+
8+
<!--
9+
## [Unreleased][unreleased]
10+
### Added
11+
### Changed
12+
### Deprecated
13+
### Removed
14+
### Fixed
15+
### Security
16+
-->
17+
18+
## [v0.0.0](https://github.com/pdsinterop/solid-server-php/tree/v0.0.0) (2020-06-12)
19+
20+
\* *This Change Log was automatically generated by [github_changelog_generator](https://github.com/skywinder/Github-Changelog-Generator)*

CODE_OF_CONDUCT.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Contributor Code of Conduct
2+
3+
All PDS Interop projects adhere to [the Code Manifesto](http://codemanifesto.com)
4+
as its guidelines for contributor and community interactions.
5+
6+
For full details visit: [https://pdsinterop.org/code-of-conduct/](https://pdsinterop.org/code-of-conduct/)

CONTRIBUTING.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Contributing to the PHP standalone Solid Server
2+
3+
Thank you for your interest in contributing!
4+
5+
All PDS Interop projects are open source and community-friendly.
6+
7+
Please visit [https://pdsinterop.org/contributing/](https://pdsinterop.org/contributing/) for details about:
8+
9+
- Our [Code of Conduct](https://pdsinterop.org/code-of-conduct/)
10+
- How to report issues
11+
- How to make code changes
12+
- How to send a merge request

README.md

Lines changed: 175 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,175 @@
1+
# Standalone PHP Solid PubSub Server
2+
3+
[![PDS Interop][pdsinterop-shield]][pdsinterop-site]
4+
[![Project stage: Development][project-stage-badge: Development]][project-stage-page]
5+
[![License][license-shield]][license-link]
6+
[![Latest Version][version-shield]][version-link]
7+
[![standard-readme compliant][standard-readme-shield]][standard-readme-link]
8+
![Maintained][maintained-shield]
9+
10+
_Standalone Solid PubSub Server written in PHP by PDS Interop_
11+
12+
## Table of Contents
13+
14+
<!-- toc -->
15+
<!-- tocstop -->
16+
17+
## Background
18+
19+
The Solid specifications defines what makes a "Solid Server". Parts of
20+
those specifications are still likely to change, but at the time of this writing,
21+
they define:
22+
23+
- Authentication
24+
- Authorization (and access control)
25+
- Content representation
26+
- Identity
27+
- Profiles
28+
- Resource (reading and writing) API
29+
- Social Web App Protocols (Notifications, Friends Lists, Followers and Following)
30+
31+
<!--
32+
To read more about Solid, and which IETF and W3C specifications are used, visit: https://pdsinterop.org/solid-specs-overview/
33+
-->
34+
35+
### Installation
36+
37+
To install the project, clone it from GitHub and install the PHP dependencies
38+
using Composer:
39+
40+
```sh
41+
git clone git://github.com/pdsinterop/php-solid-pubsub-server.git \
42+
&& cd php-solid-pubsub-server \
43+
&& composer install --no-dev --prefer-dist
44+
```
45+
At this point, the application is ready to run.
46+
47+
## Usage
48+
49+
The PHP Solid PubSub server can be run in several different ways.
50+
51+
<!-- @TODO: Add local Dockerfile -->
52+
53+
<!--
54+
@TODO: Add single-button deploy scripts/config for Heroku, Glitch, and other
55+
popular playgrounds/developer oriented service providers.
56+
-->
57+
58+
### Docker images
59+
60+
When running with your own Docker image, make sure to mount the project folder
61+
to wherever the image expects it to be, e.g. `/app` or `/var/www`.
62+
63+
For instance:
64+
65+
```
66+
export PORT=8080 && \
67+
docker run \
68+
--env "PORT=${PORT}" \
69+
--expose "${PORT}" \
70+
--network host \
71+
--rm \
72+
--volume "$PWD:/app" \
73+
-it \
74+
php:7.1 \
75+
php --docroot /app/web/ --server "localhost:${PORT}" /app/web/index.php
76+
```
77+
Or on Mac:
78+
```
79+
export PORT=8080 && \
80+
docker run \
81+
--env "PORT=${PORT}" \
82+
--expose "${PORT}" \
83+
-p "${PORT}:${PORT}" \
84+
--rm \
85+
--volume "$PWD:/app" \
86+
-it \
87+
php:7.1 \
88+
php --docroot /app/web/ --server "localhost:${PORT}" /app/web/index.php
89+
```
90+
91+
92+
## Security
93+
94+
If you discover any security related issues, please email <security@pdsinterop.org> instead of using the issue tracker.
95+
96+
-->
97+
98+
## Development
99+
100+
### Project structure
101+
102+
This project is structured as follows:
103+
104+
<!--
105+
.
106+
├── build <- Artifacts created by CI and CLI scripts
107+
├── cli <- CLI scripts
108+
├── docs <- Documentation, hosted at https://pdsinterop.org/solid-server-php/
109+
├── src <- Source code
110+
├── tests <- Unit- and integration-tests
111+
├── vendor <- Third-party and vendor code
112+
├── web <- Web content
113+
├── composer.json <- PHP package and dependency configuration
114+
└── README.md <- You are now here
115+
-->
116+
```
117+
.
118+
├── src <- Source code
119+
├── vendor <- Third-party and vendor code
120+
├── web <- Web content
121+
├── composer.json <- PHP package and dependency configuration
122+
└── README.md <- You are now here
123+
```
124+
125+
<!--
126+
### Coding conventions
127+
128+
You can also run [php-cs-fixer](https://github.com/FriendsOfPHP/PHP-CS-Fixer) with the configuration file that can be found in the project root directory.
129+
130+
This project comes with a configuration file and an executable for [php-cs-fixer](https://github.com/FriendsOfPHP/PHP-CS-Fixer) (`.php_cs`) that you can use to (re)format your sourcecode for compliance with this project's coding guidelines:
131+
132+
```sh
133+
$ composer php-cs-fixer fix
134+
```
135+
136+
### Testing
137+
138+
The PHPUnit version to be used is the one installed as a `dev-` dependency via composer. It can be run using `composer test` or by calling it directly:
139+
140+
```sh
141+
$ ./vendor/bin/phpunit
142+
```
143+
-->
144+
145+
## Contributing
146+
147+
Questions or feedback can be given by [opening an issue on GitHub](https://github.com/pdsinterop/php-solid-pubsub-server/issues).
148+
149+
All PDS Interop projects are open source and community-friendly.
150+
Any contribution is welcome!
151+
For more details read the [contribution guidelines](contributing.md).
152+
153+
All PDS Interop projects adhere to [the Code Manifesto](http://codemanifesto.com)
154+
as its [code-of-conduct](CODE_OF_CONDUCT.md). Contributors are expected to abide by its terms.
155+
156+
There is [a list of all contributors on GitHub][contributors-page].
157+
158+
For a list of changes see the [CHANGELOG](CHANGELOG.md) or the GitHub releases page.
159+
160+
## License
161+
162+
All code created by PDS Interop is licensed under the [MIT License][license-link].
163+
164+
[contributors-page]: https://github.com/pdsinterop/php-solid-pubsub-server/contributors
165+
[license-link]: ./LICENSE
166+
[license-shield]: https://img.shields.io/github/license/pdsinterop/php-solid-pubsub-server.svg
167+
[maintained-shield]: https://img.shields.io/maintenance/yes/2020
168+
[pdsinterop-shield]: https://img.shields.io/badge/-PDS%20Interop-gray.svg?logo=data%3Aimage%2Fsvg%2Bxml%3Bbase64%2CPHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9Ii01IC01IDExMCAxMTAiIGZpbGw9IiNGRkYiIHN0cm9rZS13aWR0aD0iMCI+CiAgICA8cGF0aCBkPSJNLTEgNTJoMTdhMzcuNSAzNC41IDAgMDAyNS41IDMxLjE1di0xMy43NWEyMC43NSAyMSAwIDAxOC41LTQwLjI1IDIwLjc1IDIxIDAgMDE4LjUgNDAuMjV2MTMuNzVhMzcgMzQuNSAwIDAwMjUuNS0zMS4xNWgxN2EyMiAyMS4xNSAwIDAxLTEwMiAweiIvPgogICAgPHBhdGggZD0iTSAxMDEgNDhhMi43NyAyLjY3IDAgMDAtMTAyIDBoIDE3YTIuOTcgMi44IDAgMDE2OCAweiIvPgo8L3N2Zz4K
169+
[pdsinterop-site]: https://pdsinterop.org/
170+
[project-stage-badge: Development]: https://img.shields.io/badge/Project%20Stage-Development-yellowgreen.svg
171+
[project-stage-page]: https://blog.pother.ca/project-stages/
172+
[standard-readme-link]: https://github.com/RichardLitt/standard-readme
173+
[standard-readme-shield]: https://img.shields.io/badge/readme%20style-standard-brightgreen.svg
174+
[version-link]: https://packagist.org/packages/pdsinterop/php-solid-pubsub-server
175+
[version-shield]: https://img.shields.io/github/v/release/pdsinterop/php-solid-pubsub-server?sort=semver

composer.json

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
{
2+
"autoload": {
3+
"psr-4" :{
4+
"Pdsinterop\\Solid\\": "src/"
5+
}
6+
},
7+
"config": {
8+
"bin-dir": "./bin",
9+
"platform": {
10+
"php": "7.3.11",
11+
"ext-dom": "0.0.0",
12+
"ext-mbstring": "0.0.0"
13+
},
14+
"sort-packages": true
15+
},
16+
"description": "Standalone Solid PubSub Server written in PHP by PDS Interop.",
17+
"license": "MIT",
18+
"name": "pdsinterop/solid-pubsub-server",
19+
"require": {
20+
"php": "~7.1",
21+
"cboden/ratchet": "^0.4",
22+
"textalk/websocket": "^1.4"
23+
},
24+
"require-dev": {
25+
"phpunit/phpunit": "*"
26+
},
27+
"scripts": {
28+
"lint":"",
29+
"serve-dev":"USER=alice PASSWORD=alice123 ENVIRONMENT=development php -S \"${HOST:-localhost}:${PORT:-8080}\" -t web/ web/index.php",
30+
"serve-dev-docker":"bash ./bin/serve-docker-dev.sh",
31+
"test":"phpunit"
32+
},
33+
"scripts-descriptions": {
34+
"serve-dev": "Run the application with the internal PHP development server",
35+
"serve-dev-docker": "Run the application with the docker image provided by the TestSuite repo.",
36+
"test": "Run unit-test with PHPUnit"
37+
},
38+
"type": "project"
39+
}

0 commit comments

Comments
 (0)