Skip to main content

Realtime Database Path Reference

A catalogue of RTDB top-level paths declared in database.rules.json (web repo, main branch) and verified to be referenced from code in either the web repo (src/ or functions/) or the mobile repo (src/) on main. Paths declared in rules but with no code references have been omitted.

Paths are shown up to the ID wildcard — not leaf fields. Wildcard conventions mirror the rules file: $companyId, $employeeId, $uid, $chatId, etc.

Root-level paths (no ID wildcard)

Reads/writes governed directly at the top level.

PathNotes
/SupportAuthed read/write
/ApplicantsAuthed read/write, indexed on companyId, userId
/AvatarsAuthed read, write locked
/VersionWebPublic read, admin write
/VersionMobilePublic read, write locked
/HeadOfficeShiftsHead-office read, write locked

Fully locked roots (no client access)

/NotificationQueues, /NotifiedBefore, /NotifiedShifts, /Migrations, /Cache, /FilesToDelete, /HeadOfficeAccess (read allowed per $companyId), /Messages, /OldChats.

Legacy lowercase roots (fully locked)

/comments, /companies, /givex, /migrations, /requests, /shifts.

Channel-keyed paths ($channelId)

  • /channels/$channelId/meta
  • /channels/$channelId/events
  • /channels/$channelId/subscribers/$uid

Employee-keyed paths ($employeeId)

Cross-company, keyed by employee id rather than company.

  • /Employees/$employeeId
  • /Requests/$employeeId
  • /Dialogues/$employeeId

User-keyed paths ($uid)

  • /Users/$user_id
  • /Tokens/$uid
  • /BadgeCount/$uid

Company-keyed paths ($companyId)

The dominant pattern. Read/write typically gated on auth.token.currentCompanyId === $companyId, with head-office or owner/manager overrides on many paths.

Core company data

  • /Companies/$companyId — has sub-rules for jobs, daysStructure, employeesOrder, includeOnCallShifts
  • /CompanySettings/$companyId
  • /CompanyConsents/$companyId
  • /CompanyNotificationSettings/$companyId
  • /Managers/$companyId
  • /Passwords/$companyId
  • /HeadOfficeAccess/$companyId

Attendance

  • /AttendanceSettings/$companyId
  • /Attendance/$companyId
  • /AttendanceClaims/$companyId
  • /AttendanceDates/$companyId

Schedules

  • /WeeklySchedule/$companyId
  • /WeeklyScheduleSettings/$companyId
  • /PostedSchedules/$companyId
  • /ScheduleDrafts/$companyId
  • /ScheduleDates/$companyId
  • /ScheduleModifications/$companyId/$weekStart
  • /ScheduleAuditLog/$companyId
  • /Templates/$companyId
  • /OpenShifts/$companyId
  • /ManualShifts/$companyId
  • /RepeatedDays/$companyId

Labor & sales

  • /LaborCost/$companyId
  • /LaborCostSettings/$companyId
  • /SPLHTarget/$companyId
  • /SalesActual/$companyId
  • /SalesProjections/$companyId
  • /CatererSalesProjections/$companyId

Payroll

  • /PayrollHintSeen/$companyId
  • /PayrollPeriodSettings/$companyId
  • /PayrollStatus/$companyId
  • /PayrollTutorialSeen/$companyId
  • /PendingSalary/$companyId
  • /EmployeeRates/$companyId
  • /EmployeeIntegrationIds/$companyId — sub-indexes: customId, payrollId, veloceId, lightspeedId, maitreDId, clusterId, acombaId, powerpayId, givexId, myrId

Posts & media

  • /Posts/$companyId
  • /ScheduledPosts/$companyId
  • /GroupAttachments/$companyId
  • /MediaHashes/$companyId

Notifications

  • /NotificationsFlat/$companyId — sub-groups: applicant, availabilities, dayOff, post, schedule, comment, replace, swap, emergency, direct, onHold
  • /NotificationsFlatV2/$companyId/$employeeId/$state/$type
  • /Notifications/$companyId/$notificationId
  • /PushNotifications/$companyId

Presence

  • /PresenceStatus/$companyId/$employeeId

Tips

  • /TipsOut/$companyId
  • /TipsOutActivities/$companyId
  • /TipsActivityLog/$companyId
  • /TipsMatchExceptions/$companyId
  • /TipsModifications/$companyId
  • /ExtraTipsOut/$companyId

Documents

  • /Documents/$companyId
  • /DocumentDrafts/$companyId
  • /EmployeeDocuments/$companyId
  • /LegalDocuments/$companyId

POS integrations

  • /VeloceInvoices/$companyId, /VeloceSettings/$companyId
  • /CloverInvoices/$companyId, /CloverSettings/$companyId, /CloverEmployees/$companyId
  • /CloverApiKeyInvoices/$companyId, /CloverApiKeySettings/$companyId
  • /LightspeedSettings/$companyId, /LightspeedDates/$companyId
  • /GivexSettings/$companyId
  • /MaitreDSettings/$companyId, /MaitreDInvoices/$companyId, /MaitreDInvoicesNetSales/$companyId, /MaitreDArchive/$companyId, /PendingMaitreDIntegration/$companyId
  • /MyrSettings/$companyId, /MyrInvoices/$companyId
  • /ClusterInvoices/$companyId, /ClusterSettings/$companyId

Payroll & HR integrations

  • /PowerpaySettings/$companyId
  • /EmployerDSettings/$companyId
  • /AcombaSettings/$companyId
  • /NethrisSettings/$companyId
  • /NonIntegratedPayrollService/$companyId
  • /NonIntegratedPosService/$companyId

Reservations (Libro)

  • /LibroSettings/$companyId
  • /LibroReservations/$companyId, /LibroResevations/$companyId — typo variant still present
  • /LibroWalkIns/$companyId
  • /LibroExpected/$companyId

Requests & availabilities

  • /RequestsToAnswer/$companyId
  • /RequestEffectiveDate/$effectiveDate/$companyId
  • /PendingAvailabilities/$companyId

Chats & messaging

  • /Chats/$companyId/$chatId — contains members/$uid, unread/$uid
  • /ChatSettings/$companyId
  • /EmployeeChats/$companyId
  • /MessagesNew/$companyId
  • /UnreadChats/$companyId

Misc

  • /WeatherForecast/$companyId

Notable quirks

  • Typo duplicate: LibroReservations vs LibroResevations (missing r) — both are referenced in code.
  • Legacy lowercase roots (comments, companies, givex, migrations, requests, shifts) are fully locked — pre-migration remnants.
  • Non-company keying: Employees, Requests, and Dialogues are keyed by $employeeId, not $companyId.
  • Deep structural paths worth being aware of:
    • NotificationsFlatV2/$companyId/$employeeId/$state/$type
    • Chats/$companyId/$chatId
    • RequestEffectiveDate/$effectiveDate/$companyId
    • ScheduleModifications/$companyId/$weekStart