A polished multi-outlet control system for your PowerSync service.
The app now centers on a superadmin panel with outlet provisioning, outlet-scoped auth, PowerSync token issuance, outlet code validation, device management, and payment visibility on top of Prisma-ready Postgres models.
Configuration Checklist
Included capabilities
Route surface
live surface/superadmin/loginSeeded superadmin entry point for the multi-outlet control room.
/api/auth/loginAuthenticate outlet users with email, password, and a 6-character alphanumeric outlet code.
/api/auth/refreshRotate a long-lived refresh token and restore an outlet user session.
/api/powersync/auth/tokenIssue a short-lived PowerSync JWT that also carries outlet metadata.
/api/powersync/auth/tokenExchange a refresh token for a fresh PowerSync JWT after long offline periods.
/api/powersync/check-outlet-codeResolve a 6-character alphanumeric outlet code and return the active outlet on success.
/api/powersync/auth/keysExpose the public JWKS PowerSync uses to verify issued tokens.
/api/powersync/dataPersist PowerSync CRUD batches to Postgres synchronously.