Danvas
Danvas
DashboardSupportWelcome

👤 USER DOCS

User Guides

Getting Started

Getting StartedDashboard & OnboardingApp Settings

Tutorials

Tutorial: Setting Up Shift Tasks & ClosersTutorial: Managing Incidents in the InboxTutorial: Tracking Compliance & Sync StatusTutorial: Operational Workflows with the AI AssistantTutorial: Building & Deploying Custom Checklists

Daily Operations (Staff)

Shift Workspace & TasksService Day SetupDaily Line-UpStaff Service Day ReportsForms

Communication & Chat

Messages & AnnouncementsUnified Operations InboxAI Assistant

Manager & Admin Guides

Daily Line-Up SetupStaff SchedulingManaging LocationsNPS and Guest FeedbackCouponsContacts and Guest HistoryManager CloseoutsDaily Line-Up & ComplianceAnalyticsIncident ReportingWhistleblower Concerns & FeedbackAdmin Tools

⚙️ DEVELOPER DOCS

Getting Started

Getting StartedDevelopmentDeployment Guide

Architecture

Architecture OverviewExplanation: AI Integration & Tenant SecurityExplanation: Dynamic Forms Engine DesignExplanation: Compliance Ledger DesignExplanation: Live Sync & Data FreshnessData FlowArchitecture Decision Records

Core Domain

Core DomainDatabase ReferenceLocations DomainAuth & RBACScheduling DomainReports DomainIncidents DomainUnified Operations InboxLive Sync Data FreshnessToast Sync PipelineNotifications DomainCoupons and Guest NPSAudit Log & Compliance ArchitectureDesign Audit FindingsAI Chat IntegrationAnalytics & Tips Integration

Frontend

Frontend ArchitectureFormsLoading SkeletonsComponentsPWA & Offline ShellScreenshots

API Reference

API Reference

Endpoints

POS Sales APIOptimization Data APISchedule Shifts APIEmployee Export APIReports APIIncidents APIAI Chat APIPush Notifications APIWebhooks APICron API

Contributing

ContributingCode Examples

Security

Security & Compliance

Release Notes

What's New

Live Sync Data Freshness

Technical architecture of the data freshness engine and sync status monitoring

The Live Sync Data Freshness engine tracks the latency and operational state of external integrations (such as Toast POS and 7shifts schedule synchronizations) to ensure managers make decisions based on fresh data.


Architecture Overview

External sync jobs (orchestrated by Dagster and data-sync packages) write high-watermark timestamps and status records to the sync_state table. The Freshness Engine (features/operations-health/data-freshness.ts) evaluates these timestamps against per-source SLAs via resolveSyncSla() to determine each source's freshness tone.

                  ┌──────────────────────┐
                  │ Dagster / Sync Jobs  │
                  └──────────┬───────────┘
                             │ writes sync_state
                             ▼
                  ┌──────────────────────┐
                  │  sync_state Record   │
                  └──────────┬───────────┘
                             │ reads timestamps & health
                             ▼
                  ┌──────────────────────┐
                  │   Freshness Engine   │
                  └──────────┬───────────┘
                             │ calculates SLA age & tone
                             ▼
                  ┌──────────────────────┐
                  │ DataFreshnessBanner  │ (UI alert if stale/critical)
                  └──────────────────────┘

Freshness Tones and SLA Evaluation

The engine categorizes sync status into one of four Freshness Tones:

ToneDescriptionTypical ThresholdUI Rail
freshData is recently synchronized and within SLA.< Expected SLAGreen
staleSync is delayed past normal SLA window.> SLA, < Grace LimitAmber
criticalSync has failed repeatedly or circuit breaker is open.> Grace LimitCrimson
unknownNo sync record exists yet for the location.N/AGray

If the underlying sync source enters an open circuit-breaker state (3 consecutive failures), the engine sets the tone to critical with an alert message.

UI Component Integration

The DataFreshnessBanner is a React Server Component (RSC) rendered at the top of pages that rely on synchronized external data (e.g. Schedule Viewer, Line-Up Card, and Sales Goals).

Performance Optimization

  • The banner's server read is isolated inside a Suspense boundary, so it does not block the surrounding app shell or page navigation.
  • Updates are delivered client-side using non-blocking fetch intervals that query status indicators without full route revalidations.
  • Includes human-readable age formats (e.g., "Synced 4m ago") and sync source indicators (e.g., "Toast API").

Unified Operations Inbox

Technical architecture of the Master-Detail operations inbox and messaging feed

Toast Sync Pipeline

Technical architecture of the Toast POS sync pipeline, sales metrics, and schedule variance

On this page

Architecture OverviewFreshness Tones and SLA EvaluationIf the underlying sync source enters an open circuit-breaker state (3 consecutive failures), the engine sets the tone to critical with an alert message.UI Component IntegrationPerformance Optimization