Merge branch 'v1.3-dev' as v1.3.11
[websub-hub] / README.md
index 32ca1bb949856717bb4e5a1e1b69b441d3800738..41f3e83dcd0d44661a1190f9fe3fab874d9292d6 100644 (file)
--- a/README.md
+++ b/README.md
@@ -20,11 +20,13 @@ A user will need to be created in order to view the `/admin` pages; the `bin/aut
 
 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```  
@@ -36,6 +38,7 @@ One way of deploying this server is behind nginx, with the pm2 package to manage
   > 'use strict';
   > // Minimum required configuration settings
   > module.exports = {
+  >   encryptionSecret: 'this is a secret passphrase, it is pretty important to be unguessable',
   >   dingus: {
   >     selfBaseUrl: 'https://hub.squeep.com/',
   >   },
@@ -47,7 +50,7 @@ One way of deploying this server is behind nginx, with the pm2 package to manage
 - Prepare PostgreSQL with a user and database, using e.g. ```psql```.  
   > <pre>
   > CREATE ROLE websubhub WITH CREATEDB LOGIN PASSWORD 'mypassword';
-  > GRANT websubhub TO postgres
+  > GRANT websubhub TO postgres;
   > CREATE DATABASE websubhub OWNER=websubhub;
   > GRANT ALL PRIVILEGES ON DATABASE websubhub TO websubhub;
   > \c websubhub
@@ -111,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
@@ -135,6 +140,7 @@ This implementation is built atop an in-house API framework, for Reasons.  It wo
     - schema-version-helper.js - schema migrations aide
     - postgres/
       - index.js - PostgreSQL implementation
+      - listener.js - notify/listen connection to support topic content caching
       - sql/ - statements and schemas
     - sqlite/
       - index.js - SQLite implementation
@@ -142,10 +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
   - 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