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

# What is Lark?

> Interactive everything for the modern era

Lark is the realtime database for web apps, games, and mobile. You write data, your users see it instantly, across every connected client, lightning fast.

If you've ever used Firebase Realtime Database, Lark will feel familiar. But Lark is built from the ground up in Rust, with the performance and features that today's multiplayer games and collaborative apps demand.

## Features

<CardGroup cols={2}>
  <Card title="Real-time by default" icon="bolt">
    Every write is broadcast to every subscriber in real time. No polling, no manual refresh. Your UI stays in sync automatically.
  </Card>

  <Card title="Reasonable pricing" icon="gauge-low">
    We want Lark to be sustainably operated and grow with our builders. The features and performance you need at a price that makes sense.
  </Card>

  <Card title="Tiny client" icon="feather">
    The Lark JS SDK is \~20KB gzipped. Install it, connect, and start building. No heavyweight framework required.
  </Card>

  <Card title="Built for speed" icon="wifi">
    Millisecond latency volatile updates and support for UDP-based transports like WebTransport and KCP for demanding real-time apps & games.
  </Card>

  <Card title="Firebase SDK compatible" icon="code-merge">
    Already using Firebase Realtime Database? Point your existing Firebase SDK at Lark and it just works. Change one URL.
  </Card>

  <Card title="Security rules" icon="shield-halved">
    Declarative, path-based security rules that run on the server. Control who can read and write what, with full access to auth context and existing data.
  </Card>
</CardGroup>

## How it works

Lark stores your data as a JSON tree. You read and write to paths in that tree, and Lark handles synchronization across all connected clients.

```typescript theme={null}
import { LarkDatabase } from '@lark-sh/client';

const db = new LarkDatabase('my-project/my-database', { anonymous: true });

// Write data
await db.ref('players/alice').set({ name: 'Alice', score: 0 });

// Subscribe to real-time updates
db.ref('players').on('value', (snapshot) => {
  console.log('Players updated:', snapshot.val());
});

// Every connected client sees the change instantly
await db.ref('players/alice/score').set(42);
```

## Get started

<CardGroup cols={2}>
  <Card title="Quickstart" icon="rocket" href="/quickstart">
    Create a project and build your first real-time app in minutes.
  </Card>

  <Card title="Use with Firebase SDKs" icon="plug" href="/firebase/overview">
    Already on Firebase? Learn how to point your existing code at Lark.
  </Card>

  <Card title="Lark SDK" icon="code" href="/lark-sdk/overview">
    Get started with the native Lark JavaScript/TypeScript SDK.
  </Card>

  <Card title="REST API" icon="globe" href="/rest-api/overview">
    Read and write data over HTTP. No SDK or persistent connection required.
  </Card>

  <Card title="Dashboard" icon="grid-2" href="/dashboard/overview">
    Explore the Lark dashboard: manage projects, databases, rules, and metrics.
  </Card>
</CardGroup>
