# Turso dashboard builder: edge database tools.

Your database runs at the edge. Now your apps do too. Connect Turso to camelAI and build dashboards, admin panels, and internal tools — deployed globally on Cloudflare Workers.

## Why the edge matters

Traditional databases route every query to a single region. Turso replicates your data to the edge — reads happen locally.

| Region          | Traditional | Edge (Turso) |
|------------------|-------------|---------------|
| US East          | 195ms       | 4ms           |
| Europe           | 180ms       | 3ms           |
| Asia-Pacific     | 320ms       | 7ms           |

## What you can build

- **Global replica health dashboard**  
  Monitor replication lag across every region. See row counts, sync timestamps, and connection status for each Turso replica — in real time.

- **Edge latency comparison tool**  
  Visualize read and write performance by region. Compare edge-local reads against cross-region queries. Know exactly how fast your data is everywhere.

- **Multi-region data browser**  
  Browse and query data at any replica. Explore schemas, run SQL, and compare data consistency across your globally distributed database.

- **Embedded analytics for local-first apps**  
  Build analytics dashboards powered by your Turso-backed local-first app. SQLite-compatible queries, real-time syncing, beautiful charts.

## SQLite you already know

Turso speaks SQLite. If you know SQL, you know Turso. camelAI reads your schema, writes your queries, and builds your UI — all in one conversation.

No new query language to learn. No ORM to configure. Just describe what you want and the agent handles the rest.

- Full SQLite compatibility via libSQL
- Reads at the nearest replica automatically
- Writes replicate globally in milliseconds
- Works with Drizzle, Prisma, and raw SQL

```typescript
import { createClient } from "@libsql/client";

const db = createClient({
  url: "libsql://my-db.turso.io",
  authToken: process.env.TURSO_TOKEN,
});

// camelAI writes this for you
const users = await db.execute(`
  SELECT id, name, region,
         created_at
  FROM users
  WHERE active = 1
  ORDER BY created_at DESC
  LIMIT 50
`);
```

## The fully edge-native stack

Your database replicates globally with Turso. Your apps deploy globally on Cloudflare Workers. Data and compute, together at the edge — fast for every user, everywhere.

## What will you build?

- “Connect to my Turso database and build a global replica health dashboard. Show replication lag, row counts per region, and last sync timestamps for each location.”

- “I have a Turso database with users and events tables. Build an analytics dashboard with user growth trends, event frequency by type, and 7-day retention cohorts.”

- “Build an admin panel for my local-first app’s Turso database. I need CRUD operations on the items, categories, and sync_log tables with search and filtering.”

- “Set up a cron job that queries my Turso database every hour, checks for stale replicas with sync lag over 30 seconds, and posts an alert to our Slack channel.”

## Works with your stack

libSQL, SQLite, Turso CLI, Drizzle ORM, Prisma, TypeScript, Cloudflare Workers

## Your data is already at the edge.

Your apps should be too.
