Mezzanine Admin
Admin
Source connections, refresh readiness, and the system tables that support the customer mapping and calculation rules.
Local bootstrap snapshot
Dashboard is reading the local gitignored bootstrap JSON files on this machine.
First Run Checklist
Supabase database
ConnectedPostgres is connected.
Optional Admin lock
Optional laterOpen setup mode is active. Add MEZZANINE_ADMIN_SETUP_KEY later to require an unlock key.
Credential encryption key
ReadyAPI tokens can be encrypted before storage.
Teamwork credentials
ValidatedConfigured from Admin plus Vercel env vars. Last validated Aug 28, 2026, 6:10 AM.
Xero credentials
RetestSetup is saved, but the latest test or pull failed. Run Test connection after checking the saved values.
First live data pull
PulledAt least one live source pull completed.
Calculation output
Run calculationsOfficial calculation rows are not produced yet.
Source Connections
Supabase/Postgres
DATABASE_URL is configured.
Bootstrap snapshot
No bootstrap rows are staged in Postgres.
Teamwork
Teamwork setup is configured from Admin plus Vercel env vars. Run selected pull to load live rows.
Xero
Xero setup is saved, but the latest test or pull failed. Retest from Admin after checking credentials.
Official calculations
The dashboard is still adapted from bootstrap output, not official Mezzanine calculation runs.
Manage source setup
Open credentials, OAuth, connection tests, and selected source pulls.
Background Jobs
Webhook refresh
Daily around 10:00 PM Central during daylight time
0 3 * * *Processes queued Teamwork and Xero webhook events, then recalculates if a source pull completed.
/api/jobs/webhook-refresh
Daily source refresh
Daily around 6:10 AM Central during daylight time
10 11 * * *Pulls Teamwork time, Xero on cadence, PTO Google Sheet rows, PTO Teamwork sync, then calculation output.
/api/jobs/daily-source-refresh
Maintenance repair
Yearly safety check
0 0 1 1 *Reapplies safe database tables and indexes used by source refresh and dashboard reads.
/api/jobs/apply-maintenance
Webhook Queue
No webhook events have been received yet.
Data Stores
| Table | Rows | Status | Detail |
|---|---|---|---|
| bootstrap_records | 0 | empty | No rows stored yet. |
| customers | 0 | empty | No rows stored yet. |
| people | 0 | empty | No rows stored yet. |
| person_cost_rates | 0 | empty | No rows stored yet. |
| source_raw_records | 0 | empty | No rows stored yet. |
| teamwork_time_entries | 0 | empty | No rows stored yet. |
| xero_invoice_lines | 0 | empty | No rows stored yet. |
| profitability_monthly_customer | 0 | empty | No rows stored yet. |
| calculation_runs | 0 | empty | No rows stored yet. |
Environment Keys
Teamwork and Xero credentials can come from Vercel env vars or Admin Connection Setup.
Connection setup mode
Keep MEZZANINE_CREDENTIAL_KEY set so saved tokens are encrypted in Postgres.
Add MEZZANINE_ADMIN_SETUP_KEY later when you are ready to require an unlock key for this page.
DATABASE_URLPostgres reads and imports
MEZZANINE_ADMIN_SETUP_KEYOptional lock for Admin connection setup
MEZZANINE_CREDENTIAL_KEYEncrypted API token storage
MEZZANINE_TEAMWORK_DOMAINAlias: TEAMWORK_DOMAIN
Teamwork domain from Vercel env vars
MEZZANINE_TEAMWORK_LOOKBACK_MONTHSAlias: TEAMWORK_LOOKBACK_MONTHS
Time-entry lookback from Vercel env vars
MEZZANINE_TEAMWORK_API_TOKENAlias: TEAMWORK_API_TOKEN
Teamwork API token from Vercel env vars
MEZZANINE_XERO_CLIENT_IDAlias: XERO_CLIENT_ID
Xero Client ID from Vercel env vars
MEZZANINE_XERO_TENANT_IDAlias: XERO_TENANT_ID
Xero Tenant ID from Vercel env vars
MEZZANINE_XERO_CLIENT_SECRETAlias: XERO_CLIENT_SECRET
Xero Client secret from Vercel env vars
MEZZANINE_XERO_REFRESH_TOKENAlias: XERO_REFRESH_TOKEN
Xero Refresh token from Vercel env vars
Bootstrap Files
| File | Local | Local Rows | Postgres Rows |
|---|---|---|---|
| customers.json | Present | 69 | Unavailable |
| people.json | Present | 28 | Unavailable |
| time-entries.json | Present | 25,325 | Unavailable |
| invoice-lines.json | Present | 0 | Unavailable |
| current-dashboard-output.json | Present | 381 | Unavailable |
| current-dashboard-debug.json | Present | 37 | Unavailable |
Import Runs
Latest Bootstrap Import
Jun 26, 2026, 12:06 AM
bootstrap-2026-06-25T17:06:34.681Z
pto
google_sheets_import · Aug 28, 2026, 6:10 AM · 0s
No detailed count summary was recorded for this run.
teamwork
pull · Aug 28, 2026, 6:10 AM · 12s
Connection
Source API responded
Time entries
2,540 pulled, 2,540 saved, 2,540 people linked, 2,540 customers linked, window 20260801 to 20260827
teamwork
pull · Aug 28, 2026, 5:01 AM · 3s
Connection
Source API responded
Time entries
318 pulled, 318 saved, 318 people linked, 318 customers linked, window 20260825 to 20260827
teamwork
pull · Aug 28, 2026, 4:00 AM · 3s
Connection
Source API responded
Time entries
316 pulled, 316 saved, 316 people linked, 316 customers linked, window 20260825 to 20260827
teamwork
pull · Aug 28, 2026, 3:01 AM · 3s
Connection
Source API responded
Time entries
307 pulled, 307 saved, 307 people linked, 307 customers linked, window 20260825 to 20260827