The platform admin role is bootstrapped from environment variables. No database record is created for the admin — credentials are validated directly against env vars at login time.
ADMIN_EMAIL=admin@jouwdomein.nl # Platform admin e-mail address
ADMIN_PASSWORD=kies_een_sterk_wachtwoord # Platform admin password
ADMIN_SESSION_SECRET=willekeurige_lange_string_hier # Shared session secret
Note:
ADMIN_PASSWORDis shared between the platform admin (email + password) and the photographer (password only). If you want separate passwords, setADMIN_PASSWORDfor the admin and use a different value inADMIN_SESSION_SECRETto ensure session tokens don't overlap.
- Set
ADMIN_EMAILandADMIN_PASSWORDin your environment (.env.locallocally, Vercel dashboard in production). - Navigate to
/admin. - Log in with the configured email and password.
- You will be redirected to
/admin/dashboard.
| Role | Login path | Credentials |
|---|---|---|
| Platform Admin | /admin |
ADMIN_EMAIL + ADMIN_PASSWORD |
| Photographer | /photographer |
ADMIN_PASSWORD only |
| Client | /gallery/[id] |
Per-shoot email + password |
From /admin/dashboard you can:
- Add a photographer (name + email)
- Activate / Deactivate an account — deactivated accounts are blocked from the platform
- Delete a photographer — permanently removes the account and all associated galleries and photos
npm install
cp .env.local.example .env.local
# Fill in .env.local (or run: vercel env pull .env.local)
npm run dev