9 ms·
PocketBase is a small open source project that I've been working for the last couple of months. You could think of PocketBase as a lightweight Firebase/Supabas
by randomwebdev 4y ago
PocketBase is a small open source project that I've been working for the last couple of months.
You could think of PocketBase as a lightweight Firebase/Supabase alternative.
In short, it is an open source Go backend (framework and app) consisting of:
- embedded database (SQLite) with realtime subscriptions\
- backed-in files and users management
- convenient Admin dashboard UI
- simple REST-ish API
And all of this compiles to a single portable binary.
It's still a little rough around the edges, but you could give it a try and share your feedback.
- swyx 4y agofeedback: the "in one file" marketing confused me for a bit until i realized you meant "as a single binary". i would say that instead.
- inevaexisted 4y agoI got tripped up on the same thing.
- Silica6149 4y agoNice! It looks like you put a lot of work into this, what was the motivation behind this project? Did you not like the existing solutions available?
- randomwebdev 4y agoThanks! It was initially created to be the backend for the next version of my other open source project - Presentator v3 (https://github.com/presentator/presentator https://github.com/presentator/presentator). You could read more at https://github.com/presentator/presentator/issues/183 https://github.com/presentator/presentator/issues/183, but to summarize - I wanted something that could be self hosted with almost no additional setup and no dependency on 3rd party services.
- Pr0ject217 4y agoThis looks cool.
- mr-karan 4y agoThis is quite a cool project! Congrats on the public release.
- hernantz 4y agoVery nice, whats planned next?
- giancarlostoro 4y agoI'm confused about one detail: Does it render pages automatically based on Schema? I see your really simple example under examples, and its so minimal I want to think you just get all the tables and render views from that. Am I crazy? If so this is really neat. Did you ever consider using something like GORM? Because I could see this working with other databases and being extremely useful. I use Django to build really quick CRUD interfaces, but sometimes I need to be able to customize it more, and the admin UI is not as extensible as I would normally want, they even suggest you just build custom pages if its not doing what you need, which is a bummer because Django Admin covers the majority of my use cases.
- randomwebdev 4y ago"Collections" stores a single records table meta data (eg. name, fields, validators, etc.), so when you create a new collection a new related table will be created (see https://github.com/pocketbase/pocketbase/blob/3d07f0211dc74710affd9154f61728d77cfb6f4c/daos/record.go#L273 https://github.com/pocketbase/pocketbase/blob/3d07f0211dc747...). The admin UI just shows the collections through the web api (https://pocketbase.io/docs/api-collections/ https://pocketbase.io/docs/api-collections/). I actually started with GORM, but its too complex and I ended up replacing it with a simpler query builder package (ozzo-dbx). While the query builder has abstraction for other databases, I'm not planning supporting them at the moment.
- giancarlostoro 4y agoNo worries, I've seen another project called UAdmin that kind of reminds me of this, my problem with UAdmin was that there were bugs and I didn't quite get why it worked how it worked, but having used Django since I realized what I was missing out on. Thank you for following up, I did see you had a package for extending the built-in Go package for SQL.
- masukomi 4y agofeedback: re the site: i have no idea what you mean by a "backend". If it's got a "admin dashboard" it's got a UI which means it's got a front-end which means it's not a backend. I'm assuming "go backend" isn't specific to go but just indicating that it's written in go. it's got a example code block but doesn't explain the point of it. Why would an existing framework with a UI and everything need me to write a `main` method? Why doesn't it have one already? If it doesn't have one why doesn't it. If it does have one why am i not using it? My thinking here is that there are many existing patterns for registering plugins / extended functionality that don't require altering the main method of the thing you're hooking into. Why aren't you using that? Is this maybe intended to be like... a starter template for a Sinatra like thing with a pre-defined set of functionalty? Kind-of like how Django sets up model administration UIs for you? re your summary here and the site: i have no idea what "backed-in files" means and I've been doing web-dev for decades. "convenient Admin dashboard UI" ... to admin / do what? "simple REST-ish API" a) why "ish" and not actually REST b) ... that let's me do what? --- in summary.... this looks useful but i don't get what you're actually offering or what it's intended usage scenario is. This is compounded by the fact that you're using a very atypical definition of one word "backend" and a very uncommon term "backed-in files"
- sangnoir 4y agoIt's a lightweight replacement for Firebase. I That's why it is described as a backend, because it's primary feature is to act as a data store. If don't understand what a project does, and you're unfamiliar with the comparisons given (Firebase, Supabase), the right thing to do would bw to look up the comparisons.
- masukomi 4y agoI know you have user management, a database, and do something with files. As noted before the "backed-in files" isn't a commonly used phrase so i'm left with 2 pieces of meaningful info, neither of which is particularly notable because every multi-user app has both of those. Firebase gives me a list of use cases https://firebase.google.com/use-cases https://firebase.google.com/use-cases and documentation whose left nav gives me a good insight into the high-level functionality it provides "authentication, storage, hosting, security rules, extensions, machine learning, etc" I think it's safe to assume you don't provide all of those, but i don't know what subset you DO provide. As a result, if i give you the benefit of the doubt, telling me it's a "replacement for firebase" is not meaningful because i don't know what parts it can replace unless it's just the few listed in which case it's absolutely _not_ a replacement.
- lovelearning 4y ago> backed-in files and users management Did you intend to say baked-in? Like it's built-in? If so, I feel it's better to just use "built-in" because it's more familiar. The same typo's in the site too and confused me a bit.
- randomwebdev 4y agoYes, built-in sounds better. I'll update it.
- twsted 4y agoImpressive work! I'm doing something along these lines in Go with Postgres, but I'm definitely not as productive as you. What do you think about Echo? Was it your first choice as a web framework? How in your opinion is better than Gin for example? Out of curiosity, how much time did you spend building the admin dashboard? Did you have previous experience with Svelte?