r/selfhosted • • 19h ago

Release (No AI) TrailBase 0.34: Fast, open and single-executable Firebase alternative (5.6k⭐)

Post image

TrailBase is an open and fast(est) Firebase-like backend (BaaS) for building your apps. It provides: type-safe APIs with change subscriptions, auth, multi-DB, a WebAssembly runtime, GeoJSON, admin UI, ...

It's a single self-contained executable, easy to self-host and built with Rust, Wasmtime & SQLite and more recently also Postgres. We provide clients for many environments: JS/TS, Dart/Flutter, Go, Rust, .Net, Kotlin, Swift and Python.

Just release v0.34.6. Since the last time posting here, TrailBase has added:

  • Major UI overhauls:
    • Built-in admin OpenAPI browser with user-impersonation.
    • Table explorer: make foreign-keys followable, split data/schema/indexes into separate tabs, and organize tables/views by DB. Add `ON (DELETE|UPDATE)` referential action support to the schema editor.
    • Mobile glow-up and improved screen estate usage with sticky nav and url bar fade.
    • A searchable and interactive ERD page. Overhauled logs and accounts pages.
    • Many more: prompt users on schema changes in the SQL editor, improved dark-mode colors, add S3 settings, ...
  • Built-in MCP server.
  • Performance: a lot of detail performance optimizations (reduce allocations, ...) resulting in an additional 10+% gains.
  • CLI auto-complete.
  • Expose custom WASM endpoints in OpenAPI spec.
  • "Sign-in with Apple" token exchange for native iOS/MacOS apps.
  • Many more features and fixes, e.g.: `trail user export` CLI command for take-out combating lock-in, `trail run --read-only` flag for read replicas., batch execute support for WASM guests, custom scopes for OIDC providers, ...

The project is still young (~2 years) and rapidly evolving, any feedback is genuinely appreciated. If you're feeling adventures and end up checking it out, don't hesitate to reach out 🙏.

Take a look at the live demo, our GitHub or website.

58 Upvotes

29 comments sorted by

•

u/asimovs-auditor 19h ago

Expand the replies to this comment to learn how AI was used in this post/project.

→ More replies (1)

5

u/TheArcticRoyal 19h ago

looks like they finally made the table explorer less of a pain to navigate, that ERD view on mobile is actually kinda slick

1

u/trailbaseio 7h ago

Thanks for the kind words 🙏 - if you have any thoughts on how to make it even slicker, would love to hear

2

u/Professional-Ad1784 5h ago

I've been using pocketbase for quite a while, I'm happy to see solid alternatives, nice work!

I discovered TrailBase through tanstack/db sync example =)

1

u/murphy984 19h ago

a searchable erd page would save me so much squinting at migrations to figure out how tables connect

1

u/trailbaseio 6h ago

🧐🙏

1

u/hinzwifi 14h ago

love this, I was about to use pocketbase but I think I'll go with this. thank you

2

u/trailbaseio 6h ago

Appreciated. PocketBase has been a great inspiration. If you want the performance, absolutely go with TB. If you have the luxury, checking out both may be fun. They can both be spun up in seconds: single binary and no config.

1

u/zunjae 1h ago

This is exactly what I need, thank you. Single executable is a huge issue for anyone who cares about security but apparently you also provide docker support.

1

u/geek_at 19h ago

still no php support 😭

2

u/trailbaseio 19h ago edited 6h ago

Sorry 😇. It's a simple API surface but it's already a challenge to keep 8 other clients functionally in sync. I'm also not sure I'd be the most qualified PHP custodian :hide:

0

u/cloudcity 19h ago

I've been following this project for a long time, dont have a use for it yet, but Im impressed by the way you've developed and updated it. I hope realize this is not some AI slop but a really thoughtful open source backend!

-13

u/Resistant4375 19h ago

AI wasn’t used.. are you sure about that…!?

9

u/trailbaseio 19h ago

I appreciate you keeping me honest. Maybe you can help me out. According to the contributors tab there's a single 4-line commit. But when I click on the commit history nothing shows up:

1

u/wanze 14h ago

It's this PR: https://github.com/trailbaseio/trailbase/pull/290.

I don't know why the link you're looking at doesn't show it, because it is merged into main: https://github.com/trailbaseio/trailbase/commit/fe360821579ff4d6e3d34382bd935ad7b4c0b4ff

But GitHub is often weird like that.

0

u/trailbaseio 9h ago edited 9h ago

Appreciated 🙏. I guess I'll have to work on the absolutness of my - meant to be funny - slop replies going forward.

