Let me talk about La Suite Numerique
So a few days ago when I was messing around with different ways of playing audio files on my laptop, I learnt that jellyfin can run on localhost. Now this, this is an awesome realisation, because now I can run a jellyfin server and interchange the client out to anything that is compatiable with jellyfin and all my music will be there, and some jellyfin clients have the ability to download the songs(I am talking specifically about music clients).
And this is also great because now it also acts as a file sync server for all my music library, because there is a jellyfin music client on android that lets you just download everything(it is called finamp). For a client on my laptop I have chosen Feishin, because it seems to be more feature rich than some of the other jellyfin compatiable clients, it also has a very good queuing feature and I love it.
So, realistically all this is, is a server-client architecture but instead of the server being in a datacenter somewhere, it is on device(or possible just on premise if I get into homelabbing and can afford a server in my home). Now, there are many self hostable services that use a server-client model. And this idea does only really work if we are the only user or if the only users ever are on the LAN and can work around our machine not always running.
But, do you know what a tool ive been looking to replace for ages is? Google docs. And I think now is the time to do it.
In terms of existing tools that I could self host localy and then later expand into a homelab or larger system.
- OnlyOffice
- Nextcloud
- La Suite Numerique Docs
that is just off the top of my head. Now the latter 2 are both built on yjs, and implementation of a CRDT(Conflict-free Replicated Data Type) which means it stores a list of changes that happen to a document by different clients rather than storing the final state. This means that devices can go offline and make edits and come back online when the main server has been updated as well and everything will resolve to the new updated state.
Now that sounds excellent, offline first yet architecturally collaborative document editing? This sounds excellent for our situation, where we cant expect the server to be up at any given time nor can we expect ourselves to be checking the server for updates when not actively working on the document.
I should note I am primarily focusing on document editing rather than an entire office suite as it is the main thing I do.
And from a product design perspective, implementing a service on a LAN would also mean that, say two people in the same household would be able to collaborate on a single document, or if I got this running on my laptop at school temporarily then other people at school(because its a single LAN) would be able to work on it. However in a school or enterprise setting there would be the budget for a deticated server, and there would also be the need for remote access in which case a cloud based service is just a simpler solution than exposing the local system to the wider internet.
I have actually set up La Suite Numerique Docs on my machine and have tested it out, its definetly not designed to be ran on localhost, a lot of the beta tools such as Projects are broken because they are designed with a real auth tool in mind instead of just a local dev spoof. And the only real way to access it is through the client website editor accesible on the designated port.
However there actually is some documentation for a backend API in the source code of LSN Docs, although this is only a REST api, what we really need is the websocket connection, because LSN is built ontop of yjs we know it will have one somewhere. I can actually find the address, being /collaboration/ws/?room=<document ID>. Although I cannot find where in the source code this is implemented, but I also havent had too detailed of a look.
