Finding a project to contribute to was pretty easy, as I've been looking into some Open-Source BaaS (Backend-as-a-Service) solutions for quite some time now in my production deployments. Together with a friend, we run a digital solution agency focused on the development of web applications (websites with smooth app-like interactions, running in the browser) and mobile applications. We've been using [Firebase](https://firebase.google.com/) for a while, but we wanted to shift to Open-Source solutions for reasons.
1.**Escape Google's vendor lock-in.** Firebase is a great product and the most complete there is, but it's difficult to opt out of it, mainly because of how hard database migration has been made (by design).
2.**Tired of NoSQL databases.** Easy to begin with, but quickly inefficient. In my opinion, SQL combined with an ORM like prisma is the way to go.
3. But mostly: **have an option for our clients (us including) who don't want their data accessible by the US government and federal agencies.** This is a long discussion, I suggest looking into [this article](https://www.theguardian.com/technology/2022/apr/04/us-law-enforcement-agencies-access-your-data-apple-meta), or even worse [THIS BILL SUMMARY](https://www.congress.gov/bill/116th-congress/senate-bill/4051) .
**TL;DR**, US federal agencies can request access to user data from any company which servers are in the USA, including Google and Amazon (who collectively run more than 80% of the web ... ). What's worse ? They don't even need to NOTIFY USERS. What's even worse ? Company now are obligated to have a decrypted version of the users data. That's like, really bad man.
Therefore, we wanted a BaaS which was self-hostable. Some nice options have sprouted during the past few years, let's talk about the Open-Source ones:
-[Supabase](https://supabase.com/): considered as the best firebase alternative because of how well-rounded it is. Using (PostGre)SQL. Mostly open-source. Quite mature. The backend can be hosted and managed for you (underneath, they host it on AWS tho, so it's a no-no), then accessible via API. The option of hosting it by yourself exist, but it is not primarily designed for it, so it can be quite a hassle to have it working properly. And it is written in the single-threaded capable only Typescript.
-[Pocketbase](https://pocketbase.io/): totally open-source, designed to be self-hosted, written in Go (performance++). Only downside is they are still in Beta, breaking changes might occur a lot.
## The project
Obviously, Pocketbase was my choice. It was a great opportunity to get involved in the project. I opened a discussion [pocketbase #1021](https://github.com/pocketbase/pocketbase/discussions/1021) and the maintainer was quick to answer. Help was needed but the amount of research, discussions and work involved for any issues was a bit too much considering I had not much time. In this initial discussion, the project maintainer of another project: [Pockethost](https://pockethost.io/) came along saying he could use some help on small issues and other.
Pockethost is a service managing Pocketbase instances for its users. It is a great solution in the really early stage. By the way, I know I just went full circle and bit my own tail right here, collaborating on a managed instance service. It's kind of defeating the whole purpose of an open-source self-hostable back-end, if it's hosted for you. But I did it anyway.
## The contribution
Once again, I opened a [discussion](https://github.com/benallfree/pockethost/discussions/129) to see where help was needed the most. The maintainer I talked with before was quick to answer and pointed me towards some issues I could help with. I chose one and began working on a quick prototype.
The setup was quite easy thanks to Github Codespaces: fork - open in codespace - start working (god bless cloud-based dev environment). I spent some time reading the codebase and getting familiar with some technologies:
- Svelte: **UI/UX** javascript framework compiling the source files to an optimized HTML + CSS + Javascript, the future of web development in my opinion, I hate React (and facebook as a whole)
- Bootstrap: a popular **CSS Framework**, quite old and not easy to customize, I personally prefer **Tailwind.css**.
- Typescript: typescript is amazing, as much as it can hurt you sometimes
I submitted a quick prototype in the initial discussion, the maintainers seemed to like it, but some changes were still needed. I opened a pull request to expand on the design of the implementation with the community. A lot of back and forth was needed, we went from:
- having a small prototype in the homepage
- trying to fit the component in the docs
- decoupling data to `.md` files
- creating a new route hosting the FAQ component
The final work/component should be available [HERE](https://pockethost.io/faq) the next time the maintainer updates the deployed codebase.
## Conclusion
Overall, I am satisfied with this project. It helped me understand more how to contribute to an existing project, maintained by someone else with a different tech stack. If I find some time, I'll come back to work a bit more on this open-source project. I'll discuss more about it during the exam !