> ## Documentation Index
> Fetch the complete documentation index at: https://dashtray.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Use Cases & Examples

> Real-world examples of how to use Dashtray

## Development & DevOps

### GitHub Build Notifications

Get alerted when builds pass or fail.

**Setup:**

1. Go to GitHub repo → Settings → Webhooks
2. Add webhook to your Dashtray URL
3. Select: Workflow runs, Push, Pull requests
4. Configure template

**Notification examples:**

```
✅ Build passed
main branch - all checks passed

❌ Build failed
feature/auth - 3 tests failing

🚀 Deployed to production
v1.2.3 → 42 commits
```

### Deployment Tracking

Monitor deployments across your infrastructure.

**Template:**

```
Title: "🚀 {{environment}} deployment"
Body: "{{service}}: {{old_version}} → {{new_version}}"
```

**Real example:**

```
🚀 production deployment
api: v1.2.3 → v1.2.4
```

### Error Monitoring

Get notified when error rates spike.

**Setup with error tracking tool (Sentry, Rollbar, etc.):**

1. Create webhook in error tracking dashboard
2. Set alert threshold
3. Configure to send to Dashtray

**Notification:**

```
⚠️ Error spike detected
500+ errors in last 5 minutes
```

***

## E-commerce

### New Orders

Get notified instantly when customers order.

**Shopify setup:**

1. Settings → Notifications → Webhooks
2. Add webhook: `orders/create`
3. Point to your Dashtray URL

**Notification:**

```
📦 New order from Alice Smith
Order #1234 - $99.00
```

### Payment Received

Track revenue in real-time.

**Stripe setup:**

1. Developers → Webhooks
2. Events: `charge.succeeded`
3. Send to Dashtray

**Notification:**

```
💳 Payment received
$599.00 from acme-corp@example.com
```

### Low Stock Alert

Get notified when inventory runs low.

**Using Zapier:**

1. Trigger: Shopify inventory \< 10
2. Action: POST to Dashtray webhook
3. Template: Show product name and quantity

**Notification:**

```
⚠️ Low inventory
Product: Blue T-Shirt (Size M)
Remaining: 3 units
```

### Customer Signup

Track new customer registrations.

**Notification:**

```
👤 New customer signed up
John Doe - john@example.com
```

***

## SaaS & Subscriptions

### Trial Ending Soon

Remind about expiring trials.

**Dashtray setup:**

1. Send from your backend
2. Trigger 3 days before expiration
3. Include upgrade link

**Notification:**

```
⏰ Trial expiring soon
3 days left - upgrade now
```

### Subscription Changed

Track plan upgrades and downgrades.

**Notification:**

```
📈 Plan upgraded
Starter → Pro
```

### Failed Payment

Alert when payment fails.

**Notification:**

```
❌ Payment failed
Subscription at risk - update payment method
```

### Usage Alert

Notify when approaching limits.

**Notification:**

```
📊 Approaching API limit
1,850 / 2,000 requests used
```

***

## Content & Publishing

### New Comment/Review

Get notified of user engagement.

**Setup with comment service (Disqus, etc.):**

1. Create webhook
2. Events: New comment
3. Point to Dashtray

**Notification:**

```
💬 New comment on "Getting Started"
From: Alex - "Great guide, thanks!"
```

### Social Media Mention

Monitor brand mentions.

**Using IFTTT or Zapier:**

1. Trigger: Mentioned on Twitter
2. Action: Send to Dashtray

**Notification:**

```
🐦 Mentioned on Twitter
@someone: "Just launched with @dashtray - amazing!"
```

### Content Published

Notify when content goes live.

**CMS webhook setup:**

1. Trigger: Article published
2. Send to Dashtray

**Notification:**

```
📝 New blog post published
"5 Tips for Better Notifications"
```

***

## Monitoring & Observability

### Server Down Alert

Critical alert when server fails.

**Monitoring tool (UptimeRobot, Pingdom, etc.):**

1. Configure webhook for downtime alert
2. Point to Dashtray URL

**Notification:**

```
🔴 Server down
api.example.com - HTTP 503
Last up: 2 minutes ago
```

### Performance Degradation

Alert on slow responses.

**Notification:**

```
⚠️ Performance issue
API response time: 5.2s (normally 200ms)
```

### Database Backup Complete

Confirm backups succeeded.

