plankanban / planka

The realtime kanban board for workgroups built with React and Redux.
https://planka.app
GNU Affero General Public License v3.0
7.47k stars 690 forks source link

Offline mode (no server, just browser storage) #402

Open WofWca opened 1 year ago

WofWca commented 1 year ago

Hi! Nice project you have here!

Would be also nice if there was support for running it without an active server. I can see that the demo page already runs without fetching any data from any servers, although it doesn't keep the changes you make after you reload the page. (I could not find the source code of the demo page, could you please share it?).

There is a somewhat similar app that does what I'm talking about: https://github.com/Shabang-Systems/Condution/ : https://app.condution.com/

image

Some people (myself included) have purely personal projects that they don't need to share with anyone, for them having an entire server would be unnecessary. But the real reason why I ask for this is because I'm looking for a nice todo list manager app to port to webxdc, and the first (and the most important) step is to get rid of servers.

I imagine this would be pretty easy to do, from the looks of the demo page. Or are there caveats I overlooked?

The next step would be to make the app installable (PWA).

meltyshev commented 1 year ago

Hi! The idea sounds cool for me. In the current demo it's done a bit hacky, and because of this it's difficult to maintain. But for now, we have other tasks as a priority. If anyone wants to implement this, PR is very welcome!

WofWca commented 1 year ago

I would appreciate if you could give a quick drill about what needs to be done to achieve this, as for a person who's not familiar with the project structure.

meltyshev commented 1 year ago

It's a little complicated to describe here. In general, the idea is simple - just pass the copied empty application state as initialState. Then when you open the application it will immediately have some user set and you don't have to log in. But there are some problems, after realizing that I decided not to spend a lot of time on the demo version and did it simply by commenting out the code.

Changes need only be made in the client folder. First, you have to remove/disable all the functionality that works only with the server - creating a user, uploading attachments, etc. Creation of a project should be done locally, so as not to wait for the server response when creating (small changes in the creation logic). Also then remove all code responsible for connection to the server and sending requests.

I will definitely do this at some point, because I'm tired of updating the demo version every time I make a change and would like it to be put into one setting.

WofWca commented 1 year ago

So, there's not that much of important business logic on the back-end that the front-end relies on? Is the back-end practically just a database?

I've decided to first try to port another todo list manager project called Vikunja, and I'm running into problems with that (see this forum post). Do you think the situation is better with your project in this regard?

chekoopa commented 1 year ago

I think we could encapsulate the server interaction behind some interface and then implement web storage based functions.