A simple web client for the PluralKit API, displaying whether your system has at least one current fronter.
Optionally, displays:
- Member cards for the current fronter(s)
- The length of time since the switch occurred
- Optionally, only if that time exceeds a configured threshold
You can specify a PluralKit system ID in the URL to display that system instead of the one configured in the environment. For example, navigating to awake.iris.ac.nz/exmpl will show the PluralKit Example System.
The simple version:
- Clone this repository somewhere your web server can access
- Run
composer install
- Copy
.env.dist
to.env
- Edit
.env
to configure the site - Point your web server to the
public/
directory of this repository
If you're running this on a public server, please configure the built-in caching - it reduces the load on the PluralKit servers, as well as improves page load times:
% tail -n4 .env
## Should we cache the PluralKit API responses in Redis?
## If `1`, we need a REDIS_URL
SITE_CACHE_ENABLED="1"
REDIS_URL="redis://localhost/0"
- Enable
mod_rewrite
andmod_php
- Point the
DocumentRoot
of a virtual host to thepublic/
directory of this repository
And that's it! .htaccess
files are magic.
server {
listen 443 ssl;
server_name awake.example.com;
root /path/to/pkawake/public;
# Replace this line with however your configuration enables
# passing `.php` files through to php-fpm
include fastcgi_php.conf;
location / {
try_files $uri /index.php;
}
}
This project is licensed under the terms of the MIT License, the text of which can be found in the LICENSE file.