**Notification:**

```
✅ Database backup complete
Size: 2.3 GB
Time: 4 minutes 23 seconds
```

***

## Personal & Team Productivity

### Code Review Requested

Get notified of pull requests waiting for review.

**GitHub + integration:**

1. PR opened → Dashtray notification
2. Assign reviewer automatically

**Notification:**

```
👀 Code review requested
PR #245: Add user authentication
From: @sarah
```

### Meeting Reminder

Get alerted before important meetings.

**Calendar integration:**

1. Set 15 minutes before
2. Send to Dashtray

**Notification:**

```
📅 Meeting in 15 minutes
Team Standup - #general Slack
```

### Daily Summary

Get digest of important events.

**Custom backend job:**

1. Runs at 9 AM
2. Aggregates yesterday's events
3. Sends summary

**Notification:**

```
📊 Yesterday's Summary
5 new orders - $1,200
3 support tickets
1 deployment - all green
```

***

## AI & Automation

### Workflow Completed

Notify when long-running workflows finish.

**From Claude, Zapier, or custom bot:**

**Notification:**

```
✅ Data pipeline completed
Processed 1M records in 23 minutes
```

### Research Finished

Alert when data analysis completes.

**Notification:**

```
📈 Analysis ready
Quarterly report generated
Ready to review in dashboard
```

### Approval Needed

Request human input in workflow.

**Notification:**

```
⚠️ Approval needed
Large order: $50,000 from CompanyXYZ
Review and approve?
```

***

## Example Code Snippets

### Send Custom Notification (Any App)

```bash theme={null}
curl -X POST https://api.dashtray.app/api/v1/notifications/send \
  -H "Authorization: Bearer sk_test_..." \
  -H "Content-Type: application/json" \
  -d '{
    "title": "Custom Event",
    "body": "Something interesting happened"
  }'
```

### From Python

```python theme={null}
import requests

def send_notification(title, body):
    response = requests.post(
        'https://api.dashtray.app/api/v1/notifications/send',
        headers={
            'Authorization': f'Bearer {API_KEY}',
            'Content-Type': 'application/json'
        },
        json={
            'title': title,
            'body': body
        }
    )
    return response.json()

# Usage
send_notification(
    title="Deploy successful",
    description="v1.2.3 deployed to production"
)
```

### From Node.js

```javascript theme={null}
async function sendNotification(title, description) {
  const response = await fetch('https://api.dashtray.app/api/v1/notifications/send', {
    method: 'POST',
    headers: {
      'Authorization': `Bearer ${process.env.DASHTRAY_API_KEY}`,
      'Content-Type': 'application/json'
    },
    body: JSON.stringify({
      title,
      description
    })
  });
  return response.json();
}

// Usage
await sendNotification(
  "Build passed",
  "All 42 tests passing in 3.2s"
);
```

### From GitHub Actions

```yaml theme={null}
- name: Send notification
  uses: dashtray/notify@v1
  with:
    api-key: ${{ secrets.DASHTRAY_API_KEY }}
    title: "Build completed"
    description: "Status: ${{ job.status }}"
```

***

## Combining Multiple Services

### Complete Order Workflow

```
Order placed on Shopify
  ↓ (webhook)
Dashtray notification: "New order"
  ↓
Inventory updated in database
  ↓ (webhook)
Dashtray notification: "Stock updated"
  ↓
Notification sent via email
  ↓ (webhook)
Dashtray notification: "Customer notified"
```

### CI/CD Pipeline

```
Code pushed to GitHub
  ↓ (webhook)
Build starts - Dashtray: "Build started"
  ↓
Tests run, linting, build
  ↓
Success - Dashtray: "✅ Build passed"
  ↓
Deploy to staging
  ↓
Deploy to production - Dashtray: "🚀 Live"
```

***

## Tips for Success

✅ **Do:**

* Start simple, then expand
* Test with real data
* Use descriptive titles
* Include action items when needed
* Batch related notifications

❌ **Avoid:**

* Notification overload (get silence after 5 minutes)
* Vague titles ("Event happened")
* Notifications for everything
* Duplicating data in title and body

***

## What Will You Build?

Got a great use case? Share it on [GitHub](https://github.com/bhupeshpradhan/dashtray)!

Browse more examples in our [community](https://github.com/bhupeshpradhan/dashtray/discussions).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.