X-Git-Url: http://git.squeep.com/?a=blobdiff_plain;f=README.md;h=17b47334fb708a2fbc1eabe252d79976ce8fe0d0;hb=ec37364b49c6a7e148e50584d3a83c424f4a8f87;hp=31e921e734302a5bc3a2d5f00600c42e7a672e49;hpb=d6760b5163d0d3527f6ae2c7b2b4c3b28100f3ae;p=websub-hub diff --git a/README.md b/README.md index 31e921e..17b4733 100644 --- a/README.md +++ b/README.md @@ -18,15 +18,15 @@ Database table initialization and schema version migrations are automated. Conf A user will need to be created in order to view the `/admin` pages; the `bin/authAddUser.js` script will do this. -An IndieAuth profile may be used to view any topics associated with that profile. - The bundled logger spews JSON to stdout. +An IndieAuth profile may be used to view any topics associated with that profile. +![IndieAuth view of topics](./documentation/media/topics-indieauth.png) ### Quickstart Example One way of deploying this server is behind nginx, with the pm2 package to manage the server process, and a local postgres database. Some details on this are presented here as a rough guide to any parts of this stack which may be unfamiliar. -- Have NodeJS 12-ish available. +- Have NodeJS 14-ish available. - Have PostgreSQL available. - Clone the server repository. ```git clone https://git.squeep.com/websub-hub``` @@ -114,6 +114,8 @@ The Hub keeps track of three primary entities: Any tasks in progress (notably: fetching new topic content, distributing that content to subscribers, or confirming pending verifications) are doled out and managed by a cooperative advisory locking mechanism. The task queue is wrangled in the database within the `*_in_progress` tables. +![Entity relationship diagram for Postgres engine](./documentation/media/postgres-er.svg) + A Hub node will periodically check for more tasks to perform, executing them up to a set concurrency limit. ### Quirks @@ -129,7 +131,6 @@ This implementation is built atop an in-house API framework, for Reasons. It wo - *.js - environment specific values, edit these as needed - server.js - launches the application server - src/ - - authenticator.js - interact with credentials and validation mechanisms - common.js - utility functions - communication.js - outgoing requests and associated logic - db/ @@ -147,11 +148,11 @@ This implementation is built atop an in-house API framework, for Reasons. It wo - enum.js - invariants - errors.js - local Error types - link-helper.js - processes Link headers - - logger.js - a very simple logging class + - logger/ - adds service-specific data filters to our logging module - manager.js - process incoming requests - service.js - defines incoming endpoints, linking the API server framework to the manager methods - - session-manager.js - process login/logout requests - template/ - HTML content - worker.js - maintains a pool of tasks in progress, for sending out updates, performing verifications, et cetera +- static/ - static assets - test/ - unit and coverage tests - test-e2e/ - support for whole-service testing