Inspiration

Archive.org but decentralized. Everyone relies on Archive.org, imagine if it went offline, what would the impact be? Let's reduce that impact with redundancy and decentralization.

What it does

Takes any website you give it and turns it into a PNG whole page screenshot as well as allows you to save the source code. Image and source code are both retrieved locally using a bunch of browser hacks. A bitcoin-paid service is in the works for screenshots that are captured on a dedicated centralized server using a Puppeteer browser (code not published yet), the result of which has no rendering errors yet can be saved to the user's chosen encrypted storage.

How I built it

With my bare hands! Googling a lot of cross-origin workarounds, and using a couple libraries such as html2canvas.

Challenges I ran into

Actually getting the app deployed to a hosting provider with SSL (Heroku) was the hardest part.

It was also much harder than expected to capture a reasonable screenshot "representation" of another domain using only client-side JavaScript. Once I realized the result has to be substandard, or not work at all for some websites, I decided the next has to be implementing a bitcoin-paid Puppeteer API for the app, perhaps also free with rate limits, for users who need a pixel perfect representation of a website, possibly at multiple common resolutions all at once.

Currently users are only able to right-click to save the generated image and/or copy-paste the source code to save it locally. Storage is not yet implemented, but login is.

Accomplishments that I'm proud of

I'm proud that I figured out how to implement a really simple login flow using Blockstack, which is an obvious prerequisite to supporting paid screenshots and encrypted user storage. Looking forward to implementing those features in time, but I still need to work through the relevant Blockstack tutorials to understand how.

What I learned

Blockstack login, peeked at Radiks which looks like what I will want to use for this robust app, and of course we cannot forget all the crazy hacks to make a website from another domain possible to screenshot using only client-side JavaScript.

What's next for Darchive

Screenshots via Puppeteer (users may pay coin for the centralized service or host their own Pupeteer screenshot API), encrypted storage that stores data privately, and unencrypted storage where the data that is captured on your personal hub is still publicly searchable by other users (this seems complicated to implement but still think it is possible with Blockstack, I think https://github.com/blockstack-radiks/banter might be a good example unless it turns out it is just a centralized store). All data tagged and timestamped accordingly, allowing for a robust search engine.

Built With

Share this project:
×

Updates