surrealdb  by surrealdb

Unified multi-model database for realtime applications

Created 4 years ago
32,364 stars

Top 1.3% on SourcePulse

GitHubView on GitHub
Project Summary

SurrealDB is a multi-model database built in Rust, designed to unify document, graph, relational, time-series, and geospatial data types into a single engine. It targets developers building data-intensive, real-time applications by simplifying database and API infrastructure, enabling faster and more cost-effective development of secure, performant applications.

How It Works

SurrealDB is engineered as a single Rust binary, allowing it to run embedded, in the browser via WebAssembly, at the edge, or distributed across a cluster. Its core innovation lies in its native multi-model support, allowing developers to leverage various data paradigms—including document, graph, relational (schema-full/schemaless), time-series, and geospatial—within a unified engine. This is accessed through SurrealQL, an SQL-like query language, and features a real-time API layer with built-in authentication and granular permissions, eliminating the need for extensive backend code.

Quick Start & Requirements

Installation is streamlined via package managers or a simple script:

  • macOS: brew install surrealdb/tap/surreal
  • Linux/Windows: curl --proto '=https' --tlsv1.2 -sSf https://install.surrealdb.com | sh (or ps1 for Windows)
  • Docker: docker run --rm --pull always --name surrealdb -p 8000:8000 surrealdb/surrealdb:latest start

No specific hardware prerequisites are mentioned beyond standard OS compatibility.

Highlighted Details

  • Multi-Model Native Support: Seamlessly integrates document, graph, relational, time-series, and geospatial data.
  • Real-time Collaborative API: Functions as both a database and an API backend with live query push notifications.
  • Direct Client Connectivity: Enables querying directly from web browsers and client devices with built-in permissions.
  • Advanced Querying: Supports SurrealQL, graph traversal, full-text and vector indexing, and geospatial queries without complex JOINs.
  • Embedded Logic: Extensible with JavaScript functions for custom server-side computation.

Maintenance & Community

SurrealDB fosters an active community with channels on Discord, X, LinkedIn, Reddit, and YouTube. Contribution guides are available for developers interested in participating.

Licensing & Compatibility

Core database components are licensed under the Business Source License 1.1 (BSL 1.1), which may impose restrictions on commercial use beyond a certain scale or purpose, requiring specific licensing for broader commercial deployment. Libraries and SDKs are typically under Apache License 2.0 or MIT. Compatibility for commercial use hinges on understanding the BSL 1.1 terms.

Limitations & Caveats

GraphQL support is listed as "coming soon," indicating it is not yet a feature. While the core is BSL 1.1, specific commercial use cases may require separate licensing agreements. The project emphasizes its multi-model capabilities, but the maturity and performance characteristics across all supported models under heavy load would require further investigation.

Health Check
Last Commit

2 days ago

Responsiveness

Inactive

Pull Requests (30d)
10
Issues (30d)
33
Star History
325 stars in the last 30 days

Explore Similar Projects

Feedback? Help us improve.