New Svelte+Bulma+WebTorrent art site

I’m still researching bleeding edge tech for the 2nd part of the book, and have completed (finally) a demo project that uses:

The app is temporarily at https://oyp.zedshaw.art/ and you can go there if you want to see how it works. Open your browser console.log to see it spew debug stuff at you.

The idea is that–if you do art or photography–you usually want to host massive image files. Mine can be as large as 23MB with my 50MP camera, and some cameras can push a 100MB jpeg. Hosting those is normally very expensive, but with WebTorrent it’s a lot cheaper since everyone shares the load.

When you connec to this, webtorrent will download the images from my server but also from other people’s browsers who have already downloaded it, thus reducing the costs.

This is a first version hack and the code is gnarly, but so far it works. I’ll be updating with report on what it’s like to use Svelte shortly.

6 Likes

So it works like torrents? With seeds and all?
This is awesome! Will take a better look at it for sure!

Ohhhh. I didn’t understand the download thing until now. The browser actually holds it? So like if I downloaded on chrome, Google would hold onto the image for future downloads?
By the way I love this as an app for displaying art.

Not really. It downloads it and holds it, but just in memory. When you close the browser it dies. It would be possible to store it locally, but local storage isn’t very big so you couldn’t use it for this purpose.

1 Like

Yep, does the seeds and all that, but it’s not as reliable as real bittorrent. It has to use some lame web tech called WebRTC to do its torrenting.

2 Likes

@zedshaw Why did you choose Svelte over, say, Gatsby?

I discovered Bulma some days ago and put it on the list for my next webproject. How do you like it?

I like Bulma because it’s simple and seems to just do what I want. I haven’t had to fight with it for layout or add tons of randomly organized divs all over like with Bootstrap.

2 Likes

That’s exactly what I hate on Bootstrap. But it works fine anyway. I have decided that I will build my real-estate app with Bulma instead of Bootstrap. Time to learn something new (again) :slight_smile:

1 Like

I listened to a podcast earlier today talking about webtorrent. Very interesting new tech, looking forward to learning about it. Also never heard of Bulma, but Bootstrap drives me nuts so it might be a good alternative.

2 Likes

Do you remember which podcast it was? I’m interested in listening in.

I posted the wrong link, let me see if I can find the podcast.

The website is called syntax.fm, I think it’s an old episode, like episode 2 or something. Wes Bos and some other guy.

A free service run by Zed A. Shaw for learncodethehardway.org.