> For the complete documentation index, see [llms.txt](https://outerbase.gitbook.io/untitled/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://outerbase.gitbook.io/untitled/get-started/overview.md).

# Overview

Currently this SDK is intended for usage in either Typescript or Javascript projects. If you are looking to have it made available for another platform or language we'd love to [hear more](https://github.com/outerbase/sdk/discussions) all about that!

## Install the package

You can add the package to your project in the ways.

{% tabs %}
{% tab title="npm" %}
`npm i @outerbase/sdk`
{% endtab %}

{% tab title="pnpm" %}
`pnpm add @outerbase/sdk`
{% endtab %}
{% endtabs %}

## How to use the SDK

Below is a chart that breaks down which features are intended for what platform use cases. All features should work on both the frontend and backend but for best practices and security purposes we find it important to explicitly enumerate them below.

| Feature        | System                          |
| -------------- | ------------------------------- |
| Data Models    | Fronten&#x64;**\*\*** & Backend |
| Remote Queries | Frontend & Backend              |
| Query Builder  | Backend                         |

## Data Models

Generating data models helps you map your data exactly as the relationships are declared in your database with the rest of your development stack. This greatly reduces ambiguity, out of sync nomenclature, and removes unnecessary manual redeclaration of classes at each layer of your application.

Since the introspection is only generating Typescript classes, there is no issues with using it on the frontend or the backend to reference those models.

***\*\*** - We don't advise you using available methods that generate or execute SQL on the frontend, these are meant for backend purposes only. See* [*Query Builder section*](#query-builder) *for more details as to why.*

## Remote Queries

Executing network calls to saved queries within Outerbase allow you to send requests securely without exposing SQL statements to your frontend client, and only allowing a pre-determined set of SQL statements to be executable. Because of those reasons running remote queries is entirely safe on both the frontend and backend side of your development stack.

An added benefit to executing remote queries is the fact that these queries can be cached with a customized TTL (time to live) which can greatly reduce the overhead your database receives for duplicative calls, or long executing queries.

## Query Builder

Query Builder generates either a named or positional parameterized raw SQL query, accompanied by the parameters, and can be used to `.query()` and trigger a network call to your database. If that event was fired from the frontend platform then users could observe that traffic and potentially send malicious SQL statements to your database causing potentially catastrophic and unintended affects.

If you have any questions, you can reach us at <support@outerbase.com>

{% hint style="info" %}

#### We are open source!

Every space voyage needs a crew. The Outerbase SDK is an open source project that any human being can contribute to. Add your ideas to our [Discussions](https://github.com/outerbase/sdk/discussions), report your bugs as [Issues](https://github.com/outerbase/sdk/issues), or open your first [Pull Request](https://github.com/outerbase/sdk/pulls) to add more functionality for others.
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://outerbase.gitbook.io/untitled/get-started/overview.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
