Blogging Site - Can I persist data without servers/in a client-side app?

I’m tinkering with a personal project that’s a decentralized blogging app (trying to learn web3/dweb and thought this would be a good project to start with). I’m trying to keep everything decentralized, so no backend servers, only smart contracts, and all logic outside of that is client-side. Of course, I ran into the problem of storing content, like posts, images, videos, etc. for my service. Obviously, IPFS would be a great solution, but I need to be able to have this data persist so later on someone can check out my site. Yes, I understand pinning but I’d rather not have to write a server and as such, pinning services are out of the question (can’t have my api keys stored client side!). Also, I’d like the data to be more distributed. So here’s the question, is this possible, on IPFS and/or other platforms? Or is this more of a pipe-dream kinda thing. Cheers!

Have you heard of OrbitDB? I’m not sure how they manage keys and authentication, but just making sure you knew about it. Good luck. That’s the same kind of fun project lots of people are working on these days!

I’ve heard of Orbit, yeah. It runs on IPFS though, so I’d assume it suffers from the same issues of persistance?

First of all, there is no server or client in IPFS, it’s just the node. You can store the data in the local IPFS node.
Second, data must be a store somewhere. If you don’t want to store data in Pin Server or locals, you can pay to use Filecoin to store data.

There is no local ipfs node, it’s just a website people visit, unless you’re saying I should just spin up a node in-browser. Also, I’ve heard of filecoin but the docs don’t seem to be that great so I don’t know much about it, and there aren’t any providers that match my use case to my knowledge. If you have any links I’d greatly appreciate it.

Theoretically, you can use js-IPFS in the browser and store data. However, it’s unstable and when user closes the browser the data will lose.
For now, Metamask doesn’t fully support filecoin. So I recommend use the Pin server like pinata.
If you want to know more about filecoin, here is the document.

I can’t use pinning servers because I can’t expose my api keys to the client-side, unless you know a way to use pinata or other services fully client-side? I don’t have any backend servers to proxy this process either.

I don’t think there are any good ways to archive your goal. :joy: a alternative way I can think is let user download a IPFS-desktop and save data to users’ IPFS node.
Or just waiting filecoin becomes easier to use.

1 Like

I’m not pretty familiar with Filecoin, but I think the example in this page will help you to build this app.