DD TURF ZONE · Dashboard
⚪ Firebase Connecting...
🟢 Synced
Admin
🏏⚽🥋☕
Welcome back
Turf Bookings · Football, Cricket & Taekwondo Coaching · Café — DD Turf Zone, Madambakkam
📅 Recent Bookings
⚡ Quick Actions
🔔 Admin Notifications
Checking status…
Pending Reservations
Requests submitted by customers on the public website — confirm to book the slot, or reject to keep it open.
Turf Bookings
Select a date to see its bookings
Customer Database
All turf customers
NamePhoneTotal BookingsLast BookingTotal SpentNotes
Pending Enrolments
Student admission requests submitted through the public enrolment form
Request IDStudent NameParent NameMobileSport Preferred BatchSubmitted DateStatusActions
📱 Enrolment QR
Parents scan this to open the Student Enrolment Form — submitted requests appear in Pending Enrolments for review
Student Enrolment QR
Enrolment Form URL
📅 Coaching Schedule (Reference)
⚽ Football
5:00 PM – 6:00 PM · Mon–Sat
Under 8: Mon, Wed & Fri
Above 8: Tue, Thu & Sat
🏏 Cricket
Weekend Batches
Days: Sat & Sun
Time: 5:30 AM – 7:00 AM
🥋 Taekwondo
Thu: 6:00–7:00 PM
Sat: 4:00–5:00 PM
Sun: 4:00–5:00 PM & 5:00–6:00 PM
Matches the Coaching section on the public website — update both together if timings change.
Students
Football, Cricket & Taekwondo coaching
IDNameParentPhoneCategory BatchCoachAdmissionFeeStatusActions
Attendance
Mark daily attendance for all coaching programs
📊 Monthly Attendance Summary
Calculated automatically from attendance records — no manual entry.
StudentCoachBatchScheduledAttendedMissed%MonthActions
📊

Pick a month and sport, then Generate Summary

