6. Make yourself an admin
The backoffice is the app's admin area, at /backoffice. It has a
users list where admins grant and revoke admin for other people, a blog
editor, and an email dashboard. Anyone who is not an admin gets a "page not
found" there, so it stays hidden.
There is no default admin account. You grant the first one from a terminal, for a user who has already signed in once (page 5).
With Option 1 (everything in Docker), from the repository root:
docker compose exec backend npm run admin:grant -- [email protected]
With Option 2 (running on your machine), from backend/:
npm run admin:grant -- [email protected]
Replace the address with the one you signed in with. The -- passes the
address through npm to the script. It prints
[email protected] is now an admin. /backoffice opens on their next page load.
Reload the home page and a Backoffice link appears in its navigation. From there, grant or revoke admin for other users under Users. The backoffice will not change your own row, so the last admin cannot lock everyone out.
The command runs the compiled copy in backend/dist/, which npm run dev
keeps up to date. If it reports Cannot find module, run npm run build
in backend/ and try again. If it says no user has that email, sign in
once with it first.
On a deployed server the same command makes you admin there; see Deployment.