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

Development

Local development guide for Danvas

Local Development

Start all apps

bun run dev          # All apps except docs (Turborepo parallel)
bun run dev:all      # All apps including docs

Start a single app

bun dev --filter app    # Main app (port 4000)
bun dev --filter api    # API server (port 4002)

Ports

AppPortPurpose
app4000Main authenticated app
api4002API server (webhooks, cron)
email4003React Email preview
docs4004Documentation site
slack-bot4005Slack dispatch + interactive bot service
storybook6006Component library
analytics-mcp4006Analytics MCP server

Database

Schema changes

After editing packages/database/src/schema/ (any of the 9 domain modules):

bun db:generate      # Generate a reviewed migration file
bun db:migrate       # Apply migrations to the configured development DB
# Local-only direct schema sync, when intentionally needed:
# bun db:push:local

Seed data

bun db:seed          # Seed 5 locations
bun db:seed-forms    # Seed Opening Checklist + Daily Standup forms + sample submissions
bun db:seed-q12      # Seed Q12 Gallup Survey
bun db:seed-survey   # Seed Customer Feedback + NPS surveys
bun db:seed-coupons  # Seed coupon theme data + sample coupon
bun db:seed-slack-routes # Seed Slack channel routing (requires SLACK_BOT_TOKEN + CSV in tmp/)

Coupon and survey seeds are development fixtures. They do not prove protected migration history, team rollout admission, real guest/device/privacy acceptance, or permission to distribute QR codes. For isolated Coupon regression and rendered journeys, follow the prepared-checkout runbook. It owns target identity, production-artifact provenance, capture controls, retries, fixture migration/no-op, and cleanup; use no application credentials or production data. See Coupons and Guest NPS for the current release/pilot distinction.

Analytics mart repair

Tip marts are partition-owned by Dagster. Use a local Dagster partition run for development fixtures. Historical production repair requires an approved #989 repair manifest; the former app backfill writer is retired.

See Analytics & Tips Integration for schedules and coverage expectations.

Drizzle Studio

bun --cwd packages/database run db:studio

Opens a visual database editor at localhost:3005.

Linting and Type Checking

bun run check        # Lint + type-check (Biome via ultracite)
bun run fix          # Auto-fix lint issues

Testing

bun run test         # Run all tests across monorepo

Run a single test file:

cd apps/app && bun run test -- --reporter=verbose path/to/test.test.ts

Building

bun run build        # Build all apps
bun run analyze      # Bundle analysis

Environment Variables

Each app and package has its own .env.local (or .env for packages/database). Run bun setup to create them from .env.example files.

Required variables across the monorepo:

VariableWherePurpose
DATABASE_URLpackages/database/.env, apps/app/.env.local, apps/api/.env.localNeon PostgreSQL connection
CLERK_SECRET_KEYapps/app/.env.local, apps/api/.env.localClerk server-side auth
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEYapps/app/.env.localClerk client-side auth
AI_GATEWAY_API_KEYapps/app/.env.localVercel AI Gateway access for the assistant
CANVAS_TEAM_IDapps/app/.env.local, apps/api/.env.local, packages/database/.envLocal team identifier used for team-scoped application data; not a Clerk organization ID
BLOB_READ_WRITE_TOKENapps/app/.env.localVercel Blob storage
CRON_SECRETapps/api/.env.localVercel Cron auth

Deployment

Use the deployment guide for the supported native-Git Vercel flow. Production activation, exact-SHA checks, protected credentials, and rollback evidence are governed by the deployment runbook and the Vercel deployment workflow.

Database migrations

Generate and review migrations locally with bun db:generate. Production migrations run only through the protected exact-SHA migration workflow; do not apply them from Neon Console, ad-hoc scripts, or an unverified CI job. See the database migration guide for local development and the production deployment guide for the release sequence.

Troubleshooting

bun run dev fails with missing env vars

Run bun setup and fill in all required variables. See Quickstart for the full list.

Database connection errors

  • Verify DATABASE_URL uses the pooled connection string
  • Check that your Neon project is not paused (free tier pauses after inactivity)
  • For Launch tier: no auto-pause

AI chat not working

  • Verify AI_GATEWAY_API_KEY is set and has credits
  • Check the browser console for streaming errors
  • The chat route has rate limiting (20 req/min) — wait if exceeded

Build failures

bun run clean        # Remove all node_modules and build artifacts
bun install
bun run build

Getting Started

Set up Danvas for local development in minutes

Deployment Guide

How Danvas is deployed to production

On this page

Local DevelopmentStart all appsStart a single appPortsDatabaseSchema changesSeed dataAnalytics mart repairDrizzle StudioLinting and Type CheckingTestingBuildingEnvironment VariablesDeploymentDatabase migrationsTroubleshootingbun run dev fails with missing env varsDatabase connection errorsAI chat not workingBuild failures