Fee Collection
Select a sport, then collect fees below
Student NameStudent IDMonthly FeePaid AmountBalanceStatusAction
Student IDStudent NameParent NameMobileSport BatchCoachFee PlanDue DateAmount Due Pending BalanceDays OverdueStatusActions
Coaches
Manage coaching staff
Enquiries & Leads
Track and convert coaching enquiries
NamePhoneSportSourceStatusFollow-up NotesDateActions
Accounts & Finance
Revenue, expenses & profit tracking
From Date
To Date
📤 Expenses
CategoryAmountDateNotes
📊 Revenue Breakdown
💰 Finance
Income, expenses, profit & business reports — Super Admin only
From
To
📊 Consolidated Business Summary
📈 Income vs Expenses
📉 Monthly Profit Trend
🏢 Revenue by Business
🗂️ Expenses by Category
📤 Expenses
DateCategoryTypeDescriptionAmount MethodRecurringAdded ByActions
🤝 Coach Settlement
Monthly revenue share, attendance & fee reconciliation — Super Admin only
Select Coach & Month
📋 Past Settlements
MonthCoachSportStudentsCollectedCoach ShareStatusActions
🛠️ Realtime Diagnostics TEMPORARY
Super Admin only — for Phase 4.x migration verification. Remove after migrations are complete.
System Health Alerts TEMP SYSTEM HEALTH — auto-checks every 30s
📈 Overall System Health TEMP SYSTEM HEALTH
🏥 Module Health Score TEMP SYSTEM HEALTH
ModuleStatus
📤 Export Health Report TEMP SYSTEM HEALTH
System Health
🔥 Firebase Status
🔑 Anonymous Authentication
📄 Google Sheets / Apps Script
Note: this app only ever talks to Google Sheets THROUGH Apps Script — there is no separate direct Sheets connection, so "Google Sheets Status" and "Apps Script Status" are genuinely the same underlying measurement, not two independent metrics.
📊 Google Sheets Sync Queue
Realtime Monitor
📡 Active Firebase Listeners
ListenerStatus
👤 This Device's Session
⚠️ Limitation, not a bug: showing OTHER devices' connected sessions (Manager/Staff/other Super Admins currently logged in elsewhere) would require a new Firebase "presence" node that every session writes to on connect/disconnect — a genuine new database write and new business logic, both explicitly excluded from this panel. This section can only ever show this device's own session under the current constraints.
Database Health
🗄️ Read / Write Counters (this session)
"Firebase Reads" is a proxy (count of listener snapshots received) — there is no client-accessible exact read-count API, so this is the closest honest measurement available in-browser.
Module Status
ModuleStatus
Performance
📥 Last Firebase Events (most recent 10)
ModuleEventTime
⏱️ Firebase Write Latency (most recent 10, ms)
ModuleLatencyTime
⚡ Performance Summary
Error Monitor
🔴 Last 20 Errors
TimeMessage
🟡 Last 20 Warnings
TimeMessage
Activity (this session)
ModuleLast ActionUserTime
Reflects activity since this diagnostics panel loaded, not the full historical Activity Log (see the actual Activity Log page for complete history).
Backup Status
🔄 Background Sync Status (per module)
ModuleFirebaseSheetsTime
🔔 Notification Status (this session)
Live Data Audit TEMP — READ-ONLY, NO WRITES/DELETES
Record counts by source
Collectionwindow.DB (live, in memory)Google Sheet (live GET)localStorage (cached)
Current-month Collected totals (as actually computed by the real functions)
Every current-month fee record — included or excluded, and exactly why
Fee IDStudentSportAmountDateStudent statusIncluded inReason
Duplicate fee records (same student + amount + date + period)
Preview cleanup candidates
No delete action exists yet — this app has no distinct "backup copy" separate from its live Google Sheet, so nothing here can be safely auto-classified as an obsolete backup versus real historical data. If this audit finds a genuine duplicate or orphaned record, it will be listed above for manual review — nothing is ever deleted automatically.
Reports
Booking performance & collection summary
Select Month
💳 Collection by Payment Method
🏏 Cricket Bookings
⚽ Football Bookings
📋 Booking Details
Booking ID Customer Phone Date Time Hrs Sport Total Paid Balance Method Status
☕ Café
Menu & daily sales
🧾 Café Activity
TimeCustomerItemsTotal
📊 Item Sales Summary
ItemQty SoldAmount
🍽️ Menu
ItemCategoryPrice
🔐 User Management
Staff accounts & role assignment
⚠️ All accounts are stored on this device's browser storage. Passwords are visible to anyone with access to this browser's storage or the page source — this is a single-file, no-backend app, not a substitute for a real authentication server.
NameEmailRoleStatusActions
🕒 Activity Log
Every booking, block, student, attendance, café and enquiry change — who, what, when, and from where
to
Website Content
Controls every photo and the pricing cards on the public DD Turf Zone website — changes here show up on the site immediately (no code editing needed).
🖼️ Website Photos
Paste an image URL, or upload a photo from this device (stored directly, no external hosting needed). Leave a spot blank to show the site's built-in placeholder instead.
💰 Pricing Cards
Edit the three rate cards shown on the public Pricing section.
🎥 Video Shots / Highlights
Paste any normal YouTube link — it's automatically converted for playback on the website. Untick "Show on site" to hide a video without deleting it. Use the arrows to reorder how they appear.
⚙️ Settings
Business details, backup, integrations & role reference
🏢 Business Details
Stored on this device (browser storage) and applied to the login screen and sidebar immediately.
📊 Google Sheet Backup
Writes into your existing spreadsheet — open it here — never a new one. Slot Bookings, each Coaching sport, and Café Sales each get their own auto-created monthly sheet (e.g. "Slot Bookings - Jul 2026"), so nothing is ever mixed together.
Stops random people who guess your Apps Script URL from writing into your sheet. Set the same value in Code.gs's SHARED_SECRET constant.
Every booking create/edit/cancel, coaching fee payment, and café sale auto-posts here once set. Need the Apps Script code? It's the separate DDTZ_Apps_Script_Code.gs file provided alongside this app — paste it into Extensions → Apps Script on that spreadsheet and deploy as a Web App to get this URL, then use Test Connection above to confirm it's working before relying on it.
🔄 Sync Status Dashboard
Google Sheets
—
Apps Script
—
Internet
—
Pending Records
—
Last Successful Sync
—
Recent Sync Errors
No recent errors.
🛡️ Backup & Recovery
Bookings save locally first and always succeed even if the internet or Google Sheets is down (see Sync Status Dashboard above). This section adds a separate safety net: full point-in-time snapshots of every module, kept on this device, that you can download or restore from — automatically after real changes, and on demand.
Local Database
—
Google Sheets Backup
—
Pending Sync
—
Total Bookings
—
Last Local Backup
—
Last Successful Sync
—
Last Restore
—
Local Storage Used
—
Overall Backup Health
—
Restore
Restoring from Excel: convert it to the JSON backup format first (Excel restore isn't supported directly — download a JSON backup for the format to match, or use Import Data below for spreadsheet-shaped files).
Backup Version History
Date & TimeRecordsSizeTypeActions
🤖 Automatic Server-Side Backup (Google Apps Script)
Runs on Google's servers, independent of any browser or device — unlike the local snapshots above, this keeps working even if this admin panel is never opened. Once a day it makes a full copy of the entire spreadsheet (every tab) into a separate "DD Turf Zone Backups" Drive folder, verifies the copy, and logs the result below. Requires the updated Code.gs to be deployed (Deploy → Manage deployments → Edit → New version) — this feature does nothing until that's done.
Daily Trigger
—
Schedule
—
Total Server Backups
—
Last Verified Backup
—
Server Backup History
Date & TimeTypeVerificationRecordsActions
Click "Refresh Status" once the updated Code.gs is deployed.
📥 Import Data
Migrate existing records from Excel (.xlsx) or CSV into DD Turf Zone. Every imported record is validated, checked against what's already here to skip duplicates, saved locally, and then automatically synced to Google Sheets — same as a record created directly in the app.
The Wizard adds column mapping, validation, duplicate-handling options, a preview before anything is saved, and one-click undo — useful for larger or messier files. The simple importer above still works exactly as before.
💾 Backup Settings
Manual on-demand Excel backups are available from Bookings and Reports. Browsers can't write files to disk automatically for security reasons — this reminder is the closest safe equivalent to "automatic" backups.
☠️ Danger Zone
Reset Data lets you permanently remove ONE category of records at a time (Students, Coaches, Bookings, Fees, Attendance, Café Sales, Enquiries, or Birthday Data) — every other category is left completely untouched. Login accounts, permissions, coaching categories, café menu items, and all other site configuration are never affected by any reset, including Reset All Data. A JSON backup downloads automatically before Reset All Data runs, but none of this can otherwise be undone.
🔐 Role Permissions Reference
PageSuper AdminManagerStaff