TerraScale

TerraScale
Public Alpha

A typed document database with asynchronous replication across São Paulo and San Jose. The global endpoint routes to the nearest healthy region selected by your project. Public Alpha has no uptime percentage or SLA.

  • Selected-region routing
  • Asynchronous replication
  • Typed SDKs
Developer SDK

Query your data
in the language you love

First-class C# and TypeScript SDKs target the same public HTTP routes used by the dashboard, with generated OpenAPI models underneath.

  • Generated OpenAPI contract catalog
  • Typed C# and TypeScript clients
  • Dashboard uses the public SDK boundary
  • Launch-region inputs for gru, sjc
~/app/queries.cs
using System.Net.Http.Headers;
using System.Net.Http.Json;

// Server-side: TERRABASE_API_KEY holds a tb_ key.
// Supply a resolver and trusted origins from server configuration.
// The override skips discovery.
static class DocumentsExample
{
    private static readonly HttpClient Http = new(new SocketsHttpHandler {
        AllowAutoRedirect = false,
        PooledConnectionLifetime = TimeSpan.FromMinutes(5)
    });

    public static async Task<string> CreateAndQueryCustomers(
        Func<CancellationToken, Task<Uri>> resolveRegion, IReadOnlyCollection<Uri> trustedOrigins,
        string project, string database, string collection, Uri? staticOrigin = null,
        CancellationToken cancellationToken = default)
    {
        using var deadline = CancellationTokenSource.CreateLinkedTokenSource(cancellationToken);
        deadline.CancelAfter(TimeSpan.FromSeconds(30));
        var token = deadline.Token;
        token.ThrowIfCancellationRequested();
        var origin = staticOrigin ?? await resolveRegion(token).WaitAsync(token);
        if (!origin.IsAbsoluteUri || origin.Scheme != Uri.UriSchemeHttps ||
            origin.UserInfo.Length != 0 || origin.AbsolutePath != "/" ||
            origin.Query.Length != 0 || origin.Fragment.Length != 0 ||
            !trustedOrigins.Contains(origin))
            throw new ArgumentException("Expected a trusted HTTPS origin");
        if (new[] { project, database, collection }.Any(name =>
            string.IsNullOrEmpty(name) || name == "." || name == ".."))
            throw new ArgumentException("Resource names are required");
        var apiKey = Environment.GetEnvironmentVariable("TERRABASE_API_KEY");
        if (string.IsNullOrWhiteSpace(apiKey))
            throw new InvalidOperationException("TERRABASE_API_KEY is required");

        var path = "/v1/projects/" + Uri.EscapeDataString(project) +
            "/databases/" + Uri.EscapeDataString(database) +
            "/collections/" + Uri.EscapeDataString(collection);
        using var create = new HttpRequestMessage(HttpMethod.Post, new Uri(origin, path + "/documents"));
        create.Headers.Authorization = new AuthenticationHeaderValue("Bearer", apiKey);
        create.Content = JsonContent.Create(new { email = "[email protected]", plan = "pro" });
        using (var created = await Http.SendAsync(create, HttpCompletionOption.ResponseHeadersRead, token))
            created.EnsureSuccessStatusCode();
        using var request = new HttpRequestMessage(HttpMethod.Post, new Uri(origin, path + "/query"));
        request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", apiKey);
        request.Content = JsonContent.Create(new {
            filter = new { eq = new[] { "/plan", "pro" } },
            limit = 25
        });
        using var response = await Http.SendAsync(request, HttpCompletionOption.ResponseHeadersRead, token);
        response.EnsureSuccessStatusCode();
        return await response.Content.ReadAsStringAsync(token);
    }
}
Platform

Public Alpha,
with explicit boundaries

The launch contract covers document data, two selectable regions, typed clients, and customer-visible health without an uptime commitment.

Typed Data API

Create databases, repositories, schemas, and documents, then query with TQL through one public API.

Repositories TQL SDK clients

Regional Routing

The global endpoint chooses the nearest healthy selected region. Strict regional endpoints never serve from an unselected region.

Global endpoint Strict regional endpoints Selected regions

Launch Regions

Choose São Paulo or San Jose during Public Alpha.

gru sjc

Measured Signals

Replication health, convergence, conflicts, API latency, and geographic latency estimates remain separate values. Customer content stays in selected regions. Customer traffic requires TLS 1.2 or newer, data at rest uses qualified encryption, and every request still requires authorization.

Observation time Evidence labels No bounded-lag promise

Register for the TerraScale Public Alpha.

Starter and Pro have one eligible 30-day trial per verified payment method and organization.

  • Monthly paid plans
  • No paid overages