What's important to me:

  • Thousands of hours of writing code went into the project. It won't just be abandoned. Sadly in practice, a lot of vibe coded projects that didn't require a lot of upfront investment will be abandoned as quickly.
  • I care about quality, succinctness, readability and therefore maintainability. I understand that there's no business incentive to make LLMs terse, every output token pays dividends as future input tokens :)

I also want to make clear, this is not a shool project - the result matters more to me than how you got there. Not everyone is or can be a seasoned Rust dev.

I do have one (that I'm aware off) test-only pure vibe dependency for inprocess postgres testing. It has been interesting and a challenge from a reliability, debuggability perspective as well as tracking breacking version upgrades. What I'm trying to say, being mindful of suplychains is likely more important than ever

0

u/wanze 3h ago

I was just trying to provide information on the missing commit, not share an opinion on AI devleopment, but if we want to open that can of worm, then I unfortunately disagree with your view on AI development.

At least I read "I care about quality, succinctness, readability and therefore maintainability." and the following sentence to mean that AI code can't be quality, etc. Claude Opus (even Sonnet) has since 4.5 been very good, 5.0 and 5.5 has only made it better. Claude today writes better code than 95% of developers, if you let it. (And obviously better code than 100% of non-developers, who couldn't otherwise write anything, which is the scary part.)

But you get out what you put in – if you don't have the development experience to guide it to give you what you want, or you don't have the overview to recognize when it's taking a wrong turn and adjust it, you will indeed get slop. I'm not saying you don't have either of those–the fact that this project predates the slop era proves that–I'm just saying that that is why there is so much vibecoded garbage out there.

I'm a MSc CS with about 20 years of development experience, building PCI DSS systems as my job, and I rarely write code anymore myself. It's really just not worth it. All code of course gets reviewed, both by me an the assigned reviewers), and the code is on par with existing code in our projects. Sometimes even better.

If you don't end up embracing AI for development, then I think you will fall behind, if you're a professional developer.

But I do also understand why you're doing this: hoping your project will stand out from all the garbage out there. I'm torn on whether it'll works, because on the one hand, I've stopped added new projects to my own stack, because I don't trust them when they're created by somebody who doesn't understand the code, and thus can't even review it. But on the other hand, not embracing AI will reduce cadence for the project and it sets a tone for the project I don't agree with. However, the fact that you accepted this tiny Claude commit without question speaks another story than the one in this thread, which I think is positive.

1

u/trailbaseio 2h ago

You should always do what works for you 👍. I'm not sure I see the contradiction or why your MSc would be relevant to me. I prefer subject over authority arguments 🤷‍♀️. Nobody said AI cannot provide value. It can absolutely help, especially when you're otherwise slow or lack experience.

1

u/wanze 2h ago

You seem to be getting almost offended by me mentioning my experience. I'll also remind you that you used the fact that there was "2 years of human commit history" as an argument for trusting you in another comment. Pot calling the kettle black.

Of course argument from authority is a fallacy, but I find it relevant as evidence that I am able to judge code quality. Lots of people make arguments about everything being AI slop, without ever having written a single line of code themselves. I'm trying to separate myself from that group of people, exactly the same way you are trying to prove in here that you aren't a vibecoder either. Pot calling the kettle black, again.

"Nobody said AI cannot provide value." – you saying "I care about quality, succinctness, readability and therefore maintainability" as an argument against AI development, is basically saying that you don't think AI code can be "quality, succinctness, readability and therefore maintainability". I'm not interested in debating semantics, but that's how it reads. If you meant something different, you should have written something different.

But I also did notice that you had downvoted my comment less than 2 minutes after posting it, which is not enough time for you to even read it. That tells me enough about your motivations for your interaction, and this is clearly not a good faith conversation on your part, so I'm done. :)

-30

u/Resistant4375 19h ago

So you did use AI - yes or no?

5

u/trailbaseio 19h ago

All code was written by me or contributors. Contributors may have used AI. Please check out the very human 2 year commit history

-28

u/Resistant4375 19h ago

So you don’t even know if your contributors used AI or not?

9

u/trailbaseio 19h ago

If you want to be pedantic, I guess not. How would I? All I can vouch for is myself. All contributions were reviewed and in most cases iterated on by me. Check out the PR history.

1

u/parkerreno 18h ago

How would they? You have to go off of people's word. Well prompted & reviewed AI code doesn't have any sort of distinguishing quality to make it stand out.

2

u/83736294827 18h ago

You do realize pretty much every developer in the world uses ai right? It’s not the same as asking claude to build an entire app in one prompt.

-18

u/VaporousMote 18h ago

Stop with this tech CEO propaganda.

3

u/SimpleTeacher5046 18h ago

This is peak neck beard redditor. Literally one line commit by someone using Claude and this guy goes full tard.

2

u/bigblueboyqt 18h ago

You did it, amazing detective work