# JavaScript SDK

The SurrealDB SDK for JavaScript enables simple and advanced querying of a remote or embedded database.

The SurrealDB SDK for JavaScript and TypeScript lets you easily connect to SurrealDB from any environment: frontend, backend, serverless, mobile, or embedded within your app. It supports connecting to remote or embedded databases, running queries, managing data and authentication, and subscribing to real-time updates with live queries.

> [!NOTE]
> The latest version of the SDK is `2.0.8`.
> The SDK works with SurrealDB versions `v2.0.0` to `v3.2.4`, ensuring compatibility with the latest version.

## Getting started

- [Installation](/docs/reference/javascript/installation.md) - Install the SDK and add it to your project.

- [Getting started guide](/docs/languages/javascript.md) - Connect to SurrealDB and run your first queries.

## Learn

- [Concepts](/docs/reference/javascript/concepts/connecting-to-surrealdb.md) - Guides for connecting, authenticating, querying, and working with data.

- [API Reference](/docs/reference/javascript/api/core/surreal.md) - Complete reference for the SDK's methods, types, and errors.

## Language and engines

- [JavaScript](/docs/reference/javascript/installation.md) (available)

- [Node.js](/docs/reference/javascript/engines/node.md) (available)

- [WebAssembly](/docs/reference/javascript/engines/wasm.md) (available)

## Frameworks

- [React](/docs/reference/javascript/frameworks/react.md) (available)

- [Solid.js](/docs/reference/javascript/frameworks/solidjs.md) (available)

- [Vue.js](/docs/reference/javascript/frameworks/vuejs.md) (available)

- [Expo](/docs/reference/javascript/frameworks/expo.md) (available)

- [React Native](/docs/reference/javascript/frameworks/react-native.md) (available)

- **Next.js** (coming soon)

- **Angular** (coming soon)

- **Svelte** (coming soon)

## Example projects

You can find example repositories that demonstrate how to integrate SurrealDB in a number of different environments:

- [Surreal Stickies (React)](https://github.com/surrealdb/examples/tree/main/notes-v2) - A simple note-taking application built with SurrealDB, React, and Vite.

- [Surreal Stickies (SvelteKit)](https://github.com/surrealdb/examples/tree/main/notes-kit) - A simple note-taking application built with SurrealDB, SvelteKit, and Vite.

- [Surreal Presence (React)](https://github.com/Odonno/surrealdb-presence-demo) - A demo project on how to create a realtime presence web application using SurrealDB Live Queries.

- [TypeScript Starter](https://github.com/surrealdb/examples/tree/main/ts-bun-starter) - A simple TypeScript starter project using Bun.

## Contributing

To contribute to the SDK code, submit an Issue or Pull Request in the [surrealdb.js](https://github.com/surrealdb/surrealdb.js) repository. To contribute to this documentation, submit an Issue or Pull Request in the [docs.surrealdb.com](https://github.com/surrealdb/docs.surrealdb.com) repository.

## Sources

- [GitHub repository](https://github.com/surrealdb/surrealdb.js)
- [NPM package](https://npmjs.com/package/surrealdb)
- [JSR package](https://jsr.io/@surrealdb/surrealdb)
