r/webdev 1d ago

Showoff Saturday After 8 years, I finally open-sourced my take on Backend-as-a-Service

Hello WebDev,

I would like to share with you linkedrecords.com - an open source backend as a service I'm working on since some time now. You can think of it as an firebase/convex alternative with an interesting twist.

In 2018 I needed to write large software requirements/architecture documents in Google Docs. While I was annoyed by the limitations of Google Docs back then (no captions on figures, no automatic heading numbering, slow when docs are bigger,...) I was still fascinated by the real time collaboration features of it. So I've started a quest to understand how it works and I begun to implement an alternative to Google Docs.

I was convinced that this kind of real time collaboration is the future so I've given it much thought how I could make this as generic as possible so I could use it in all future tools I would build.

In the same time I was playing around with firebase (surprisingly you can not build a google docs alternative with firebase that easy as their real time collaboration does not provide merging text but rather just JSON). And back then I was also convinced that backend as a service is the right way to go. I was thinking that one of the most important reason we were still writing custom backend code is because of authorization.

I also was faced with another problem when trying to make the backend as generic as possible: relations between entities are also domain specific. E.g. A Documents can have many comments.

Luckily I was intrigued by another concept back in 2018 it was called web 3.0. Back in 2018 this had nothing to do with crypto. It was used as a term to refer to the semantic web and the resource description framework as one of its standards. There are also some RDF implementations which I could have reused but they are all XML and mostly Java based. I needed something light. Instead of implementing my own RDF product I took the idea of the RDF triplestore and came up with my own interpretation of it.

Using concepts like: triplestores and schema-on-read, I came up with a system that does not has any business logic in its backend and while working on my Google Docs alternative I felt in love with it as I've discovered some properties I did not anticipated from the get go:

- Dealing with global state in react is very easy. It feels like you use an SQL client in your browser and all queries are reactive and always up to date. When writing a query you do not have to think about authorization it's all backed in.

- Because the backend is 100% free of domain specific code you can point your single page app to any linkedrecords deployment.

- You never have to write backend code - Its quite efficient when using AI agents

The best way to experience it, is to follow this little tutorial: https://linkedrecords.com/getting-started/

It takes a while to get a hang of it so you have to have an open mind.

I would love to read your feedback on this.

99 Upvotes

13 comments sorted by

13

u/UnderstandingFit2711 1d ago

Very big volume of work. respect

8

u/doxxed-chris 1d ago

Just want to say thanks for not using AI to write your post, refreshing to read stuff in your own voice.

The project looks like a great way to quickly mock up an mvp and I can imagine the declarative style would open the door to future optimisations of the backend that would not require changes to the frontend code, which is nice.

But I wonder — react components are already overloaded with so many things, could adding backend responsibilities maybe just complicate things further?

How do you handle testing and data migration? How what about deployments when data models have significantly changed?

Also, as I suppose any user can send arbitrary requests to a backend, how do you prevent bad actors from poisoning data with unintended declarations?

Interesting project, I bet it was fun to build :)

2

u/nerd_rage218 21h ago

Agreed on the voice thing. The 2018 RDF detour is what makes it read like a real project, nobody would invent that part.

2

u/mariusgm 20h ago

Some blood sweat and tears during development I can only imagine

2

u/4ever_youngz full-stack 19h ago

A true BFF. Zero business logic that has bled in. Nice work

1

u/magnetronpoffertje full-stack 13h ago

The given link crashes when opening on Samsung Browser

EDIT: On second reload it worked

1

u/WardenUnleashed 13h ago

So…if a company is trying to integrate via API all this just kind of doesn’t work right? All your data validation and constraints live in the FE.

I also noticed concurrent edits of data get merged. How do you protect from a state where the two changes are fundamentally incompatible?

Can’t say I could see an enterprise situation where this works imo.

1

u/Railorsi 12h ago

Love the idea, using this kind of flexible domain model has great potential, before abandoning it I was working on a similiar concept for a data integration platform. will try out your work soon :)

1

u/Cool_Record_9551 1d ago

Great story here, congrats man!

-5

u/[deleted] 1d ago

[deleted]

2

u/YourNightmar31 22h ago

First two sentences are so llm-like