API Reference
Programmatic access to the Danvas platform
Overview
The Danvas API provides programmatic access to the restaurant operations platform. All endpoints are REST-based and return JSON responses. The API is primarily consumed by the internal @repo/analytics and @repo/ai packages, but is also available for external integrations.
Base URL
| Environment | URL |
|---|---|
| Production | https://danvas.hartalliance.com |
| Development | http://localhost:4000 |
Authentication
Danvas uses multiple authentication methods depending on the endpoint:
| Method | Use Case |
|---|---|
| Bearer Token | User authentication via Clerk JWT |
| Session Cookie | Browser session authentication |
| Webhook Signature | Verification for Clerk and Svix webhooks |
| Bearer (Cron Secret) | Authentication for scheduled cron jobs |
Rate Limiting
The API implements rate limiting via Upstash Redis.
- Chat Endpoint: Limited to 20 requests per minute per user.
- Push Notifications: Limited to 100 requests per minute organization-wide.
- Cron Jobs: Restricted to internal infrastructure and verified secrets.