> ## 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.

# Using Lark with Firebase SDKs

> Use your existing Firebase Realtime Database code with Lark

Lark is wire-compatible with Firebase Realtime Database. If you have an existing Firebase RTDB app, you can point it at Lark with minimal changes.

## What this means

The official Firebase SDKs can connect to Lark instead of Firebase. Your existing code (reads, writes, subscriptions, queries, transactions) works as-is. You don't need to rewrite anything.

Lark implements the same wire protocol that Firebase RTDB uses. When the Firebase SDK opens a WebSocket connection, it doesn't know (or care) that it's talking to Lark instead of Google's servers. The messages are identical.

The [REST API](/rest-api/overview) is also fully compatible. If your backend hits Firebase's `/.json` endpoints, change the hostname and it works with Lark.

## What's different

Not much. Three things change:

1. You point at `larkdb.net` instead of `firebaseio.com` for the connection URL.
2. If you use Firebase Auth, you tell Lark your Firebase project ID so it can validate tokens.
3. A few edge cases, documented in the [compatibility notes](/firebase/compatibility).

## What's next

<CardGroup cols={2}>
  <Card title="JavaScript SDK" icon="js" href="/firebase/javascript">
    Set up the Firebase JS SDK with Lark.
  </Card>

  <Card title="Android SDK" icon="android" href="/firebase/android">
    Set up the Firebase Android SDK with Lark.
  </Card>

  <Card title="iOS SDK" icon="apple" href="/firebase/ios">
    Set up the Firebase Apple SDK with Lark.
  </Card>

  <Card title="Migrating from Firebase" icon="arrow-right-arrow-left" href="/firebase/migration">
    Step-by-step migration guide.
  </Card>
</CardGroup>
