base on A blazingly fast, open-source application server with type-safe APIs, built-in JS/ES6/TS runtime, realtime, auth, and admin UI built on Rust, SQLite & WASM. <p align="center">
<a href="https://trailbase.io" target="_blank">
<picture>
<img alt="TrailBase logo" width="150" src="assets/logo.svg" />
</picture>
</a>
</p>
<p align="center">
An open, <a href="https://trailbase.io/reference/benchmarks/">blazingly fast</a>,
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 & WebAssembly.
<p>
<p align="center">
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.
<p>
<p align="center">
<a href="https://github.com/trailbaseio/trailbase/stargazers/">
<img src="https://img.shields.io/github/stars/trailbaseio/trailbase?style=social&label=Star" />
</a>
<a href="https://github.com/trailbaseio/trailbase/actions?query=branch%3Amain">
<img src="https://github.com/trailbaseio/trailbase/actions/workflows/test.yml/badge.svg?branch=main" alt="Build Status">
</a>
<a href="https://github.com/trailbaseio/trailbase/blob/main/LICENSE">
<img src="https://img.shields.io/badge/license-OSL_3.0-blue" alt="License - OSL 3.0">
</a>
<a href="https://trailbase.io/reference/roadmap/">
<img src="https://img.shields.io/badge/status-alpha-orange" alt="Status - Alpha">
</a>
</p>
# TrailBase
<p align="center">
<a
href="https://demo.trailbase.io/_/admin?loginMessage=E-mail:%20admin@localhost%20%E2%80%A2%20Password:%20secret"
target="_blank"
>
<picture>
<img alt="Admin UI" width="600" src="docs/src/assets/shelve.webp" />
</picture>
</a>
</p>
<p align="center">
<strong>
Try the
<a href="https://demo.trailbase.io/_/admin?loginMessage=E-mail:%20admin@localhost%20%E2%80%A2%20Password:%20secret" target="_blank">
demo
</a> online
</strong>
<br/>Email: <em>admin@localhost</em>
<br/>password: <em>secret</em>
</p>
For more context, documentation, and a live demo, check out the website:
[trailbase.io](https://trailbase.io).
Questions? Thoughts? - Take a look at the
[FAQ](https://trailbase.io/reference/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 the
server, client libraries, tests, documentation and examples.
Only the [benchmarks](https://github.com/trailbaseio/trailbase-benchmark) are
kept separately due to their external dependencies.
Pre-built binaries are available as
[GitHub releases](https://github.com/trailbaseio/trailbase/releases/) for
Linux, MacOS and Windows or [Docker images](https://hub.docker.com/r/trailbase/trailbase).
Client packages for various languages are available via:
- [JavaScript/TypeScript](https://www.npmjs.com/package/trailbase)
- [Dart/Flutter](https://pub.dev/packages/trailbase)
- [Rust](https://crates.io/crates/trailbase-client)
- [C#/.Net](https://www.nuget.org/packages/TrailBase/)
- [Swift](https://github.com/trailbaseio/trailbase/tree/main/client/swift/trailbase)
- [Go](https://github.com/trailbaseio/trailbase/tree/main/client/go/trailbase)
- [Python](https://pypi.org/project/trailbase/)
## Getting Started
TrailBase is a **single executable** and therefore very easy to
[deploy](https://trailbase.io/getting-started/install/).
You can simply download the appropriate pre-built
[GitHub release](https://github.com/trailbaseio/trailbase/releases/) bundle for
your system (MacOS, Linux or Windows), unpack and run the executable w/o having
to worry about dependencies or shared-library skew.
If you want to get started even quicker, install TrailBase with the following
command:
```sh
# Linux & MacOS
curl -sSL https://trailbase.io/install.sh | bash
# Windows
iwr https://trailbase.io/install.ps1 | iex
```
Alternatively, run TrailBase using the Docker image:
```sh
alias trail='
mkdir -p traildepot && \
docker run \
--network host \
--mount type=bind,source="$PWD"/traildepot,target=/app/traildepot \
trailbase/trailbase /app/trail'
```
Then execute `trail help` to check that it is properly installed and list all
available command line options.
To bring up the server on `localhost:4000`, run:
```sh
trail run
```
On first start, a `./traildepot` folder will be bootstrapped, an admin user
created and their credentials printed to the terminal.
Afterwards open http://localhost:4000/_/admin/ in your browser and use the
credentials to log into the admin dashboard.
## Building
If you have all the necessary build dependencies (Rust, protobuf, node.js,
pnpm) installed, you can build TrailBase by running:
```sh
# Windows only: make sure to enable symlinks (w/o `mklink` permissions for your
# user, git will fall back to copies).
git config core.symlinks true && git reset --hard
# Download necessary git sub-modules.
git submodule update --init --recursive
# Install Javascript dependencies first. Required for the next step.
pnpm install
# Build the executable. Adding `--release` will yield a more optimized binary
# but slow builds significantly.
cargo build --bin trail
```
Alternatively, if you want to build a Docker image or don't want to deal with
build dependencies, you can simply run:
```sh
# Download necessary git sub-modules.
git submodule update --init --recursive
# Build the container as defined in `Dockerfile`.
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 [Open Software License 3.0
(OSL-3.0)](https://opensource.org/licenses/OSL-3.0).
We chose the OSL-3.0 over other, better known copyleft licenses due to its
narrower definition of "derivative work" that **only** covers modifications to
TrailBase itself.
This means that your application's original code is **not** subject to the
OSL-3.0's copyleft provisions. This is true whether you connect over the
network (e.g. web, mobile, other services, etc.), you're serving static assets,
using the runtime to write custom server-side logic or using TrailBase as a
framework.
This limited scope is similar to the GPL's classpath or the LGPL's [linking
exception](https://en.wikipedia.org/wiki/GPL_linking_exception).
The goal is to allow building on top and around of TrailBase without any
provisions rubbing off onto your original work, while making sure that fixes
and improvements find their way back to the community.
These are our intentions - we felt the need to spell them out explicitly
because licensing is tricky and we ain't lawyers.
Graciously, the license's author provides some more
[explanations](https://rosenlaw.com/OSL3.0-explained.htm).
If you have any concerns, please reach out.
If you require an
[exception](https://www.gnu.org/philosophy/selling-exceptions.html), reach out
to
[email protected].
", Assign "at most 3 tags" to the expected json: {"id":"14498","tags":[]} "only from the tags list I provide: [{"id":77,"name":"3d"},{"id":89,"name":"agent"},{"id":17,"name":"ai"},{"id":54,"name":"algorithm"},{"id":24,"name":"api"},{"id":44,"name":"authentication"},{"id":3,"name":"aws"},{"id":27,"name":"backend"},{"id":60,"name":"benchmark"},{"id":72,"name":"best-practices"},{"id":39,"name":"bitcoin"},{"id":37,"name":"blockchain"},{"id":1,"name":"blog"},{"id":45,"name":"bundler"},{"id":58,"name":"cache"},{"id":21,"name":"chat"},{"id":49,"name":"cicd"},{"id":4,"name":"cli"},{"id":64,"name":"cloud-native"},{"id":48,"name":"cms"},{"id":61,"name":"compiler"},{"id":68,"name":"containerization"},{"id":92,"name":"crm"},{"id":34,"name":"data"},{"id":47,"name":"database"},{"id":8,"name":"declarative-gui "},{"id":9,"name":"deploy-tool"},{"id":53,"name":"desktop-app"},{"id":6,"name":"dev-exp-lib"},{"id":59,"name":"dev-tool"},{"id":13,"name":"ecommerce"},{"id":26,"name":"editor"},{"id":66,"name":"emulator"},{"id":62,"name":"filesystem"},{"id":80,"name":"finance"},{"id":15,"name":"firmware"},{"id":73,"name":"for-fun"},{"id":2,"name":"framework"},{"id":11,"name":"frontend"},{"id":22,"name":"game"},{"id":81,"name":"game-engine "},{"id":23,"name":"graphql"},{"id":84,"name":"gui"},{"id":91,"name":"http"},{"id":5,"name":"http-client"},{"id":51,"name":"iac"},{"id":30,"name":"ide"},{"id":78,"name":"iot"},{"id":40,"name":"json"},{"id":83,"name":"julian"},{"id":38,"name":"k8s"},{"id":31,"name":"language"},{"id":10,"name":"learning-resource"},{"id":33,"name":"lib"},{"id":41,"name":"linter"},{"id":28,"name":"lms"},{"id":16,"name":"logging"},{"id":76,"name":"low-code"},{"id":90,"name":"message-queue"},{"id":42,"name":"mobile-app"},{"id":18,"name":"monitoring"},{"id":36,"name":"networking"},{"id":7,"name":"node-version"},{"id":55,"name":"nosql"},{"id":57,"name":"observability"},{"id":46,"name":"orm"},{"id":52,"name":"os"},{"id":14,"name":"parser"},{"id":74,"name":"react"},{"id":82,"name":"real-time"},{"id":56,"name":"robot"},{"id":65,"name":"runtime"},{"id":32,"name":"sdk"},{"id":71,"name":"search"},{"id":63,"name":"secrets"},{"id":25,"name":"security"},{"id":85,"name":"server"},{"id":86,"name":"serverless"},{"id":70,"name":"storage"},{"id":75,"name":"system-design"},{"id":79,"name":"terminal"},{"id":29,"name":"testing"},{"id":12,"name":"ui"},{"id":50,"name":"ux"},{"id":88,"name":"video"},{"id":20,"name":"web-app"},{"id":35,"name":"web-server"},{"id":43,"name":"webassembly"},{"id":69,"name":"workflow"},{"id":87,"name":"yaml"}]" returns me the "expected json"