Architecture Decision Records
Significant architectural decisions made during development
Danvas maintains Architecture Decision Records (ADRs) to document significant technical decisions. Each ADR includes the context, the decision, and its consequences.
Active Decisions
| ADR | Title | Summary |
|---|---|---|
| ADR-0001 | Drizzle ORM over Prisma | Chose Drizzle ORM for lighter bundles, single-file schema, and better Neon serverless compatibility |
| ADR-0002 | OpenRouter over Direct Provider APIs | Routes AI requests through OpenRouter for provider flexibility, cost management, and fallback options |
| ADR-0003 | Location-Scoped Roles | Extends Clerk org roles with location-level permissions for multi-location management |
| ADR-0004 | Clerk Authentication | Selected Clerk for auth — multi-tenant orgs, webhook provisioning, and low maintenance overhead |
| ADR-0005 | TanStack Query for Data Fetching | Uses TanStack Query for client-side data fetching — caching, deduplication, and optimistic updates |
| ADR-0006 | Message Follow-Up Workflow | Implements structured follow-up states and incident linking for phone messages |
| ADR-0007 | 7shifts Schedule Sync | Syncs scheduling data from 7shifts into local management tables |
| ADR-0008 | Incident Resolution Workflow | Standardizes state transitions (Pending → In Progress → Resolved) for incidents |
| ADR-0009 | Message Dual-State Model | Separates message status from follow-up workflow status for better tracking |