PeerCDN Demo

Do you know about PeerCDN?
Yes, PeerCDN is a peer-to-peer (P2P) content delivery network (CDN) designed to accelerate website performance and slash bandwidth costs for site owners by leveraging visitors' browsers to share static resources like images, videos, and files. It uses WebRTC technology to create direct connections between users on the same site, allowing popular content to be served from peers rather than solely from central servers, which can handle traffic spikes more efficiently and reduce costs by up to 90% in some cases.The original PeerCDN startup, founded around 2013, was acquired by Yahoo later that year to bolster its media delivery capabilities, particularly for video and audio content. Post-acquisition, it appears to have evolved into a broader service with ongoing adoption—over 85,000 companies reportedly use it today, mainly small businesses in retail with 1-10 employees. There's also an open-source variant, a lightweight JavaScript library for implementing P2P CDN functionality in service workers, which gained some traction in developer communities around 2020.If you're referring to a specific aspect (like implementation or alternatives), let me know for more details!
Okay, I want an example of the open source service worker version. What's the license?I want to watch a directory index and if there's a new file then download it. Try PeerCDN first, if not there then make it available to peers. Then others can fetch it via the PeerCDN? If the file disappears then delete it. If possible I want to immediately download the file into the browser's storage and make it available for export as a download from a blob URL or whatever. Because it may disappear from the server at any time. I want to calculate a sha256 sum upon download as well and keep that in local storage separately as a log with original filename and download time. Note if we export a file in a log as well please.I'd like a list of files locally as the UI, looking like a directory index. But augment it with info about our file state. Do we have it cached? Have we exported it? What's the sha256 sum? And the link to /archive/{sha256_sum} to get the content later.However you need to model this is okay, but make it persistent between browser loads please. As much vanilla JS as possible, vanila HTML and CSS. A basic SPA, as low tech as possible.So it's a seeded file sharing app. People can watch a standard directory listing and all get the new files and accelerate downloads with PeerCDN.Make a form to upload files tho, to the /drops endpoint and we can wire it up on the nginx side to go to a little service that accepts files behind the scenes. Support a bearer token auth on the upload form. Make it at the end of the directory listing. Make its visibility able to be toggled. Persist the token between page reloads via the durable storage we're using. Make it a password field with toggle to view it as plain text, as some popular login forms do. So we can verify the key we're using.Are there CORS concerns with this?Can we get a standard nginx/apache/popular browser HTML directory listing and scrape the links and file sizes and the like? Keeping in mind sizes may be human readable instead of exact (nginx_autoindex_exact_size or similar).We can also support a json based listing, but I want plain text because of wide deployment.Also give me a product description for this script please. And a Tweet announcement that's about 140 characters long so we can include a link or tag. I want this to be a prompt for sale priced somewhere like $10-50, so appeal to software development decision makers in that class of organization.What are those classes and who are the decision makers? What are they doing on X if you know, so I can find them with the search API? I want them to view my profile and see these tweets we post, make sense?Can you also make a product photo for this? Gumroad size. We might also use it for the social media post, unless you think we should make a related one. Both would be visible via the ograph preview of the product + the social media post.So this will be a demo for me, and if it looks good I can sell copies of the demo and this prompt.I'd like a README.d file for the demo as well. Just talk about this. Include a copy of this prompt if you would, and details about all the tech we're using. Make a licenses section for all dependencies for legal team to use. The history of PeerCDN exactly as you've described above would be great too. ThanksThanks.
Go To Conversation (Grok)