DashboardSupportWelcome

👤 USER DOCS

Getting Started

Daily Operations

Shift Workspace & TasksPre-Shift SetupLine-Up CardsShift ReportsForms

Staff & Locations

Staff SchedulingManaging Locations

Oversight

Manager ReportsAnalyticsPre-Shift & Compliance

Incidents & Feedback

Incident ReportingAnonymous FeedbackMessages & Announcements

AI & Settings

AI ChatgearApp Settings

Administration

Dashboard & OnboardingAdmin

⚙️ DEVELOPER DOCS

Getting Started

Getting StartedDevelopmentDeployment Guide

Architecture

Architecture OverviewData FlowArchitecture Decision Records

Core Domain

Core DomainDatabase ReferenceLocations DomainAuth & RBACScheduling DomainReports DomainIncidents DomainNotifications DomainAudit Log & OptimizationDesign Audit Findings

Frontend

Frontend ArchitectureFormsLoading SkeletonsComponentsPWA & NotificationsimageScreenshots

API Reference

API Reference

Endpoints

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

Contributing

ContributingcodeCode Examples

Security

Security & Compliance
Danvas IconDanvas
Danvas IconDanvas

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

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 dataDrizzle StudioLinting and Type CheckingTestingBuildingEnvironment VariablesDeploymentVercelNeon ProductionTroubleshootingbun run dev fails with missing env varsDatabase connection errorsAI chat not workingBuild failures
app
# Main app (port 4000)
bun dev --filter web # Marketing site (port 4001)
bun dev --filter api # API server (port 4002)

Ports

AppPortPurpose
app4000Main authenticated app
web4001Marketing / public site
api4002API server (webhooks, cron)
docs4004Documentation site
storybook6006Component library
email4003React Email preview
studio3005Drizzle Studio (database browser)

Database

Schema changes

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

bun db:push          # Push changes to Neon (development)
bun db:generate      # Generate migration files (production)

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/)

Drizzle Studio

cd packages/database && bun drizzle-studio

Opens a visual database editor at localhost:4983.

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
OPENROUTER_API_KEYapps/app/.env.localAI API access
CANVAS_TEAM_IDapps/app/.env.local, apps/api/.env.local, packages/database/.envDefault org ID
BLOB_READ_WRITE_TOKENapps/app/.env.localVercel Blob storage
CRON_SECRETapps/api/.env.localVercel Cron auth

Deployment

Vercel

  1. Push to GitHub
  2. Import each app (app, web, api) as separate Vercel projects
  3. Set environment variables in each project's dashboard
  4. Deploy

Neon Production

Before production deploy:

bun db:generate      # Generate migration files
# Apply migrations via Neon Console or CI/CD

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 OPENROUTER_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