Files
shared/packages/node-backend
Gabriel20xx de9b599232 authclient: auto-detect https for a bare AUTHGUARD_URL host, extend Java client to full surface
AUTHGUARD_URL only needs to name a host/IP now - all four language
clients (Go/Node/Python/Java) assume https:// when no scheme is given,
so a bare value like 192.168.1.50:8080 works instead of failing
outright; an explicit http://scheme is still left alone for local/LAN
deployments.

Java's AuthClient was validate-only; it now mirrors the Go/Node/Python
clients' full surface (register/login/logout/me/totp*/passwordReset*/
managedUsers*/setupStatus) using Jackson for the request/response JSON
this larger surface has to build and parse, since MegaBasterd (this
package's only verified consumer) already depends on Jackson.
2026-09-02 20:49:29 +02:00
..
2026-08-06 16:55:51 +02:00

@gabriel20xx/node-backend

Shared Node.js backend infrastructure for services that use PostgreSQL:

  • validated DATABASE_URL and pool settings;
  • one pool owner with startup retry, transient query retry, transactions, and shutdown;
  • PBKDF2 password hashing and secure session-token helpers;
  • short-lived, one-time admin reset codes printed to the server console;
  • common account/session persistence;
  • transaction-locked ordered migrations.

The package does not depend on Express. Each service keeps its own routes, cookies, roles, validation policy, and domain repositories. Existing MediaShared code can be migrated into this package incrementally; keep the legacy package as a compatibility layer until every consumer has moved.

Pass a service-specific tableName to runMigrations when multiple services share one PostgreSQL database, so their migration histories cannot collide.

Run npm test from this package or npm run test --workspace=@gabriel20xx/node-backend from shared.