This repository has been archived on 2023-07-28. You can view files and clone it, but cannot push or open issues or pull requests.
prosody_web_admin_rest/README.md

93 lines
2.3 KiB
Markdown
Raw Normal View History

2022-07-05 20:10:15 +00:00
# README
2016-07-10 15:32:38 +00:00
2021-05-20 23:21:43 +00:00
A simple webinterface for users. This app uses [`admin_rest`](https://github.com/snowblindroan/mod_admin_rest) module of
prosody. So [prosody.im](http://prosody.im) and this module are hard dependencies. The interface allows users
* to have two step verification (as an alternative to the integrated `register_web` module),
* to delete of their accounts and
* to change their password.
2016-07-10 15:32:38 +00:00
This app uses
* Slim Version 3
* Slim Auth
2016-07-10 15:32:38 +00:00
* Eloquent ORM
* PHPMigration
* GUMP Validation
* Twig
* Curl
* PHPMailer
* Symfony Translation
* Sqlite
as dependencies.
2022-07-05 20:10:15 +00:00
The main git repository is hosted at _[https://git.myservermanager.com/varakh/prosody_web_admin_rest](https://git.myservermanager.com/varakh/prosody_web_admin_rest)_.
Other repositories are mirrors and pull requests, issues, and planning are managed there.
Contributions are very welcome!
## Requirements
2016-07-10 15:32:38 +00:00
* admin_rest module of prosody
* composer
* sqlite pdo, mb_string
2022-07-05 20:10:15 +00:00
## Install
2016-07-10 15:32:38 +00:00
* Install composer
* Change directory to project home
* Copy `config/env.example` to `config/env` and adjust to your needs
2018-05-18 13:01:16 +00:00
* Copy `config/legal.example.md` to `config/legal.md` and adjust to your needs
2016-07-10 15:32:38 +00:00
* `composer install`
* `php bin/phpmig migrate`
2022-07-05 20:10:15 +00:00
## Deployment
2016-07-10 15:32:38 +00:00
2021-05-20 23:21:43 +00:00
* Set up a cron job using `php projectRootDir/bin/UsersAwaitingVerificationCleanUpCronJob.php` to clean up users who
signed up but did not verify their account periodically.
2016-07-10 15:32:38 +00:00
* Point your document root to `public/`.
* Example nginx conf:
2018-05-24 11:49:28 +00:00
```
root .../public;
index index.php;
rewrite_log on;
location / {
try_files $uri $uri/ @ee;
}
location @ee {
rewrite ^(.*) /index.php?$1 last;
}
# php fpm
location ~ \.php$ {
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass unix:/var/run/php-fpm/php-fpm.sock;
include fastcgi_params;
}
```
You should be able to set a very strict Content-Security-Policy.
2016-07-10 15:32:38 +00:00
2022-07-05 20:10:15 +00:00
## Upgrade
2016-07-10 15:32:38 +00:00
* Change directory to project home
* `git pull`
* `composer update`
* `php bin/phpmig migrate`
* look into Changelog for major changes
2016-07-10 15:32:38 +00:00
2022-07-05 20:10:15 +00:00
## Developers
2021-05-20 23:21:43 +00:00
2018-04-03 11:49:57 +00:00
* start server with `php -S localhost:8080 -t public public/index.php`
* point browser to [localhost:8080](http://localhost:8080) to have a preview
2022-07-05 20:10:15 +00:00
## Translations
2021-05-20 23:21:43 +00:00
This app uses Symfony Translator. It's bootstraped in `Util\BootstrapHelper` and locales are placed under `data/locale/`
. Adjust to your needs or help translating.