Dashboard Admin Guide
This page mirrors Dashboardadminguide.md. Keep both files synchronized.
Scope
- Ensure authenticated access to Dashboard pages.
- Maintain stable member navigation and user flows.
- Monitor auth-related issues and API connectivity.
- Coordinate with CMS admin for cross-module behavior.
- Keep Dashboard documentation aligned with code changes.
Dashboard architecture (current)
Core pages
dashboard/index.phpdashboard/academy.phpdashboard/help.phpdashboard/contact.php
Shared dashboard layout
dashboard/includes/layout-start.phpdashboard/includes/layout-end.phpdashboard/includes/sidebar.php
Client auth guard and auth UI modules
assets/js/dashboard-guard.jsassets/js/auth.jsassets/js/firebase-bootstrap.jsassets/js/api-client.js
Server APIs used by dashboard flows
php/api/sync-user.phpphp/api/submit-contact.php
Security and access model
- User signs in via Firebase auth flow.
- Dashboard guard confirms authenticated user.
- User sync API upserts account row in
users. - Contact submissions are tied to authenticated
users.id.
Dashboard is auth-gated for members; role-based restrictions are handled separately in CMS.
Operational checklist
- Signed-out user visiting dashboard URL is redirected to sign-in.
- Signed-in user lands on requested dashboard page.
- Sidebar navigation routes correctly.
- Contact form submits for authenticated user.
sync-userAPI still upserts user records correctly.- Dashboard to CMS link behavior remains expected.
Database dependencies
userscontact_submissions
Ensure schema migrations are applied and DB configuration is valid in php/config.php.
Troubleshooting
"Dashboard guard failed" or redirect loops
- Verify Firebase config values are valid.
- Verify auth modal flow is operational.
- Check browser console for auth initialization errors.
User is signed in but API calls fail
- Verify bearer token handling in API requests.
- Verify server
firebase_project_idconfiguration. - Check token verification in
php/lib/firebase_jwt.php.
Contact form errors
- Validate payload size and required fields.
- Confirm DB connection and table availability.
Admin coordination with CMS
- Dashboard includes a CMS shortcut in sidebar.
- CMS authorization is role-based (
editor/admin) and server-enforced. - If a user can access Dashboard but not CMS, this is expected unless CMS role is granted.
Change management and documentation policy
Whenever Dashboard evolves, update both Dashboardadminguide.md and Dashboardadminguide.php in the same change.