Standalone basic single-venue request server implementation for use with OpenKJ.
This began as a fork of the freely-provided (thank you!) original OpenKJ StandaloneRequestServer, last updated Dec 21, 2018 (when I forked it in Jan 2023).
Enhancements & changes:
- Single page for active search & song requests via modal
- Search available at all times, even when requests are closed
- Search queries sanitized more to reduce queries with excessive whitespace
- new.css for a lightweight css base, dark mode enforced
- htmx for active search & request modal
- Fonts changed to my preferences, with a little extra CSS & JS as needed
I'll repeat what the original README said:
This is intended for people who already know how to configure and manage their own webservers and have a general familiarity with php. The easier and more feature rich option is to use the hosted service available at okjsongbook.com
Requirements:
- php
- you can use php's built in web server, or a web server with php support caddy, nginx, apache
settings.inc
should be edited with an appropriate database path that the webserver has write access to. If the database file doesn't exist, it will be created automatically.- You probably also want to change the
$venueName
insettings.inc
to personalize your instance
Under Tools > Settings > Network, you need to set the Server URL.
Example: If you were serving this from a web server as http://10.0.0.1/requestserver
you would configure the server URL in OpenKJ to point to http://10.0.0.1/requestserver/api.php
NOTE: Standalone Request Server ignores any API key specified in the OpenKJ, so you can leave that blank.
A docker compose file is provided for development. Your db dir (by default ./okjweb
) must have group ownership set to www-data
Because I like needlessly optimizing things, the css & js assets are optimized to css/style.min.css
and js/script.min.js
.
If you want to make changes, you have two options:
You can modify the siteheader in global.inc
to comment out the optimized asset tags and uncomment the un-optimized asset tags. Then just modify css/venuestyle.css
to suit your style. (You probably don't need to modify js/script.js
, and if you don't want to, you can keep using the optimized version in global.inc
)
You can do an npm i
in the project root to install the required node dependencies, and then run any of these:
npm run dev
: starts watching bothcss/venuestyle.css
&js/script.js
for changes, rebuildingcss/style.min.css
&js/script.min.js
as needednpm run build
: does a one-time production build ofcss/style.min.css
&js/script.min.js
npm run watch_css
: watch onlycss/venuestyle.css
, rebuildingcss/style.min.css
as needednpm run watch_js
: watch onlyjs/script.js
, rebuildingjs/script.min.js
as needednpm run build_css
: does a one-time production build ofcss/style.min.css
npm run build_js
: does a one-time production build ofjs/script.min.js