An open, sub-millisecond, single-executable Firebase alternative with type-safe APIs, built-in WebAssembly runtime, realtime subscriptions, auth, and admin UI built on Rust, SQLite & Wasmtime.
Find a file
Sebastian Jeltsch 63c330c4e5 Add a custom PoC apalis queue storage backend.
Forked from apalis-sql's sqlite implementation.
2025-04-20 07:35:55 +02:00
.github/workflows Bump Flutter version in GitHub test action . 2025-01-14 23:04:44 +01:00
assets Break up dotnet client into src, test, and docs. 2025-01-15 22:31:17 +01:00
client When logging responses to stdout, log them as JSON. 2025-04-15 15:00:45 +02:00
deploy Update k8s/podman setup: use a volume by default (instead of bind mount), explicitly declare container port when used in podman w/o service, use default namespace by default, and provide podman instructions. 2025-03-24 11:00:29 +01:00
docs Update JS dependencies. 2025-04-15 22:17:12 +02:00
examples Update JS dependencies. 2025-04-15 22:17:12 +02:00
trailbase-apalis Add a custom PoC apalis queue storage backend. 2025-04-20 07:35:55 +02:00
trailbase-assets Explicitly time logs (to avoid skew), move logging to on_event and add milliseconds to logs dashboard. 2025-04-16 12:36:45 +02:00
trailbase-cli Extend trailbase-sqlites execution model to allow for parallel reads. This reduces the latency long-tail for slow reads. 2025-04-15 12:15:40 +02:00
trailbase-core Update rust dependencies. 2025-04-17 14:52:02 +02:00
trailbase-extension Update rust dependencies. 2025-04-17 14:52:02 +02:00
trailbase-schema Update rust dependencies. 2025-04-17 14:52:02 +02:00
trailbase-sqlite Extend trailbase-sqlites execution model to allow for parallel reads. This reduces the latency long-tail for slow reads. 2025-04-15 12:15:40 +02:00
vendor Update rusqlite: v0.33 -> v0.34. 2025-03-10 14:10:18 +01:00
.dockerignore Update Rust and JS deps. 2025-02-27 00:59:20 +01:00
.gitignore Remove cargo settings to avoid issues for folks building on different platforms and independent from which linkers they have installed. 2025-02-12 22:07:27 +01:00
.gitmodules Remove vendored rustc_tools_util. 2025-02-14 23:15:23 +01:00
.pre-commit-config.yaml Break up dotnet client into src, test, and docs. 2025-01-15 22:31:17 +01:00
.rustfmt.toml Squash all commits for a fresh start. 2024-10-30 23:38:56 +01:00
Cargo.lock Add a custom PoC apalis queue storage backend. 2025-04-20 07:35:55 +02:00
Cargo.toml Add a custom PoC apalis queue storage backend. 2025-04-20 07:35:55 +02:00
CHANGELOG.md Prepare new release v0.9.3. 2025-04-17 15:18:42 +02:00
Dockerfile Bump Rust version for docker builds to latest stable v1.86. 2025-04-04 13:27:14 +02:00
LICENSE Re-re-license from AGPLv3 to the weaker copyleft OSL-3.0. 2024-11-02 12:35:10 +01:00
Makefile Update Rust and JS dependencies. 2025-02-14 23:31:19 +01:00
pnpm-lock.yaml Update JS dependencies. 2025-04-15 22:17:12 +02:00
pnpm-workspace.yaml Move JS assets into a separate crate to avoid unecessary rebuilds as much as possible. 2025-04-08 22:50:50 +02:00
README.md Add loginMessage?= to demo links. 2025-03-30 22:15:03 +02:00

TrailBase logo

An open, blazingly fast, single-executable Firebase alternative with type-safe REST & realtime APIs, built-in JS/ES6/TS runtime, SSR, auth and admin UI built on Rust, SQLite & V8.

Simplify with fewer moving parts: an easy to self-host, single-executable, extensible backend for your mobile, web or desktop application. Sub-millisecond latencies eliminate the need for dedicated caches, no more stale or inconsistent data.

Build Status License - OSL 3.0 Status - Alpha

TrailBase

Admin UI

Try the demo online
Email: admin@localhost
password: secret.

For more context, documentation, and a live demo, check out the website: trailbase.io. Questions? Thoughts? - Take a look at the FAQ or reach out. If you like TrailBase or want to follow along, consider leaving a 🙏.

Project Structure & Releases

This repository contains all components that make up TrailBase including client libraries, tests, documentation and examples. Only the benchmarks are kept separately due to their external dependencies.

Pre-built static binaries are available as GitHub releases for Linux, MacOS and Windows. On Windows the Docker image can be used.

Client packages for various languages are available via:

Running

You can get TrailBase either as a pre-built static binary (MacOS & Linux), run it using Docker (Windows, MacOS, Linux, ...), or build it from source.

The latest pre-built binaries can be downloaded from GitHub releases and run via:

$ ./trail run

Thanks to trail being a single static binary, there's no need to install anything including system dependencies. This also means that you can confidently update your system and deploy to different machines without having to worry about prior set-up or shared library compatibility.

Using Docker, you can run the following, which will also create and mount a local ./traildepot asset directory:

$ mkdir traildepot
$ alias trail="docker run -p 4000:4000 --mount type=bind,source=$PWD/traildepot,target=/app/traildepot trailbase/trailbase /app/trail"
$ trail run

To get a full list of commands, simply run trail --help .

Building

If you have all the necessary dependencies (Rust, protobuf, node.js, pnpm) installed, you can build TrailBase by running:

$ git submodule update --init --recursive
$ cargo build --release

To build a static binary you have to explicitly specify the target platform, e.g. for Linux using glibc:

$ RUSTFLAGS="-C target-feature=+crt-static" cargo build --target x86_64-unknown-linux-gnu --release

Alternatively, if you want to build a Docker image or don't have to deal with build dependencies, you can simply run:

$ git submodule update --init --recursive
$ docker build . -t trailbase

Contributing

Contributions are very much appreciated 🙏. For anything beyond bug fixes, let's briefly chat to see how a proposal fits into the overall roadmap and avoid any surprises.

We're not sure yet what the best setup or exact license is for compatibility between OSL-3.0 and more popular licenses or use as a framework. So we'd ask you to sign a simple CLA that retains your copyright, ensures that TrailBase will continue to forever be freely available under an OSI-approved copyleft license, while allowing for some flexibility and sub-licensing as established by much larger, successful projects such as Grafana or Element.

License

TrailBase is free software under the terms of the OSL-3.0.

We chose this license over more popular, similar copyleft licenses such as AGPLv3 due to its narrower definition of derivative work that only covers modifications to TrailBase itself. This is similar to GPL's classpath or LGPL's linkage exception allowing the use of TrailBase as a framework without inflicting licensing requirements on original work layered on top. That said, we ain't lawyers. The author of the license provides a more thorough explanation. If you have any concerns or advice for us, please reach out.

If you require an exception, reach out to contact@trailbase.io.